Compiling and running ROMS/TOMS 2.1 with ifort 8.1

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
lanerolle
Posts: 157
Joined: Mon Apr 28, 2003 5:12 pm
Location: NOAA

Compiling and running ROMS/TOMS 2.1 with ifort 8.1

#1 Post by lanerolle » Mon Jun 27, 2005 5:25 pm

I have successfully compiled ROMS/TOMS 2.1 (the latest version with all the updates, etc.) using ifort but when I run it, I get a "Segmentation fault" in pre_step_tile. It occurs due to the statement :

real(r8), dimension(PRIVATE_2D_SCRATCH_ARRAY,0:N(ng)) :: swdk

I suspect that similar statements occurring in other routines too will give this error but the first instance of this statement occurs in pre_step_tile.

I tried the following experiments and all of them gave "Segmentation fault"s:

(1) real(r8), dimension(PRIVATE_2D_SCRATCH_ARRAY,N(ng)) :: swdk
(2) real(r8), dimension(PRIVATE_2D_SCRATCH_ARRAY,0:30) :: swdk
(3) real(r8), dimension(PRIVATE_2D_SCRATCH_ARRAY,30) :: swdk
(4) real(r8), dimension(-3:303 -3:303,0:N(ng)) :: swdk
(5) real(r8), dimension(-3:303 -3:303,N(ng)) :: swdk
(6) real(r8), dimension(PRIVATE_3D_SCRATCH_ARRAY) :: swdk where
in globaldefs.h, I put the statement:

#define PRIVATE_3D_SCRATCH_ARRAY Istr-3:Iend+3,Jstr-3:Jend+3,0:N(ng).

However, the following statements do not give the error:

(7) real(r8), dimension(PRIVATE_2D_SCRATCH_ARRAY) :: swdk
(8) real(r8), dimension(PRIVATE_1D_SCRATCH_ARRAY,0:N(ng)) :: swdk
(9) real(r8), dimension(-3:303 -3:303,0:30) :: swdk
(10) real(r8), dimension(-3:303 -3:303,30) :: swdk

I am particularly puzzled as to why (8) works properly! All that I did in (4), (5), (9), (10) was to substitute some numbers which were bigger than the dimensions of my grid.

The relevant lines from my Makefile are (I am being excessively strict):

CFT = ifort -pc80
CPPFLAGS = -P -DLINUX -DSERIAL -I$(NETCDF_INCDIR)
CPP = /lib/cpp -traditional

FFLAGS = -g -check -traceback -u -O0
MDEPFLAGS = --cpp --fext=f90 --file=-

I also compiled the NetCDF library with ifort using its source code.

Does anybody know how I can get round this problem? The ifc compiler does not appear to give these errors.

Thank you.

Post Reply