comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » RE: call_external in VMS
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
RE: call_external in VMS [message #337] Wed, 03 June 1992 09:35 Go to next message
agrawal is currently offline  agrawal
Messages: 3
Registered: February 1992
Junior Member
> In article <?.707576515@hubble>, esmith@hubble.gsfc.nasa.gov (Eric P. Smith) writes...
>> In trying to use some old fortran code with IDL (versions 2.2.2 and 2.3)
>> I've run into a problem with the CALL_EXTERNAL function. While I can
>> make the example in the IDL manual work on our VAX (VMS 5.5), my
>> routines always produce the following error message:
>>
>> IDL>a = call_external(/f_value, 'king3_exe', 'king3', 6.4, 40.)
>> %LIB-E-ACTIMAGE, error activating image $1$DUA1:[USER1]:[ERICSMITH]KING3.EXE;2
>> -SYSTEM-F-NOTINSTALL, writeable shareable images must be installed
>> % CALL_EXTERNAL: Error in called routine
>> % Executable halted at $MAIN$ (CALL_EXTERNAL)
>> IDL>
>>
> .. (deleted)
>
> We have had this problem in trying to link to IMSL libraries.
> Unfortunately, the solution escapes me, though I vaguely recollect that
> all of the called routines have to be linked as shareable.
>
> Rich Isaacman (COBE)

We are running PV~WAVE v3.1 on VMS 5.5.
I ran into the same problem when trying to link to IMSL libraries.
The PVWAVE routine to access an external shareable image is CALL_VMS, I am
not sure what IDL's CALL_EXTERNAL requires but this may give you a hint.

The culprit we found out are the COMMON blocks present in the code.
Besides linking shareable you need to change the program sector attributes
of the common blocks to make them non-shareable. This can be done by adding
to your options file the line
$PSECT_ATTR=xxx,LCL,NOSHR
(where xxx is the name of the common block) for each common block in the code.

Once you have linked with the right attributes for all the common blocks
this should work. The frustrating part sometimes is finding the names of all
the common blocks when you want to link with a library - for eg. IMSL, whose
manual doesn't list them. You may then need to generate a MAP file to find
out all the common blocks and then go back and relink with the right attributes.
If there is a cleaner way please let me know.

Ramona.

____________________________________________________________ _________________

Ramona G. Agrawal Hearing Development Research Lab
Waisman Center,
agrawal@waisman.wisc.edu Univ of Wisconsin-Madison.

------------------------------------------------------------ -----------------
Re: call_external in VMS [message #338 is a reply to message #337] Wed, 03 June 1992 06:42 Go to previous messageGo to next message
isaacman is currently offline  isaacman
Messages: 20
Registered: June 1992
Junior Member
In article <?.707576515@hubble>, esmith@hubble.gsfc.nasa.gov (Eric P. Smith) writes...
> In trying to use some old fortran code with IDL (versions 2.2.2 and 2.3)
> I've run into a problem with the CALL_EXTERNAL function. While I can
> make the example in the IDL manual work on our VAX (VMS 5.5), my
> routines always produce the following error message:
>
> IDL>a = call_external(/f_value, 'king3_exe', 'king3', 6.4, 40.)
> %LIB-E-ACTIMAGE, error activating image $1$DUA1:[USER1]:[ERICSMITH]KING3.EXE;2
> -SYSTEM-F-NOTINSTALL, writeable shareable images must be installed
> % CALL_EXTERNAL: Error in called routine
> % Executable halted at $MAIN$ (CALL_EXTERNAL)
> IDL>
>
> The only difference between my initial routine 'king3'
> and the example given in the IDL manual is that king3 calls another
> subroutine (which call other routines and functions). All the subroutines
> and functions have been declared 'universal' in the VMS link command. None
> of the routines attempt to write to disk. I'm stumped at this point and
> was hoping someone had run across [and solved :)] this problem before.
> Any suggestions welcome at this point.
>

We have had this problem in trying to link to IMSL libraries.
Unfortunately, the solution escapes me, though I vaguely recollect that
all of the called routines have to be linked as shareable.

Rich Isaacman (COBE)
Re: call_external in VMS [message #339 is a reply to message #338] Wed, 03 June 1992 14:00 Go to previous message
fireman is currently offline  fireman
Messages: 49
Registered: August 1991
Member
In article <?.707576515@hubble>, esmith@hubble.gsfc.nasa.gov (Eric P. Smith) writes...
> In trying to use some old fortran code with IDL (versions 2.2.2 and 2.3)
> I've run into a problem with the CALL_EXTERNAL function. While I can
> make the example in the IDL manual work on our VAX (VMS 5.5), my
> routines always produce the following error message:
>
> IDL>a = call_external(/f_value, 'king3_exe', 'king3', 6.4, 40.)
> %LIB-E-ACTIMAGE, error activating image $1$DUA1:[USER1]:[ERICSMITH]KING3.EXE;2
> -SYSTEM-F-NOTINSTALL, writeable shareable images must be installed
> % CALL_EXTERNAL: Error in called routine
> % Executable halted at $MAIN$ (CALL_EXTERNAL)

You need to specify the full path to the executable when you define the logical;
otherwise it expects an installed image in SYS$COMMON.

Gwyn Fireman (unix novice) phone: (301) 794-1560
Computer Sciences Corporation span: IUEGTC::FIREMAN
IUE Observatory internet: fireman@iuegtc.dnet.nasa.gov
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: FITS format reader?
Next Topic: IMSL/IDL vs IDL (Which is the better)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:36:30 PDT 2025

Total time taken to generate the page: 0.00842 seconds