[petsc-users] undefined symbol: mpi_init_

Antonio Trande anto.trande at gmail.com
Mon Jun 27 09:55:53 CDT 2016


On 06/26/2016 11:25 PM, Satish Balay wrote:
> On Sun, 26 Jun 2016, Antonio Trande wrote:
>>>>
>>>> No, tests not passed with
>>>>
>>>> [0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation,
>>>> probably memory access out of range
>>>>
>>>> This is a build log from Fedora 24 64 bit:
>>>> https://copr-be.cloud.fedoraproject.org/results/sagitter/petsc/fedora-24-x86_64/00362535-petsc/build.log.gz
>>>
>>>>>>>>>>>
>>> + echo 'Patch #1 (petsc-lib64.patch):'
>>> + /usr/bin/patch -p0 --fuzz=0
>>> patching file config/BuildSystem/config/setCompilers.py
>>> patching file gmakefile
>>>
>>> Patch #0 (petsc-3.7-no-rpath.patch):
>>> + /usr/bin/patch -p0 --fuzz=0
>>> patching file config/BuildSystem/config/setCompilers.py
>>> <<<<<<<<<<<
>>>
>>> Well looks like there were some modifications done to get the 'multi-variant' build working.
>>
>> Yes.
>>
>>>
>>>>>>>>>>>>>
>>> + make test -C petsc-3.7.2
>>> make: Entering directory '/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2'
>>> Running test examples to verify correct installation
>>> Using PETSC_DIR=/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2 and PETSC_ARCH=x86_64
>>> *******************Error detected during compile or link!*******************
>>> See http://www.mcs.anl.gov/petsc/documentation/faq.html
>>> /builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2/src/snes/examples/tutorials ex19
>>> *********************************************************************************
>>> gcc -o ex19.o -c -O2 -fPIC  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fopenmp   -I/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2/include -I/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2/x86_64/include -I/usr/include -I/usr/include/suitesparse -I/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2/include/petsc/mpiuni    `pwd`/ex19.c
>>> gcc -Wl,-z,relro  -O2 -fPIC  -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fopenmp  -o ex19  ex19.o -L/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2/x86_64/lib -L/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2/x86_64/lib  -lpetsc -lmetis -L/usr/lib64 -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -llapack -lblas -lOpenCL -lhwloc -lpapi -lgmp -lpthread -ljpeg -lpng -lm -L/usr/lib/gcc/x86_64-redhat-linux/6.1.1 -lgfortran -lm -lgfortran -lm -lquadmath -lm -lstdc++ -L/usr/lib/gcc/x86_64-redhat-linux/6.1.1 -ldl -lgcc_s -ldl 
>>> /usr/bin/rm -f ex19.o
>>> Possible error running C/C++ src/snes/examples/tutorials/ex19 with 1 MPI process
>>> See http://www.mcs.anl.gov/petsc/documentation/faq.html
>>> [0]PETSC ERROR: #1 PetscLogInitialize() line 219 in /builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2/src/sys/logging/plog.c
>>> [0]PETSC ERROR: #2 PetscInitialize() line 891 in /builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2/src/sys/objects/pinit.c
>>> /usr/bin/sh: line 13: 16933 Aborted                 (core dumped)
>>> <<<<<<<<<<
>>>
>>> So there is no -rpath here. Which -lpetsc variant is getting used at runtime?
>>>
>>
>> Yes, no rpaths for the serial libraries, so 'libpetsc.so' and
>> 'libpetsc64.so' (renamed for mine needs).
>>
>> Test reported is for PETSc (32 bit integer) serial library: libpetsc.so
> 
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 
> 
> + mkdir -p /builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/lib64 /builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/share/petsc /builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/include/petsc
> + mkdir -p /builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/lib64/gfortran/modules/petsc-3.7.2 /builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/share/Modules/modulefiles
> + install -pm 755 x86_64/lib/libpetsc.so x86_64/lib/libpetsc.so.3.7 x86_64/lib/libpetsc.so.3.7.2 /builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/lib64
> 
> + umask 022
> + cd /builddir/build/BUILD
> + cd petsc-3.7.2
> + export LD_LIBRARY_PATH=/usr/lib64:/builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/lib64
> + LD_LIBRARY_PATH=/usr/lib64:/builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/lib64
> + export PETSC_DIR=/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2
> + PETSC_DIR=/builddir/build/BUILD/petsc-3.7.2/petsc-3.7.2
> + export PETSC_ARCH=x86_64
> + PETSC_ARCH=x86_64
> + make test -C petsc-3.7.2
> 
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> 
> Ok - I see libpetsc.so is copied over to
> /builddir/build/BUILDROOT/petsc-3.7.2-2.fc24.x86_64/usr/lib64.  And
> this path is set in LD_LIBRARY_PATH - so the correct -lpetsc should be
> found at runtime for 'make test'
> 
> I attempted to do a build similar to what done here.
> 
>>>>>>>>>>>>>>>>>>>>
> $ cat x86_64.py 
> #!/usr/bin/python
> if __name__ == '__main__':
>   import sys
>   import os
>   sys.path.insert(0, os.path.abspath('config'))
>   import configure
>   configure_options = [
> 
>     '--prefix=/usr',
>     'CFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic',
>     'CXXFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic',
>     'FFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic',
>     'LDFLAGS=-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld',
>     '--with-default-arch=0',
>     '--with-make=1',
>     '--with-single-library=1',
>     '--with-precision=double',
>     '--with-petsc-arch=x86_64',
>     '--with-clanguage=C',
>     '--with-shared-libraries=1',
>     '--with-64-bit-indices=0',
>     '--with-fortran-interfaces=1',
>     '--with-windows-graphics=0',
>     '--CC=gcc',
>     '--CXX=g++',
>     '--FC=gfortran',
>     '--with-gnu-compilers=1',
>     '--with-vendor-compilers=0',
>     '--with-shared-ld=ld',
>     '--with-pic=1',
>     '--sharedLibraryFlags=',
>     '--dynamicLibraryFlags=',
>     '--with-cxx-dialect=',
>     '--with-debugging=0',
>     'COPTFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic',
>     'CXXOPTFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic',
>     'FOPTFLAGS=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -I/usr/lib64/gfortran/modules',
> 
>     '--with-blas-lib=libblas.so',
>     '--with-lapack-lib=liblapack.so',
>     '--with-blas-lapack-suffix=',
>     '--known-64-bit-blas-indices=0',
>     '--with-mpi=0',
>     '--with-mpiuni-fortran-binding=1',
>     '--with-pthread=1',
>     '--with-valgrind=1',
>     '--with-valgrind-dir=/usr',
> 
>   ]
>   configure.petsc_configure(configure_options)
> 
> <<<<<<<<<<<
> $
> 
> But I can't reprodue this error  - with the above build.. The suggestions I have for debugging are:
> 

I have done some tests with a minimal build: the error is confined on
32-bit system.

Which PETSc build options work on architecture ?

Thanks.

-- 
---
Antonio Trande
mailto: sagitter 'at' fedoraproject 'dot' org
http://fedoraos.wordpress.com/
https://fedoraproject.org/wiki/User:Sagitter
GPG Key: 0x6CE6D08A
Check on https://keys.fedoraproject.org/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160627/081b90e0/attachment.pgp>


More information about the petsc-users mailing list