Results 1 to 6 of 6

Thread: gfortran/linking library issue

  1. #1
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default gfortran/linking library issue

    Dear Opensuse users:
    Can anyone clue me in to what this means? I believe it means it can't find some library. It's a gfortran code which compiles on my vanilla OS 12.3x64 box, but throws this error on 13.1x64. Same code, same stuff installed. (couldn't get any hits in google on this one....) Thank You!!

    Code:
    checking apply3d.mod
    compiling TRACERS_DRV.f ... Done
    compiling TRDRYDEP.f ... Done
    compiling TRACER_PRT.f ... Done
    checking bdjlt.mod
    compiling TRDIAG.f ... Done
    ===> linking
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lmpi_f77
    collect2: error: ld returned 1 exit status
    gmake[2]: *** [do_main] Error 1
    gmake[1]: *** [gcm] Error 2
    gmake: *** [gcm] Error 2
    EDIT: I thought it might be helpful to give a more verbose linker dump...
    Code:
    checking aerosol_sources.mod
    gfortran -c -o TRACERS.o -cpp -fconvert=big-endian -O2 -fno-range-check -I/usr/lib64/mpi/gcc/openmpi/include -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/mod  -DMACHINE_Linux -DCOMPILER_G95 -DUSE_MPI -I/usr/lib64/mpi/gcc/openmpi/include -DMPITYPE_LOOKUP_HACK  -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/include -I/usr/lib64/mpi/gcc/openmpi/include   TRACERS.f 
    checking apply3d.mod
    gfortran -c -o TRACERS_DRV.o -cpp -fconvert=big-endian -O2 -fno-range-check -I/usr/lib64/mpi/gcc/openmpi/include -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/mod  -DMACHINE_Linux -DCOMPILER_G95 -DUSE_MPI -I/usr/lib64/mpi/gcc/openmpi/include -DMPITYPE_LOOKUP_HACK  -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/include -I/usr/lib64/mpi/gcc/openmpi/include  -O0 TRACERS_DRV.f 
    gfortran -c -o TRDRYDEP.o -cpp -fconvert=big-endian -O2 -fno-range-check -I/usr/lib64/mpi/gcc/openmpi/include -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/mod  -DMACHINE_Linux -DCOMPILER_G95 -DUSE_MPI -I/usr/lib64/mpi/gcc/openmpi/include -DMPITYPE_LOOKUP_HACK  -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/include -I/usr/lib64/mpi/gcc/openmpi/include   TRDRYDEP.f 
    gfortran -c -o TRACER_PRT.o -cpp -fconvert=big-endian -O2 -fno-range-check -I/usr/lib64/mpi/gcc/openmpi/include -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/mod  -DMACHINE_Linux -DCOMPILER_G95 -DUSE_MPI -I/usr/lib64/mpi/gcc/openmpi/include -DMPITYPE_LOOKUP_HACK  -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/include -I/usr/lib64/mpi/gcc/openmpi/include   TRACER_PRT.f 
    checking bdjlt.mod
    gfortran -c -o TRDIAG.o -cpp -fconvert=big-endian -O2 -fno-range-check -I/usr/lib64/mpi/gcc/openmpi/include -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/mod  -DMACHINE_Linux -DCOMPILER_G95 -DUSE_MPI -I/usr/lib64/mpi/gcc/openmpi/include -DMPITYPE_LOOKUP_HACK  -I/usr/local/netcdf363/include -I/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model/include -I/usr/lib64/mpi/gcc/openmpi/include   TRDIAG.f 
    ===> linking
    gfortran   RES_stratF40.o ORES_1Qx1_L32.o OSTRAITS_1QX1_COM.o DIAG_RES_F.o FFT144.o OFFT288E.o GEOM_B.o DIAG_ZONAL.o GCDIAGb.o DIAG_PRT.o POUT.o IO_DRV.o ATMDYN.o MOMEN2ND.o QUS_DRV.o QUS3D.o STRATDYN.o STRAT_DIAG.o MODEL_COM.o MODELE.o ALLOC_DRV.o ATMDYN_COM.o ATM_UTILS.o QUS_COM.o QUSDEF.o CLOUDS2.o CLOUDS2_DRV.o CLOUDS_COM.o SURFACE.o FLUXES.o GHY_COM.o GHY_DRV.o VEG_DRV.o ENT_DRV.o ENT_COM.o PBL_COM.o PBL_DRV.o PBL.o ATURB.o LAKES_COM.o LAKES.o SEAICE.o SEAICE_DRV.o LANDICE.o LANDICE_DRV.o ICEDYN_DRV.o ICEDYN.o RAD_COM.o RAD_DRV.o RADIATION.o RAD_native_O3_AR5_V2.o RAD_UTILS.o ALBEDO.o READ_AERO.o DIAG_COM.o DIAG.o DEFACC.o ODIAG_COM.o OCEAN_COM.o OGEOM.o OCNDYN.o OCNDYN2.o OCN_Interp.o OSTRAITS.o OCNGM.o OCNKPP.o OCEANR_DIM.o AFLUXES.o OFLUXES.o ODIAG_PRT.o OCNFUNTAB.o OCNQUS.o OCN_Int_LATLON.o TRDUST_COM.o TRDUST.o TRDUST_DRV.o TRACER_COM.o TRACERS_DRV.o TRACERS.o TRDRYDEP.o TRDIAG.o TRDIAG_COM.o TRACER_PRT.o TRACERS_AEROSOLS_Koch_e4.o  SparseCommunicator_mod.o   \
      dd2d/libdd2d.a giss_LSM/libgiss_LSM.a solvers/libsolvers.a ESMF_Interface/libESMF_Interface.a Ent/libEnt.a shared/libshared.a profiler/libprofiler.a  -L/usr/lib64/mpi/gcc/openmpi/lib64 -lmpi_f77 -lmpi -lmpi_cxx -lstdc++ -lrt -L/usr/local/netcdf363/lib64 -lnetcdf -L/usr/local/netcdf363/lib64 -lnetcdf -o E013-NINToPMS.bin  
    /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lmpi_f77
    collect2: error: ld returned 1 exit status
    gmake[2]: *** [do_main] Error 1
    gmake[2]: Leaving directory `/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model'
    gmake[1]: *** [gcm] Error 2
    gmake[1]: Leaving directory `/home/patti/00_GCMs/modelE2_AR5v2_07-18-2014/model'
    gmake: *** [gcm] Error 2
    patti@TYAN4:~/00_GCMs/modelE2_AR5v2_07-18-2014/decks>
    google:
    Your search - -lmpi_f77 - did not match any documents.
    Suggestions:

    • Make sure all words are spelled correctly.
    • Try different keywords.
    • Try more general keywords.

  2. #2
    Join Date
    May 2012
    Location
    Finland
    Posts
    2,004

    Default Re: gfortran/linking library issue

    Do you have openmpi, openmpi-devel and possibly openmpi-devel-static installed?

    Run ldconfig after installing, just in case.
    .: miuku #suse @ irc.freenode.net
    :: miuku@opensuse.org

    .: h​ttps://download.opensuse.org/repositories/home:/Miuku/

  3. #3
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default Re: gfortran/linking library issue

    Hi Miuku - thank you for the check-in. Yes, I always install devel and static (when available). So maybe OpenSuSE changed its openmpi version - they used to compile against all commonly used versions of fortran, but maybe no longer?

    EDIT: well, no, I guess it still supports f77
    Code:
    patti@TYAN4:~/Desktop> mpif77
    gfortran: fatal error: no input files
    compilation terminated.
    patti@TYAN4:~/Desktop>

  4. #4
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default Re: gfortran/linking library issue

    I downloaded and built the latest OpenMPI, and changed system references (by the PATH statement and environment variables) to that build, but get the same error. I'm thinking it might be some recent change in OpenMPI which depricated the -lmpi_f77 library reference. I can't find a library named libmpi_f77.* referenced here:

    http://www.linuxquestions.org/questi...pi_f77-573481/

  5. #5
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default Re: gfortran/linking library issue

    OK, I verified by some system-wide searches that after about 1.6.x of OpenMPI, they changed library references and file names in a way that broke the NASA model I'm using. So I guess I need to download and build openmpi 1.6.x and use that to build this software.

  6. #6
    Join Date
    Jun 2008
    Location
    Prescott, AZ
    Posts
    1,171

    Default Re: gfortran/linking library issue ("fixed")

    Hi Miuku (and everyone) - I wanted to let you know that building OpenMPI 1.6.5 and referencing it in PATH to build my code worked fine. I guess the OpenMPI folks changed things around sans backward compatibility.

    THANKS!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •