- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- FORTRAN Compile Link Error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 08:04 AM
тАО11-17-2010 08:04 AM
prvmsk(1) = ( prv$m_bypass .or. prv$m_cmkrnl .or.
......................^
%F90-W-WARNING, Overflow occurred while evaluating constant expression.
at line number 60 in file DKA0:[CODE]DEFRAG.FOR;30
If I limit the amount of .or. statements, it compiles just fine. I also noticed that if I move the prv$m_share to the front, it fails as well. So I'm not sure if there is an order of precedence as to what is being checked, or if that IA64 compiler is acting funny with the entire statement. It does compile on an Alpha with no issues.
c
c define the system parameters
c
include '($prvdef)'
c
c define the functions referenced
c
integer sys$setprv, sys$bintim
integer lib$get_symbol, lib$set_symbol
integer str$position
c
c define the external references
c
c
c define the local parameters
c
c
c define the local variables
c
character*1024 cmd_str, vol_str, qual_str
character*255 p1_str, p2_str, p3_str, func_str
character*32 end_str
integer p1_len, p2_len, p3_len, func_len
integer cmd_len, vol_len, qual_len
integer iret, i, prvmsk(2), end_len
integer*4 end_time(2)
c
c get the proper privileges
c
prvmsk(1) = ( prv$m_bypass .or. prv$m_cmkrnl .or.
1 prv$m_detach .or. prv$m_netmbx .or. prv$m_sysgbl .or.
2 prv$m_world .or. prv$m_syslck .or. prv$m_sysprv .or.
3 prv$m_tmpmbx .or. prv$m_share )
iret = sys$setprv ( %val(1), prvmsk, , )
c
c get the parameters for this operation
c
iret = lib$get_symbol ( 'P1', p1_str, p1_len )
iret = lib$get_symbol ( 'P2', p2_str, p2_len )
iret = lib$get_symbol ( 'P3', p3_str, p3_len )
c
c special case check for HOST function
c
if ( p1_str(:p1_len) .eq. 'HOST' ) then
call update_host_list ( p2_str(:p2_len) )
goto 800
endif
c
c extract the function from the qualifiers
c
i = str$position ( p1_str(:p1_len), '/' )
if ( i .gt. 0 ) then
call str$trim ( func_str, p1_str(:i-1), func_len )
call str$trim ( qual_str, p1_str(i:p1_len), qual_len )
else
call str$trim ( func_str, p1_str(:p1_len), func_len )
call str$trim ( qual_str, ' ', qual_len )
endif
c
c extract the end time from the P3
c
call str$element ( end_str, 1, ',', p3_str(:p3_len) )
call str$trim ( end_str, end_str, end_len )
i = str$position ( end_str(:end_len), ':' )
end_str(i:i) = ' '
iret = sys$bintim ( end_str(:end_len), end_time )
if (.not. iret) call sys$gettim ( end_time )
c
c generate the command needed for this function
c ABORT is easy, need a subroutine for the FILE and FREE passes
c
if ( func_str(:func_len) .eq. 'ABORT' ) then
call sys$fao ( 'DEFRAGMENT ABORT !AS', cmd_len, cmd_str,
1 p2_str(:p2_len) )
call str$trim ( vol_str, ' ', vol_len )
call lib$set_symbol ( 'DEFRAG_VOL', vol_str(:vol_len) )
call lib$set_symbol ( 'DEFRAG_FIX', vol_str(:vol_len) )
else
call sys$fao ( 'DEFR VOLU !AS', cmd_len, cmd_str,
1 p2_str(:p2_len) )
call set_vol_symb ( func_str(:func_len), p2_str(:p2_len),
1 end_time )
if ( func_str(:func_len) .eq. 'FILE' ) then
call lib$set_symbol ( 'DEFRAG_FIX',
1 '/NOCONS/PROL=P_FILE/EPIL=P_FILE' )
else
call lib$set_symbol ( 'DEFRAG_FIX',
1 '/CONS/PROL=P_FREE/EPIL=P_FREE' )
endif
endif
c
c create the base command and required qualifier symbols
c
call lib$set_symbol ( 'DEFRAG_CMD', cmd_str(:cmd_len) )
call lib$set_symbol ( 'DEFRAG_QUAL', qual_str(:qual_len) )
c
c that's all
c
800 continue
end
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 08:53 AM
тАО11-17-2010 08:53 AM
Re: FORTRAN Compile Link Error
> [...]
What, exactly, does that mean? (And ".or."
is an operator, not a statement.)
> I also noticed that if I move the
> prv$m_share to the front, it fails as well.
Why would you do that?
What, exactly, seems to work, and what,
exactly, seems to fail?
I'd guess that a much shorter test case would
show the problem just as well.
If throwing out PRV$M_SHARE helps, then,
knowing nothing, I'd guess that it's a
sign-bit problem. PRV$M_SHARE = 0x80000000.)
I wouldn't expect a logical operator to
trigger an overflow complaint, however.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 08:53 AM
тАО11-17-2010 08:53 AM
Re: FORTRAN Compile Link Error
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 08:58 AM
тАО11-17-2010 08:58 AM
Re: FORTRAN Compile Link Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 09:06 AM
тАО11-17-2010 09:06 AM
Re: FORTRAN Compile Link Error
> like prv$m_share?
Are you reading these responses?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 09:12 AM
тАО11-17-2010 09:12 AM
SolutionThe value for SHARE does NOT fit.
It is 1 higher than the max.
Much like DCL:
$ x=%x80000000
$ sho sym x
X = -2147483648 Hex = 80000000 Octal = 20000000000
So you could use "-2147483648" instead of _SHARE.
Or just simply use -1 and get ALL privs :-)
Oddly (imho) LOGICAL(KIND=4) has the same restriction.
You could just use a 64 bit mask in one go:
integer(kind=8) prvmsk
prvmsk = ( prv$m_bypass .or. ... prv$m_share )
iret = sys$setprv ( %val(1), prvmsk, , )
That works.
Or you can play with equivalences and HEX constants
Or use a language that can handle 'unsigned'
fwiw,
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 09:19 AM
тАО11-17-2010 09:19 AM
Re: FORTRAN Compile Link Error
integer(kind=8) prvmsk
c
c get the proper privileges
c
prvmsk = ( prv$m_bypass .or. prv$m_cmkrnl .or.
1 prv$m_detach .or. prv$m_netmbx .or. prv$m_sysgbl .or.
2 prv$m_world .or. prv$m_syslck .or. prv$m_sysprv .or.
3 prv$m_tmpmbx .or. prv$m_share )
iret = sys$setprv ( %val(1), prvmsk, , )
Appreciate the assistance and explanation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 09:19 AM
тАО11-17-2010 09:19 AM
Re: FORTRAN Compile Link Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 09:23 AM
тАО11-17-2010 09:23 AM
Re: FORTRAN Compile Link Error
PARAMETER PRV$M_SHARE = '80000000'X
I like using the BIT definitions instead of the MASKS
I would also not be above defining a fresh, negative, constant with all the right bits set and a name + comment to indicate that.
To construct the value I would once use DCL and libr/extr=$prvdef/out=tt: sys$library:FORSYSDEF.TLB
fwiw,
easy read on the limit on integers:
http://docs.hp.com/en/B3909-90002/ch08s01.html
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-17-2010 10:47 AM
тАО11-17-2010 10:47 AM
Re: FORTRAN Compile Link Error
I also think the code is more readable and the intent is clearer that you're explicitly setting bits in a mask:
prvmsk = 0
prvmsk = IBSET(prvmsk, PRV$V_SHARE)
prvmsk = IBSET(prvmsk, PRV$V_BYPASS)
.
.
.