0

recently when I tried to compile a fortran code using intel compiler version 11.1.073 on Linux, I ran into the following error:

>>> BUILDING: PaSR
make[1]: Entering directory `/autofs/na3_home1/xl/ISAT_V11/PaSR'
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c pasr.f
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c pasrsubs.f
ftn -O2 -fPIC -I../isatab_ser -I../isat-ck -I../ice-pic -c usrate.f
ftn -o PaSR pasr.o pasrsubs.o usrate.o -Bstatic -L/ccs/home/xl/ISAT_V11/lib 
-lisat7_ser -lck_ext -llapack -Bstatic
/ccs/home/xl/ISAT_V11/lib/libisat7_ser.a(ci_ice_pic_bound.o): In 
function `ci_ice_pic_bound_test_':
ci_ice_pic_bound.f90:(.text+0x34f): undefined reference to `for_simd_random_number'
/usr/bin/ld: link errors found, deleting executable `PaSR'
make[1]: *** [PaSR] Error 1
make[1]: Leaving directory `/autofs/na3_home1/xl/ISAT_V11/PaSR'
make: *** [build-programs] Error 1

It seems to me that the code cannot find a specific lib (in intel shared libs) which it needs and thus causing the error. I have successfully used intel/13.1.3.192 to compile it. But not with intel/11.1.073. I have searched the web for 'for_simd_random_number' but didn't find a clue.

Please do offer your wisdom. I appreciate it!

elfsummer
  • 147
  • 1
  • 4
  • 10

1 Answers1

0

The symbol for_simd_random_number is defined in the library ifcore in intel fortran 13. However it is not present in your intel fortran 11 libraries, so you cannot link agains it.

Peter Petrik
  • 9,701
  • 5
  • 41
  • 65
  • Thanks for the post. I tried to add -lifcore to my linker flags in the Makefile as follows (correct me if I am wrong): LDFLAGS= -L$(LIBS_PATH) -lisat7_ser -lck_ext $(MKL_LIST) -lifcore And it still gave me the same error: ftn -o PaSR pasr.o pasrsubs.o usrate.o -Bstatic -L/ccs/home/xl/ISAT_V11/lib -lisat7_ser -lck_ext -llapack -lifcore -Bstatic /ccs/home/xl/ISAT_V11/lib/libisat7_ser.a(ci_ice_pic_bound.o): In function `ci_ice_pic_bound_test_': ci_ice_pic_bound.f90:(.text+0x34f): undefined reference to `for_simd_random_number' – elfsummer Apr 07 '14 at 07:57
  • Its either linker [order](http://stackoverflow.com/questions/45135/linker-order-gcc) or the symbol is really not there? (what gives you nm libifcore.so.X | grep "for_simd_random_number" for your intel 11 installation) – Peter Petrik Apr 07 '14 at 08:06
  • /opt/intel/Compiler/11.1/073/lib/intel64> nm libifcore.so.5 | grep "for_simd_random_number" I tried this but it gave me nothing :( – elfsummer Apr 07 '14 at 08:13
  • However, if I do this in a latest intel compiler version, it'll give me the following: /opt/intel/composer_xe_2013.2.146/compiler/lib/intel64> nm libifcore.so.5 | grep "for_simd_random_number" 0000000000088030 T for_simd_random_number 0000000000088700 T for_simd_random_number_avx 0000000000088850 T for_simd_random_number_avx_mask 00000000000881a0 T for_simd_random_number_mask 0000000000088320 T for_simd_random_number_single 00000000000889a0 T for_simd_random_number_single_avx 0000000000088bb0 T for_simd_random_number_single_avx_mask 0000000000088510 T for_simd_random_number_single_mask – elfsummer Apr 07 '14 at 08:20
  • `grep -r "for_simd_random_number" .` in your intel 11 lib installation? – Peter Petrik Apr 07 '14 at 08:25
  • /opt/intel/Compiler/11.1/073/lib/intel64> grep -r "for_simd_random_number" . and it gave me nothing, either :( – elfsummer Apr 07 '14 at 08:26
  • but if I do this in latest version, it gave me the following: /opt/intel/composer_xe_2013.2.146/compiler/lib/intel64> grep -r "for_simd_random_number" . Binary file ./libifcore.a matches Binary file ./libifcore.so.5 matches Binary file ./libifcoremt.so.5 matches Binary file ./libifcore_pic.a matches Binary file ./libifcoremt.a matches Binary file ./libifcoremt_pic.a matches – elfsummer Apr 07 '14 at 08:29
  • Maybe someone else can give you more details when it has been introduced and what are possible alternatives. – Peter Petrik Apr 07 '14 at 08:31
  • You can accept the answer if it gives you what you wanted – Peter Petrik Apr 07 '14 at 08:34
  • I dont have 15 reputation to vote this answer up but I do make it green. Is it the right way to accept the answer? – elfsummer Apr 07 '14 at 08:45
  • You are linking to objects or libraries compiled with a newer Intel Fortran that uses that symbol. Recompile ALL your Fortran sources. – Steve Lionel Apr 07 '14 at 23:07
  • Yes, Steve. I recompiled everything and then there is no such problem. – elfsummer Apr 08 '14 at 00:45