Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Migrating from G77 to IFC

Intel_C_Intel
Employee
577 Views

Hello!

Until now I have been using the G77 compiler with the CERNlib libraries, and now I would like to test the ifort compiler performance. Is there a way to use those libraries (compiled for gcc) directly with ifc?

Directly including them with -lfoo fails in the linking phase, but it does resolve some symbols (such as the call to minuit), so it seems that they are not 100 % incompatible...

This is the beginning of the output:
===
ifort: Command line warning: ignoring unknown option '-fno-underscore'
../lib/libpacklib.a(minuit.o): In function `__g77_masterfun_minuit':
minuit.F:(.text+0x36): undefined reference to `s_wsfe'
minuit.F:(.text+0x3b): undefined reference to `e_wsfe'
minuit.F:(.text+0x6d): undefined reference to `s_wsfe'
minuit.F:(.text+0x72): undefined reference to `e_wsfe'
minuit.F:(.text+0x8e): undefined reference to `s_wsfe'
minuit.F:(.text+0xaa): undefined reference to `do_fio'
minuit.F:(.text+0xc6): undefined reference to `do_fio'
(...)
===
I'm using:
$ ifort -f77rtl fit1.f -L../lib -lmathlib -lkernlib -lpacklib

while with g77 was:
$ g77 -o fit1 fit1.f -L../lib -lmathlib -lpacklib -lkernlib

Is there a way to make it work (before recompiling the libraries)?


Thank you.

0 Kudos
1 Reply
Steven_L_Intel1
Employee
577 Views

ifort is not link-compatible with g77. You'll need to recompile all the Fortran sources with ifort.

You should be able to link in C sources compiled by gcc.

0 Kudos
Reply