View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Undefined symbols referenced from libimfort.a

Tom Brown wrote on Apr 23, 2008

Hello,

I am trying to compile Peter Stetson's stand-alone DAOPHOT-II Fortran code. The Makefile includes references to the following IRAF libraries:
libimfort.a
libsys.a
libvops.a
libos.a

I can successfully compile the code with g77, but I would like to compile it using the Intel Fortran compiler. This commercial compiler has optimization and parallelization options that have given a factor of 10 increase in speed for other Fortran code I use in my research.

Using the Intel 64-bit compiler gives many errors, because the IRAF libraries are 32 bit. However, if I use the Intel 32-bit compiler, I get fewer errors, but still get errors such as:

Undefined symbols:
"_s_copy", referenced from:
_imemsg_ in libimfort.a(imemsg.o)
...
_f77pak_ in libvops.a(f77pak.o)
...
"_pow_di", referenced from:
_ctod_ in libsys.a(ctod.o)
...
"_pow_ri", referenced from:
_ctod_ in libsys.a(ctod.o)
...
"_i_len", referenced from:
_imemsg_ in libimfort.a(imemsg.o)
...
ld: symbol(s) not found

I'm running a Mac Intel machine with Mac OS X 10.5.2.

Has anyone had any luck linking these IRAF libraries with the Intel Fortran compiler?

Alternatively, is there a way to recompile the IRAF libraries with the Intel compiler (in either 32-bit or 64-bit mode)?

Thanks,
Tom Brown

Mike Fitzpatrick wrote on Apr 23, 2008

Using the Intel 64-bit compiler gives many errors, because the IRAF libraries are 32 bit. However, if I use the Intel 32-bit compiler, I get fewer errors, but still get errors such as:

Undefined symbols:
"_s_copy", referenced from:
_imemsg_ in libimfort.a(imemsg.o)
...


The IRAF libraries were built using F2C/GCC as the compilers, to use another compiler you still need to link in the $iraf/unix/bin.macintel/libf2c.a and the system libgcc.a (just add a '-lgcc' to the library list). This should resolve the undefined refs but I can't guarantee compatibiliy with the Intel compilers.


Has anyone had any luck linking these IRAF libraries with the Intel Fortran compiler?

Alternatively, is there a way to recompile the IRAF libraries with the Intel compiler (in either 32-bit or 64-bit mode)?


You would need to recompile the entire system using the Intel compiler if the above doesn't work. I did this early-on when the Intel compiler was a free beta version but didn't see nearly a 10x speedup. Keep in mind that tasks are usually written to process images one row (or small chunks) at a time so the compiler optimizations are typically per-row and not over the entire image.

Cheers,
-Mike [/quote]

Tom Brown wrote on Apr 23, 2008

Thanks! Your first suggestion (linking libf2c.a and libgcc.a) seems to work. I have code that runs, at least (it will take some testing to make sure it's not doing anything funny).

Last post on Apr 23, 2008