Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Sat Jun 15, 2019 11:49 pm




Post new topic Reply to topic  [ 7 posts ] 

All times are UTC

Author Message
PostPosted: Sat Mar 03, 2018 6:33 am 
Offline

Joined: Wed Sep 27, 2006 7:23 pm
Posts: 32
Location: University of California, Santa Cruz
Hi,

I was trying to compile the code with IS4DVAR, and encountered the following error.

Code:
cd Build; /home/software/pgi/17.3/linux86-64/17.3/bin/pgf90 -c  -O3 master.f90
/home/software/pgi/17.3/linux86-64/17.3/bin/pgf90  -O3  Build/roms_import.o Build/propagator.o Build/master.o Build/roms_export.o Build/ocean_coupler.o Build/esmf_roms.o Build/ocean_control.o -o oceanS Build/libUTIL.a Build/libNLM.a Build/libNLM_bio.a Build/libNLM_sed.a Build/libANA.a Build/libUTIL.a Build/libMODS.a -L/home/pkg/pgi/pgi-packages/pgi-9/netcdf/netcdf-3.6.3/x86_64/lib -lnetcdf
/usr/bin/ld: cannot find /usr/lib/gcc/x86_64-redhat-linux/6.3.1/crtbegin.o: No such file or directory


This system has the following file.
Code:
/usr/lib/gcc/x86_64-redhat-linux/7/crtbegin.o


So I thought that I simply needed to specify the path to crtbegin.o, but I haven't found the place to do it yet.
Could you help me to find the file where I can make change?

Thank you.
Hajoon


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 03, 2018 6:42 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3598
Location: IMS/UAF, USA
Quote:
cd Build; /home/software/pgi/17.3/linux86-64/17.3/bin/pgf90 -c -O3 master.f90
/home/software/pgi/17.3/linux86-64/17.3/bin/pgf90 -O3 Build/roms_import.o Build/propagator.o Build/master.o Build/roms_export.o Build/ocean_coupler.o Build/esmf_roms.o Build/ocean_control.o -o oceanS Build/libUTIL.a Build/libNLM.a Build/libNLM_bio.a Build/libNLM_sed.a Build/libANA.a Build/libUTIL.a Build/libMODS.a -L/home/pkg/pgi/pgi-packages/pgi-9/netcdf/netcdf-3.6.3/x86_64/lib -lnetcdf
/usr/bin/ld: cannot find /usr/lib/gcc/x86_64-redhat-linux/6.3.1/crtbegin.o: No such file or directory
Odd that pgi is looking for a gcc object. Did anything at all get compiled with gfortran or gcc first? I would do a "make clean" then try again. Have you managed to compile the forward model?


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 04, 2018 11:57 am 
Offline

Joined: Wed Sep 27, 2006 7:23 pm
Posts: 32
Location: University of California, Santa Cruz
Thank you, Kate, for taking a look at this problem.

I use the "build.bash" script, so it implicitly does "make clean".

I tried gfortran but got the following error.
Code:
 -lnetcdff -L/home/hajsong/ROMS_564/Lib/ARPACK -lparpack-mpif90 -L/home/hajsong/ROMS_564/Lib/ARPACK -larpack-mpif90
/usr/bin/ld: warning: libgfortran.so.3, needed by /home/software/gcc/6.3.1/pkg/openmpi/2.1.0/lib/libmpi_usempif08.so, not found (try using -rpath or -rpath-link)
/home/hajsong/ROMS_564/Lib/ARPACK/libarpack-mpif90.a(dsteqr.o): In function `.C1_291':
dsteqr.f:(.data+0x50): undefined reference to `pgf90_compiled'
/home/hajsong/ROMS_564/Lib/ARPACK/libarpack-mpif90.a(dswap.o):(.data+0x0): undefined reference to `pgf90_compiled'
/home/hajsong/ROMS_564/Lib/ARPACK/libarpack-mpif90.a(lsame.o):(.data+0x0): undefined reference to `pgf90_compiled'
.
.
.
collect2: error: ld returned 1 exit status
make: *** [Master/Module.mk:22: /home/hajsong/LTERCCE/4dvar/oceanM] Error 1


I can find the following files instead.
Code:
/usr/lib/gcc/x86_64-redhat-linux/7/libgfortran.so
/usr/lib64/libgfortran.so.4


I used to be able to compile the code with the pgi compiler...
Probably this system lost files associated with gcc/6.3.1 after the update...
Is there any way to specify the version of gcc in ROMS?

Thank you.
Hajoon


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 04, 2018 4:56 pm 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3598
Location: IMS/UAF, USA
Quote:
I use the "build.bash" script, so it implicitly does "make clean".
If I were to use build.bash, I would change its default behavior to let "make" work as intended. :roll:

Quote:
/home/hajsong/ROMS_564/Lib/ARPACK/libarpack-mpif90.a(lsame.o):(.data+0x0): undefined reference to `pgf90_compiled'
Well, obviously not everything got cleaned out. Try recompiling arpack with gfortran. Everything, including netcdf-fortran, has to be compiled with the same compiler.


Top
 Profile  
Reply with quote  
PostPosted: Sun Mar 04, 2018 8:22 pm 
Offline

Joined: Wed Sep 27, 2006 7:23 pm
Posts: 32
Location: University of California, Santa Cruz
Thank you, Kate.

Quote:
Well, obviously not everything got cleaned out. Try recompiling arpack with gfortran. Everything, including netcdf-fortran, has to be compiled with the same compiler.


I will discuss with the system manager!


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 05, 2018 2:13 pm 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 3:12 pm
Posts: 121
Location: IMCS, Rutgers University
I'm not positive with newer versions of PGI but with older versions you have to run the makelocalrc script (as root so you'll still need to ask the system manager) every time gcc is upgraded. In your case the system manager logged in as root should be able to run the following:

cd /home/software/pgi/17.3/linux86-64/17.3/bin/
./makelocalrc /home/software/pgi/17.3/linux86-64/17.3

This is almost certainly your problem given that PGI is looking for:

/usr/lib/gcc/x86_64-redhat-linux/6.3.1/crtbegin.o

but you have:

/usr/lib/gcc/x86_64-redhat-linux/7/crtbegin.o


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 06, 2018 7:25 am 
Offline

Joined: Wed Sep 27, 2006 7:23 pm
Posts: 32
Location: University of California, Santa Cruz
Thank you, David!

I will ask the system manager to do what you suggested.

Best,
Hajoon


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group