RE: call_external in VMS [message #337] |
Wed, 03 June 1992 09:35  |
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.
------------------------------------------------------------ -----------------
|
|
|