Hello Everyone,
I am trying to compile ROMS and since my netCDF4 was built with gfortran i tried to use it to compile ROMS, but I get the following error. Dose anyone has any idea how to solve this?
exchange_2d.f90: In function 'exchange_v2d_tile':
exchange_2d.f90:217: internal compiler error: Segmentation fault
Platform: Linux Red Hat 5
NetCDF v : 4.1.1
Since ROMS should be compiled with the same compiler that was used to built netCDF libraries i would like to ask if there is any specific disadvantage to using gfortran instead of ifort?
The error message is also attached.
Thank you,
Kamila Wisniewska
Error while compiling ROMS - gfortran
-
- Posts: 8
- Joined: Tue Feb 01, 2011 7:04 pm
- Location: LMAR, Hunter College, CUNY
Error while compiling ROMS - gfortran
- Attachments
-
- Roms_gfortran_error.txt
- (10.02 KiB) Downloaded 290 times
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: Error while compiling ROMS - gfortran
The only significant disadvantage in using GFortran instead of Intel Fortran, in my opinion, is in the area of run-time performance, rather than ability to compile the code. I regularly use Gfortran, amongst other compilers. I have run into problems & glitches with all of them, but I wouldn't say Gfortran is particularly troublesome.
Your compiler problem is possibly triggered by something wrong with the code that's been produced by the preprocessor, so your first step should be to look at line 217 of exchange_2d.f90. (That said, a compiler should never crash on bad code, and the fact that it has indicates a bug.)
I note that the options "-g -fbounds-check" are being passed to the compiler, which means you are defining the macro USE_DEBUG in the make file. What happens if you disable this?
What version of gfortran are you using by the way? You can establish this with the command
Perhaps you have an old version. I am using 4.1.2 (Jan 2007) and 4.3.4 (Aug 2009) regularly.
Your compiler problem is possibly triggered by something wrong with the code that's been produced by the preprocessor, so your first step should be to look at line 217 of exchange_2d.f90. (That said, a compiler should never crash on bad code, and the fact that it has indicates a bug.)
I note that the options "-g -fbounds-check" are being passed to the compiler, which means you are defining the macro USE_DEBUG in the make file. What happens if you disable this?
What version of gfortran are you using by the way? You can establish this with the command
Code: Select all
/usr/local/bin/gfortran -v
-
- Posts: 8
- Joined: Tue Feb 01, 2011 7:04 pm
- Location: LMAR, Hunter College, CUNY
Re: Error while compiling ROMS - gfortran
Hi,
Thank you for the response.
The gfortran version installed on my machine is gcc version 4.0.0 20041201 (experimental).
I'll try to compile it without USE_DEBUG and update the gfortran compiler.
Kamila
Thank you for the response.
The gfortran version installed on my machine is gcc version 4.0.0 20041201 (experimental).
I'll try to compile it without USE_DEBUG and update the gfortran compiler.
Kamila
- m.hadfield
- Posts: 521
- Joined: Tue Jul 01, 2003 4:12 am
- Location: NIWA
Re: Error while compiling ROMS - gfortran
That's old. I'm sure that's the problem. According to my records, Gfortran wouldn't compile ROMS 2.x/3.x successfully until some time in late 2005. Don't bother fiddling with USE_DEBUG.KamilaWisniewska wrote:Hi,
Thank you for the response.
The gfortran version installed on my machine is gcc version 4.0.0 20041201 (experimental).
I'll try to compile it without USE_DEBUG and update the gfortran compiler.
Kamila
Updating the Gfortran compiler to anything recent will require rebuilding the netCDF library, as there have been a few changes in the Fortran 90 module (.mod) file format since 2004. So if you're considering trying Intel Fortran, then your path of least resistance might be to use that and build netCDF with it. And it generates faster code. Your call.
But I can reassure you that recent versions of Gfortran can generally be used to build ROMS with no dramas.