[petsc-users] Issue with the installation of Petsc

Satish Balay balay at mcs.anl.gov
Mon Apr 6 13:13:01 CDT 2020


>>>>>>>
Executing: /home/martinelli/repositories/petsc/arch-linux-c-opt/bin/mpif90  -o /tmp/petsc-nazwq29o/config.setCompilers/conftest    /tmp/petsc-nazwq29o/config.setCompilers/conftest.o

ERROR while running executable: Could not execute "['/tmp/petsc-nazwq29o/config.setCompilers/conftest']":
/tmp/petsc-nazwq29o/config.setCompilers/conftest: symbol lookup error: /home/martinelli/repositories/petsc/arch-linux-c-opt//lib/libmpifort.so.12: undefined symbol: MPIR_F_NeedInit
<<<<<<


Ok - its the same issue that you've got when using --with-batch.

> > > 18943:libmpi.so:000000000031ab00 D MPIR_F_NeedInit
> > > 27046:libmpich.so:000000000031ab00 D MPIR_F_NeedInit

The 'nm' output below does show that the symbol is in 'libmpich.so' and 'libmpi.so'

What do you have for:

/home/martinelli/repositories/petsc/arch-linux-c-opt/bin/mpif90 -show

If libmpi.so is listed in the link like - then the compiler for some reason isn't resolving this symbol.

You can try using --download-openmpi - or building mpich manually [without some of the additional optimization flags] - and see if that works.

BTW: I tried this exact same build with 'gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1)' on 'Intel(R) Core(TM) i7-8700 CPU @ 3.20GH' and don't see this issue.

Configure Options: --configModules=PETSc.Configure --optionsModule=config.compilerOptions --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack --with-mpi=1 --download-superlu_dist --download-mumps --download-hypre --with-debugging=0 COPTFLAGS="-O3 -march=native -mtune=native" CXXOPTFLAGS="-O3 -march=native -mtune=native" FOPTFLAGS="-O3 -march=native -mtune=native" --download-scalapack

Satish

On Mon, 6 Apr 2020, Franco Dassi wrote:

> Dear all,
> 
> Thank you for your quick answer. Here you are the .log file
> 
> franco
> 
> Il giorno lun 6 apr 2020 alle ore 16:09 Satish Balay <balay at mcs.anl.gov> ha
> scritto:
> 
> > Can you send configure.log from the first build attempt?
> >
> > Satish
> >
> > On Mon, 6 Apr 2020, Franco Dassi wrote:
> >
> > > Good morning,
> > >
> > > We are using your Petsc library to solve linear systems coming from PDEs.
> > >
> > > However recently we are trying to install PETSC (maint branch) on a linux
> > > system but we have some issues.
> > >
> > > On the one hand, when we use the following configure command
> > >
> > > ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran
> > > --download-mpich --download-fblaslapack --with-mpi=1
> > > --download-superlu_dist --download-mumps --download-hypre
> > > --with-debugging=0 COPTFLAGS='-O3 -march=native -mtune=native'
> > > CXXOPTFLAGS='-O3 -march=native -mtune=native' FOPTFLAGS='-O3
> > > -march=native -mtune=native' --download-scalapack
> > >
> > >
> > > I obtain the following error:
> > >
> > >
> > ===============================================================================
> > >              Configuring PETSc to compile on your system
> > >
> > >
> > ===============================================================================
> > > TESTING: checkFortranCompiler from
> > > config.setCompilers(config/BuildSystem/config/setCompilers.py:989)
> > >
> > >
> > *******************************************************************************
> > >                     OSError while running ./configure
> > >
> > -------------------------------------------------------------------------------
> > > Cannot run executables created with FC. If this machine uses a batch
> > system
> > > to submit jobs you will need to configure using ./configure with the
> > > additional option  --with-batch.
> > >  Otherwise there is problem with the compilers. Can you compile and run
> > > code with your compiler
> > > '/home/gurst/repositories/petsc/arch-linux-c-opt/bin/mpif90'?
> > >
> > *******************************************************************************
> > >
> > >
> > > On the other hand if we add the --with-batch the library is compiled, but
> > > when we try to use it to run the code we obtain the following error (at
> > run
> > > time):
> > >
> > > ./testGBDForMixed3d: symbol lookup error:
> > >
> > /home/martinelli/repositories/petsc/arch-linux-c-opt//lib/libmpifort.so.12:
> > > undefined symbol: MPIR_F_NeedInit
> > >
> > >
> > > Looking the symbols table in the petsc/arch-linux-c-opt/lib directory,
> > > It seems that something is undefined:
> > >
> > > ~/repositories/petsc/arch-linux-c-opt/lib $ nm -A *.so | grep -n
> > > MPIR_F_NeedInit
> > >
> > > 12591:libfmpich.so:                 U MPIR_F_NeedInit
> > > 18943:libmpi.so:000000000031ab00 D MPIR_F_NeedInit
> > > 27046:libmpich.so:000000000031ab00 D MPIR_F_NeedInit
> > > 34565:libmpichf90.so:                 U MPIR_F_NeedInit
> > > 40333:libmpifort.so:                 U MPIR_F_NeedInit
> > > 46685:libmpl.so:000000000031ab00 D MPIR_F_NeedInit
> > > 54788:libopa.so:000000000031ab00 D MPIR_F_NeedInit
> > >
> > > Are we  doing something wrong?
> > >
> > > Thank you in advance for your time
> > > best
> > > Massimiliano and Franco
> > >
> >
> >
> 



More information about the petsc-users mailing list