[petsc-users] Possible PETSc Linking Problem

Barry Smith bsmith at mcs.anl.gov
Wed Aug 8 16:07:03 CDT 2012


  The MPI was dropped from the name of each of those "missing" functions; since on one process they are not MPI. See http://www.mcs.anl.gov/petsc/documentation/changes/33.html

   Barry

On Aug 8, 2012, at 4:01 PM, Peter Zhoujie Lu <lzj at umich.edu> wrote:

> Hi everyone,
> 
> I has some issue when I try to compile our own code that uses PETSc. Here is the error message. After some googling, it looks like a linking problem to PETSc. The PETSc compiled and tested without problem. In the makefile, the PETSc linker flags was obtained from PETSC_DIR:
> 
> include ${PETSC_DIR}/conf/variables
> PETSC_INCLUDE_FLAGS=${PETSC_CC_INCLUDES} -I$(PETSC_DIR)
> PETSC_LINKER_FLAGS=${PETSC_LIB}
> 
> I am using OSX 10.7.4 with gcc(4.8) and PETSc-3.2-p2. The same code was compiled on Linux with both intel and gfortran compilers without problem.
> I am not 100% sure the issue is due to PETSc... Any suggestions are welcomed. Thanks in advance.
> 
> Peter
> 
> Error message:
> 
> mpif90 SUmb.o SUmb_fortran.o -L../../externals/SU_MPI/lib -L../../externals/ADT/lib -L../../lib -lsumb -lsumb_pyfort  -ladt -lsu_mpi   -L/usr/X11R6/lib -lX11 -L/usr/local/lib/gcc/x86_64-apple-darwin11.4.0/4.8.0 -L/usr/local/lib -ldl -lmpi_f90 -lmpi_f77 -lgfortran -lgfortran -lquadmath -lm -lm -lmpi_cxx -lstdc++ -lmpi -lopen-rte -lopen-pal -lutil -lSystem -lgcc_ext.10.5 -ldl -L/Users/lvzhoujie/Work/cgns/lib -lcgns -L/Users/lvzhoujie/Work/petsc-3.3-p2/linux-ifort-opt/lib -lpetsc -lmpi -lsuperlu_dist_3.0 -lflapack -lfblas -lmca_common_sm -o ../../bin/SUmb_mac_gfortran_openmpi
> 
> Undefined symbols for architecture x86_64:
>   "_matcreatempidense_", referenced from:
>       _createextrapetscvars_ in libsumb.a(createExtraPETScVars.o)
>   "_matcreatempiaij_", referenced from:
>       _createstatepetscvars_ in libsumb.a(createStatePETScVars.o)
>       _createspatialpetscvars_ in libsumb.a(createSpatialPETScVars.o)
>       _createcouplingpetscvars_ in libsumb.a(createCouplingPETScVars.o)
>   "_matcreatempibaij_", referenced from:
>       _createstatepetscvars_ in libsumb.a(createStatePETScVars.o)
>       _setupnksolver_ in libsumb.a(setupNKSolver.o)
> ld: symbol(s) not found for architecture x86_64
> collect2: error: ld returned 1 exit status



More information about the petsc-users mailing list