Closed phynadia closed 6 years ago
Try using the appropriate library for cross-linking C with Fortran on your system. Alternatively, use mpif90 instead of mpicc as linker in this command. Finally, note that you are getting this error when building the C samples. The library itself and Fortran examples are presumably built correctly and are ready for use.
When I compile my code, it is giving the following errors:
/home/nadia/software/p3dfft/lib/libp3dfft.a(module.o): In function __p3dfft_MOD_p3dfft_get_dims': /home/nadia/software/p3dfft-2.7.5/build/module.F90:177: undefined reference to
_gfortran_st_write'
/home/nadia/software/p3dfft-2.7.5/build/module.F90:177: undefined reference to _gfortran_transfer_character' /home/nadia/software/p3dfft-2.7.5/build/module.F90:177: undefined reference to
_gfortran_st_write_done'
/home/nadia/software/p3dfft/lib/libp3dfft.a(module.o): In function __p3dfft_MOD_p3dfft_get_mpi_info': /home/nadia/software/p3dfft-2.7.5/build/module.F90:235: undefined reference to
_gfortran_st_write'
/home/nadia/software/p3dfft-2.7.5/build/module.F90:235: undefined reference to _gfortran_transfer_character' /home/nadia/software/p3dfft-2.7.5/build/module.F90:235: undefined reference to
_gfortran_st_write_done'
/home/nadia/software/p3dfft/lib/libp3dfft.a(module.o): In function __p3dfft_MOD_init_plan': /home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:54: undefined reference to
_gfortran_st_write'
/home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:54: undefined reference to _gfortran_transfer_character' /home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:54: undefined reference to
_gfortran_transfer_integer'
/home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:54: undefined reference to _gfortran_transfer_character' /home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:54: undefined reference to
_gfortran_st_write_done'
/home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:418: undefined reference to _gfortran_os_error' /home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:60: undefined reference to
_gfortran_runtime_error_at'
/home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:60: undefined reference to _gfortran_runtime_error_at' /home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:60: undefined reference to
_gfortran_runtime_error_at'
/home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:68: undefined reference to _gfortran_runtime_error_at' /home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:63: undefined reference to
_gfortran_runtime_error_at'
/home/nadia/software/p3dfft/lib/libp3dfft.a(module.o):/home/nadia/software/p3dfft-2.7.5/build/init_plan.F90:63: more undefined references to `_gfortran_runtime_error_at' follow
Please provide the full command you use to compile as well as the full output.
I am getting the following error, when I use command 'make'. There is no error during configuration.
Making install in C make[2]: Entering directory
/home/nadia/software/p3dfft-2.7.5/sample/C' mpicc -g -O2 -o test_sine_c.x driver_sine.o ../../build/libp3dfft.a /home/nadia/software/fftw3/lib/libfftw3.a -lgfortran -lmpichf90 /usr/bin/ld: cannot find -lmpichf90 collect2: ld returned 1 exit status make[2]: *** [test_sine_c.x] Error 1 make[2]: Leaving directory
/home/nadia/software/p3dfft-2.7.5/sample/C'