[petsc-users] errors in compiling ~\petsc-3.2-p7\src\ksp\ksp\examples\tutorials\ex2f.F

Roc Wang pengxwang at hotmail.com
Mon Mar 19 21:18:07 CDT 2012


Hello,
I am trying to compile the example source code of ~\petsc-3.2-p7\src\ksp\ksp\examples\tutorials\ex2f.F. However the error information shows:
ex2f.o: In function `MAIN__':ex2f.F90:(.text+0x1b): undefined reference to `_gfortran_set_std'ex2f.F90:(.text+0x6f1): undefined reference to `_gfortran_st_write'ex2f.F90:(.text+0x706): undefined reference to `_gfortran_transfer_real'ex2f.F90:(.text+0x71b): undefined reference to `_gfortran_transfer_integer'ex2f.F90:(.text+0x727): undefined reference to `_gfortran_st_write_done'ex2f.F90:(.text+0x773): undefined reference to `_gfortran_st_write'ex2f.F90:(.text+0x788): undefined reference to `_gfortran_transfer_integer'ex2f.F90:(.text+0x794): undefined reference to `_gfortran_st_write_done'ex2f.o: In function `mykspmonitor_':ex2f.F90:(.text+0x896): undefined reference to `_gfortran_st_write'ex2f.F90:(.text+0x8ae): undefined reference to `_gfortran_transfer_integer'ex2f.F90:(.text+0x8ba): undefined reference to `_gfortran_st_write_done'ex2f.F90:(.text+0x924): undefined reference to `_gfortran_st_write'ex2f.F90:(.text+0x93c): undefined reference to `_gfortran_transfer_integer'ex2f.F90:(.text+0x954): undefined reference to `_gfortran_transfer_real'ex2f.F90:(.text+0x960): undefined reference to `_gfortran_st_write_done'make: *** [ex2f] Error 1  
My makefile is like this:
########################################################################PETSC_DIR     =/usr/global/petsc/3.1-p8PETSC_ARCH 	=linux-intel11-debugFFLAGS      = -I${PETSC_DIR}/include -I${PETSC_DIR}/${PETSC_ARCH}/includeLFLAGS = -L${PETSC_DIR}/${PETSC_ARCH}/lib -lpetsc\ 	-L/usr/global/intel/mkl/10.3.1.107/mkl/lib/intel64\ 	-Wl,-R/usr/global/intel/mkl/10.3.1.107/mkl/lib/intel64\ 	-lmkl_solver_lp64_sequential\ 	-Wl,--start-group -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -Wl,--end-group\ 	-lX11

FC          = mpif90BIN         = ex2fOBJS        = ex2f.o

${BIN}:  ${OBJS}	${FC} -o ex2f ${OBJS} ${LFLAGS}
ex2f.o:        ex2f.F90	${FC} -c ${FFLAGS} ex2f.F90
clean:	rm -f ex2f *.o

Should there any more libraries be included in the makefile?  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120319/02ce31b4/attachment.htm>


More information about the petsc-users mailing list