[petsc-users] openmpi/petsc 3.1/gfortran and multiply-defined symbols

Tim Tautges tautges at mcs.anl.gov
Wed Mar 21 14:38:13 CDT 2012


Hi all,
   I'm almost embarrassed to be asking this, but haven't found anything that looks similar in the archives...

I'm compiling fortran code and get:

mpif90 -c -g -ffree-line-length-none -fcray-pointer -DMOAB -fPIC -Wall -Wno-unused-variable -O 
-I/usr/local/petsc-3.1-p8-opt/include -I/usr/local/petsc-3.1-p8-opt/include -I/usr/include/scotch 
-I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib -I/usr/include/spooles -I/usr/include/suitesparse 
-I/usr/local/petsc-3.1-p8-opt/include -I/usr/include/scotch -I/usr/lib/openmpi/include -I/usr/lib/openmpi/lib 
-I/usr/include/spooles -I/usr/include/suitesparse   -I. -I./MeshLibrary/RTelements 
-I/usr/local/hdf5-1.8.8-par-openmpi-gcc/include -I/home/tautges/code/MOABpar/include   -o MeshLibrary/PNTmesh_Import.o 
MeshLibrary/PNTmesh_Import.F90
mpif-mpi-io.h:64.27:
     Included at mpif-config.h:65:
     Included at mpif-common.h:70:
     Included at /usr/lib/openmpi/include/mpif.h:59:
     Included at /usr/local/petsc-3.1-p8-opt/include/finclude/petscsys.h:11:
     Included at /usr/local/petsc-3.1-p8-opt/include/finclude/petsc.h:6:
     Included at MeshLibrary/PNTmesh_Import.F90:16:

       integer MPI_FILE_NULL
                            1
Error: Symbol 'mpi_file_null' at (1) already has basic type of INTEGER


My petsc configure options (as reported in arch/configure.log) are:

Configure Options: --configModules=PETSc.Configure --optionsModule=PETSc.compilerOptions --with-clanguage=C++ 
--with-blas-lapack-dir=/usr/lib --with-mpi-dir=/usr --with-debugging=1 --prefix=/usr/local/petsc-3.1-p8-dbg
Working directory: /home/tautges/linux/petsc-3.1-p8

This is an Ubuntu 10.04 system, synaptic-installed openmpi, gfortran 4.4.3, all pretty standard stuff.  I think the 
problem started showing up when I inserted the "--with-clanguage=C++" in the configure line, expecting that would take 
care of finding the C++ std libs for me (which it did).  Clues?

Thanks.

- tim

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
  phone (gvoice): (608) 354-1459      1500 Engineering Dr.
             fax: (608) 263-4499      Madison, WI 53706



More information about the petsc-users mailing list