[petsc-users] Error with file linking

Wee-Beng TAY zonexo at gmail.com
Tue May 11 20:09:17 CDT 2010


Hi,

my code works fine with petsc-3.0. However I have problem linking when 
using petsc3.1. I used the same linking command as that given by make 
ex1f, which is :

/app1/mvapich/current/bin/mpif90 -r8 -w95 -fPIC -g -O3 -o a.out global.o 
grid.o flux_area.o bc.o bc_impl.o bc_semi.o set_matrix.o inter_step.o 
mom_disz.o poisson.o petsc_sub.o cell_data.o fractional.o ns2d_c.o 
-Wl,-rpath,/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib 
-L/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib -lpetsc   
-Wl,-rpath,/home/svu/g0306332/lib/hypre-2.6.0b_atlas5/lib 
-L/home/svu/g0306332/lib/hypre-2.6.0b_atlas5/lib -lHYPRE -lmpichcxx 
-lstdc++ -Wl,-rpath,/app1/intel/mkl/10.0.5.025/lib/em64t 
-L/app1/intel/mkl/10.0.5.025/lib/em64t -lmkl_lapack -lmkl -lguide 
-lpthread -L/app1/mvapich2/1.4/lib 
-L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -ldl -lmpich -lpthread -lrdmacm 
-libverbs -libumad -lrt -lgcc_s -lmpichf90 
-L/app1/intel/Compiler/11.0/074/lib/intel64 -lifport -lifcore -limf 
-lsvml -lm -lipgo -lirc -lirc_s -lm -lmpichcxx -lstdc++ -lmpichcxx 
-lstdc++ -ldl -lmpich -lpthread -lrdmacm -libverbs -libumad -lrt -lgcc_s 
-ldl

The compiling command is:

/app1/mvapich/current/bin/mpif90 -r8 -132 -fPIC -g -w90 -w -w95 -c -O3  
    -I/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/include 
-I/home/svu/g0306332/codes/petsc-3.1-p0/include 
-I/home/svu/g0306332/lib/hypre-2.6.0b_atlas5/include 
-I/app1/mvapich2/1.4/include -I/app1/mvapich2/current/include   
-I/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/include 
-I/home/svu/g0306332/lib/hypre-2.6.0b_atlas5/include 
-I/app1/mvapich2/1.4/include -I/app1/mvapich2/current/include

The error msgs are:

/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(mpinit.o): 
In function `PetscOpenMPSpawn':
/home/svu/g0306332/codes/petsc-3.1-p0/src/sys/objects/mpinit.c:72: 
undefined reference to `MPI_Comm_get_parent'
/home/svu/g0306332/codes/petsc-3.1-p0/src/sys/objects/mpinit.c:79: 
undefined reference to `MPI_Comm_spawn'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(gr2.o): 
In function `DAArrayMPIIO':
/home/svu/g0306332/codes/petsc-3.1-p0/src/dm/da/src/gr2.c:482: undefined 
reference to `MPI_Type_get_extent'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(binv.o): 
In function `PetscViewerBinaryMPIIO':
/home/svu/g0306332/codes/petsc-3.1-p0/src/sys/viewer/impls/binary/binv.c:563: 
undefined reference to `MPI_Type_get_extent'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterDestroy_PtoP':
/home/svu/g0306332/codes/petsc-3.1-p0/src/vec/vec/utils/vpscat.c:169: 
undefined reference to `MPI_Win_free'
/home/svu/g0306332/codes/petsc-3.1-p0/src/vec/vec/utils/vpscat.c:170: 
undefined reference to `MPI_Win_free'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_1':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterCreateCommon_PtoS':
/home/svu/g0306332/codes/petsc-3.1-p0/src/vec/vec/utils/vpscat.c:1896: 
undefined reference to `MPI_Win_create'
/home/svu/g0306332/codes/petsc-3.1-p0/src/vec/vec/utils/vpscat.c:1909: 
undefined reference to `MPI_Win_create'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_12':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_8':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_7':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_6':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_5':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_4':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_3':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vpscat.o): 
In function `VecScatterBegin_2':
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:64: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:67: 
undefined reference to `MPI_Put'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:69: 
undefined reference to `MPI_Win_fence'
/home/svu/g0306332/codes/petsc-3.1-p0/include/../src/vec/vec/utils/vpscat.h:52: 
undefined reference to `MPI_Alltoallw'
/home/svu/g0306332/codes/petsc-3.1-p0/atlas5-mpi-nodebug/lib/libpetsc.a(vecio.o): 
In function `VecLoad_Binary':
/home/svu/g0306332/codes/petsc-3.1-p0/src/vec/vec/utils/vecio.c:276: 
undefined reference to `MPI_Type_get_extent'

May I know what's wrong?

-- 
Thank you very much and have a nice day!

Yours sincerely,

Wee-Beng Tay



More information about the petsc-users mailing list