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

undefined reference to `_intel_fast_memcpy'

alexvader
Beginner
8,968 Views
Hi Forum

I have been trying to compile MBDyn ( a multibody Dynamics analysis package ) as well as Dakota, http://www.cs.sandia.gov/DAKOTA/index.html

with Intel development tools.

I have version 11.1046 of icc, ifort and mkl.

I export CC=icc, and FC=ifort, and configure the packages;

Only when i make, this strange mistake pops out...


./.libs/libmbwrap.a(colamd.o): In function `mbdyn_symamd':
/home/alex/Desktop/FEA/mbdyn/src/mbdyn-1.3.7/libraries/libcolamd/colamd.c:1271: undefined reference to `_intel_fast_memcpy'
/home/alex/Desktop/FEA/mbdyn/src/mbdyn-1.3.7/libraries/libcolamd/colamd.c:1350: undefined reference to `_intel_fast_memcpy'
./.libs/libmbwrap.a(mthrdslv.o): In function `naivfct':
/home/alex/Desktop/FEA/mbdyn/src/mbdyn-1.3.7/libraries/libnaive/mthrdslv.c:95: undefined reference to `_intel_fast_memset'
collect2: ld returned 1 exit status
make[2]: *** [wraptest] Error 1
make[2]: Leaving directory `/home/alex/Desktop/FEA/mbdyn/src/mbdyn-1.3.7/libraries/libmbwrap'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/Desktop/FEA/mbdyn/src/mbdyn-1.3.7/libraries'
make: *** [all-recursive] Error 1


My Intel Dev installation is fuctional, and has already compiled Code Aster and calculix ( both Finite Elements analysis packages)...

Could somebody point what should i do to build MBdyn ( and Dakota ) ...?

I use a debian lenny Stable amd64

BRGDS


Alex
0 Kudos
6 Replies
TimP
Honored Contributor III
8,967 Views
This can hardly be called strange. You have used icc to make .o files, but apparently not for your link step. Apparently, you haven't specified the ifort or icc run time libraries, as linking with icc or ifort would do. You would have to show how you have set up the link command, if you have looked at it and don't see how to fix it.
0 Kudos
alexvader
Beginner
8,967 Views
Quoting - tim18
This can hardly be called strange. You have used icc to make .o files, but apparently not for your link step. Apparently, you haven't specified the ifort or icc run time libraries, as linking with icc or ifort would do. You would have to show how you have set up the link command, if you have looked at it and don't see how to fix it.
Hi Tim18

Thanks for your reply, my setup is the following :

alex@iskandhar:~/Desktop/Dakota$ export CC=icc
alex@iskandhar:~/Desktop/Dakota$ export FC=ifort
alex@iskandhar:~/Desktop/Dakota$ ./configure --prefix=/home/alex/Desktop/targ --without-graphics

...................................................


alex@iskandhar:~/Desktop/Dakota$make


..................................................


... ends up like this...


-Wl,--rpath -Wl,/home/alex/OpenFOAM/ThirdParty-1.6.x/gcc-4.3.3/platforms/linux64/lib64 -Wl,--rpath -Wl,/home/alex/OpenFOAM/ThirdParty-1.6.x/gcc-4.3.3/platforms/linux64/lib64
/home/alex/Desktop/Dakota/methods/acro/lib/lib3po.a(cobyla.o): In function `cobylb':
cobyla2c/cobyla.c:(.text+0xab0): undefined reference to `_intel_fast_memcpy'
cobyla2c/cobyla.c:(.text+0x235b): undefined reference to `_intel_fast_memcpy'
cobyla2c/cobyla.c:(.text+0x36e2): undefined reference to `_intel_fast_memcpy'
/home/alex/Desktop/Dakota/methods/acro/lib/lib3po.a(cobyla.o): In function `trstlp':
cobyla2c/cobyla.c:(.text+0x3f55): undefined reference to `_intel_fast_memset'
cobyla2c/cobyla.c:(.text+0x4e14): undefined reference to `_intel_fast_memcpy'
collect2: ld returned 1 exit status
make[7]: *** [show_options] Error 1
make[7]: Leaving directory `/home/alex/Desktop/Dakota/methods/acro/packages/coliny/src'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/home/alex/Desktop/Dakota/methods/acro/packages/coliny/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/alex/Desktop/Dakota/methods/acro/packages/coliny'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/alex/Desktop/Dakota/methods/acro/packages'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/alex/Desktop/Dakota/methods/acro'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/alex/Desktop/Dakota/methods'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alex/Desktop/Dakota'
make: *** [all] Error 2


Can you tell me how should i specify the linking to be made by icc... ?

Thanks in advance

Alex
0 Kudos
TimP
Honored Contributor III
8,966 Views
Please examine the link command, if you don't want to show it. It probably doesn't use icc or ifort, which would specify required libraries. If you want to use ld directly, you will need to specify the libraries in LDFLAGS, but this might involve some checking in the library directories provided by ifort and icc to see which ones you need.
You should be using the environment script provided with icc and ifort to set up their library paths, rather than relying on putting them in the Makefile, and those paths should be set up before you attempt to generate this automatically built Makefile. The configure may be too complicated to deal with on this forum.
0 Kudos
Pierangelo_Masarati
8,966 Views
Quoting - alexvader
Thanks for your reply, my setup is the following :

alex@iskandhar:~/Desktop/Dakota$ export CC=icc
alex@iskandhar:~/Desktop/Dakota$ export FC=ifort
alex@iskandhar:~/Desktop/Dakota$ ./configure --prefix=/home/alex/Desktop/targ --without-graphics

Hi. I'm the main developer of MBDyn. Since the software is mostly C++, you also need to export CXX=icc. Whatever you set for CXX will do the linking, which probably answers Tim's question. I guess the same is true for Dakota.

Cheers, p.
0 Kudos
TimP
Honored Contributor III
8,966 Views

Hi. I'm the main developer of MBDyn. Since the software is mostly C++, you also need to export CXX=icc. Whatever you set for CXX will do the linking, which probably answers Tim's question. I guess the same is true for Dakota.

Cheers, p.
More likely, CXX=icpc, in case C++ libraries are required.
0 Kudos
Pierangelo_Masarati
8,966 Views
Quoting - tim18
More likely, CXX=icpc, in case C++ libraries are required.
Correct, sorry for the typo. I haven't built MBDyn with Intel's compilers for a while; as far as I remember, the cleanest solution consisted in first populating the environment using the scripts shipping with the compilers, and letting configure take care of the rest. I'll re-check shortly, after upgrading.

Cheers, p.
0 Kudos
Reply