[petsc-users] How to understand these error messages

Barry Smith bsmith at mcs.anl.gov
Sun Jun 23 23:05:32 CDT 2013


On Jun 23, 2013, at 10:35 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Fande Kong <fd.kong at siat.ac.cn> writes:
> 
>> When I switch to gnu compiler, I can not install petsc, I got the following
>> errors:
> 
> Looks like an environment problem:
> 
>         Possible ERROR while running linker: /glade/p/work/fandek/petsc/arch-linux2-cxx-opt_gnu/lib/libexodus.a(ex_err.o): In function `ex_err':
>         ex_err.c:(.text+0xbc): undefined reference to `__intel_sse2_strcpy'
>         ex_err.c:(.text+0xe3): undefined reference to `__intel_sse2_strcpy'
>         /glade/p/work/fandek/petsc/arch-linux2-cxx-opt_gnu/lib/libexodus.a(ex_utils.o): In function `ex_put_names_internal':
>         ex_utils.c:(.text+0x247): undefined reference to `__intel_sse2_strlen'
>         ex_utils.c:(.text+0x292): undefined reference to `__intel_sse2_strlen'
> 
> Did you load the wrong modules?

   Fande,

     The error you got listed below can happen when some of the code is compiled with the Intel compilers (which insert those funky symbols)  but then linked with GNU which doesn't know about those symbols since they are hidden away inside the Intel compiler libraries.

   ex_err.c:(.text+0xbc): undefined reference to `__intel_sse2_strcpy'
ex_err.c:(.text+0xe3): undefined reference to `__intel_sse2_strcpy'
/glade/p/work/fandek/petsc/arch-linux2-cxx-opt_gnu/lib/libexodus.a(ex_utils.o): In function `ex_put_names_internal':
ex_utils.c:(.text+0x247): undefined reference to `__intel_sse2_strlen'
ex_utils.c:(.text+0x292): undefined reference to `__intel_sse2_strlen'

   Looking closer at the configure output I see 

sh: cd /glade/p/work/fandek/petsc/externalpackages/exodus-5.24/exodus && make -f Makefile.standalone libexodus.a RANLIB="/usr/bin/ranlib" AR="/usr/bin/ar cr" NETCDF="/glade/p/work/fandek/petsc/arch-linux2-cxx-opt_gnu" CC="mpicc" CCOPTIONS=" -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -O  -DADDC_ " FC="mpif90" F77OPTIONS=" -fPIC -Wall -Wno-unused-variable -Wno-unused-dummy-argument -O  "
Executing: cd /glade/p/work/fandek/petsc/externalpackages/exodus-5.24/exodus && make -f Makefile.standalone libexodus.a RANLIB="/usr/bin/ranlib" AR="/usr/bin/ar cr" NETCDF="/glade/p/work/fandek/petsc/arch-linux2-cxx-opt_gnu" CC="mpicc" CCOPTIONS=" -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -O  -DADDC_ " FC="mpif90" F77OPTIONS=" -fPIC -Wall -Wno-unused-variable -Wno-unused-dummy-argument -O  "
sh: echo "making exodus in cbind/src"
making exodus in cbind/src
(cd cbind/src &&  make  -f Makefile.standalone "AR=/usr/bin/ar cr" "CC=mpicc" "CFLAGS=-O2 -fPIC -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -O  -DADDC_  -DVERBOSE -I../../cbind/include -I../../forbind/include -I/glade/p/work/fandek/petsc/arch-linux2-cxx-opt_gnu/include " "RANLIB=/usr/bin/ranlib" libexodus.a)
make[1]: Entering directory `/glade/p/work/fandek/petsc/externalpackages/exodus-5.24/exodus/cbind/src'
make[1]: `libexodus.a' is up to date.
make[1]: Leaving directory `/glade/p/work/fandek/petsc/externalpackages/exodus-5.24/exodus/cbind/src'
cp cbind/src/libexodus.a .
/usr/bin/ranlib libexodus.a

it is NOT actually recompiling the libraries so the old library (compiled with Intel) is just reused resulting in the problem.

Please do the following, rm -rf petsc/externalpackages/exodus-5.24 and then run the configure again and it should go through. 

   Barryt





More information about the petsc-users mailing list