Question QG-008:

When I compile an ADINA user supplied subroutine on Linux, the problem stops with the following error in the *.msg file:

Initializing ... Stage 1
Allocating 16000000 bytes of Memory ...
Initializing ... Stage 2
Initial ADINA memory allocation  - 16.0 mb  (or 4.0 mw)
Starting Solution Process ...
Computation starts ...
Input phase...
/home/adina832/adina8.3/adina.exe: relocation error:
/home/adina832/adina8.3/ undefined symbol: for_open

What is the cause of this error?


Some Fortran functions, including i/o functions, require linking additional Intel libraries to the ADINA user-coded dynamic library, To find out which libraries are missing, go to the path where the Intel Fortran libraries are located and use the "grep" command with the name of the undefined symbol as follows:

[user@redhat4 ~]$cd /opt/intel_fc_80/lib

[user@redhat4 lib]$grep "for_open" *
Binary file libifcore.a matches
Binary file libifcoremt.a matches
Binary file libifcoremt_pic.a matches
Binary file matches
Binary file libifcore_pic.a matches
Binary file matches

The output above indicates that there are 2 intel dynamic libraries (*.so*) to be linked, and You have to modify the Makefile to include these libraries. For example:


$(TARGET): $(OBJS) force_rebuild
        @ rm -f $@ 2 > /dev/null
        $(LD) -o $@ -Bdynamic /lib/ \
        $(INTEL_LIB)/ $(INTEL_LIB)/ \
        -shared $(OBJS) -lm -lc
        @ chmod 555 $@

Please be aware that Makefiles are very sensitive to syntax rules (spaces, etc.), so be careful when you modify the Makefile. It is recommended to keep a copy of the original Makefile.

Now you may type make as usual. However, after rebuilding, you must ensure that the Intel dynamic libraries that were dynamically linked are present in the same directory as You may copy these libraries from their original location or use a symbolic link, for example,

ln -s /opt/intel_fc_80/lib/ .
ln -s /opt/intel_fc_80/lib/ . 

Now you are ready to run your problem.

ADINA logo