Cannot run 2D only mode with ROMS3.9 or higher
Cannot run 2D only mode with ROMS3.9 or higher
Hi all,
I installed the newest version of ROMS and tried to run an old case of mine. The model runs OK under 3D mode. However, if undefined SOLVE3D, it reports 'segmentation fault' in the error file. Below is one part from the file
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
romsM 000000000068FA95 Unknown Unknown Unknown
romsM 000000000068D6B7 Unknown Unknown Unknown
romsM 000000000063F3D4 Unknown Unknown Unknown
romsM 000000000063F1E6 Unknown Unknown Unknown
romsM 00000000005F2FD6 Unknown Unknown Unknown
romsM 00000000005F78C0 Unknown Unknown Unknown
libpthread.so.0 00002AAAAC1417E0 Unknown Unknown Unknown
romsM 00000000005A8941 mod_ncparam_mp_in 904 mod_ncparam.f90
romsM 0000000000526527 read_phypar_ 222 read_phypar.f90
romsM 00000000004C9E1F inp_par_mod_mp_in 110 inp_par.f90
romsM 000000000040BB07 ocean_control_mod 95 ocean_control.f90
romsM 000000000040B592 MAIN__ 95 master.f90
romsM 000000000040B41E Unknown Unknown Unknown
libc.so.6 00002AAAAC5F2D20 Unknown Unknown Unknown
romsM 000000000040B329 Unknown Unknown Unknown
The .out file only has 4 lines, telling the version information and running time.
This occurs in ROMS3.9 and 4.0, any lower version for 2D mode works fine.
I also tested the kelvin case between versions, it has the same problem.
Looking for any input,
Thank you,
Yan
I installed the newest version of ROMS and tried to run an old case of mine. The model runs OK under 3D mode. However, if undefined SOLVE3D, it reports 'segmentation fault' in the error file. Below is one part from the file
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
romsM 000000000068FA95 Unknown Unknown Unknown
romsM 000000000068D6B7 Unknown Unknown Unknown
romsM 000000000063F3D4 Unknown Unknown Unknown
romsM 000000000063F1E6 Unknown Unknown Unknown
romsM 00000000005F2FD6 Unknown Unknown Unknown
romsM 00000000005F78C0 Unknown Unknown Unknown
libpthread.so.0 00002AAAAC1417E0 Unknown Unknown Unknown
romsM 00000000005A8941 mod_ncparam_mp_in 904 mod_ncparam.f90
romsM 0000000000526527 read_phypar_ 222 read_phypar.f90
romsM 00000000004C9E1F inp_par_mod_mp_in 110 inp_par.f90
romsM 000000000040BB07 ocean_control_mod 95 ocean_control.f90
romsM 000000000040B592 MAIN__ 95 master.f90
romsM 000000000040B41E Unknown Unknown Unknown
libc.so.6 00002AAAAC5F2D20 Unknown Unknown Unknown
romsM 000000000040B329 Unknown Unknown Unknown
The .out file only has 4 lines, telling the version information and running time.
This occurs in ROMS3.9 and 4.0, any lower version for 2D mode works fine.
I also tested the kelvin case between versions, it has the same problem.
Looking for any input,
Thank you,
Yan
Re: Cannot run 2D only mode with ROMS3.9 or higher
what is on line 904 of mod_ncparam.f90
(the f90, not the F)
mod_ncparam_mp_in 904 mod_ncparam.f90
(the f90, not the F)
mod_ncparam_mp_in 904 mod_ncparam.f90
Re: Cannot run 2D only mode with ROMS3.9 or higher
Hi John,
Line 904 is 'isWvel=ic+1' in mod_ncparam.f90
Yan
Line 904 is 'isWvel=ic+1' in mod_ncparam.f90
Yan
- arango
- Site Admin
- Posts: 1368
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Cannot run 2D only mode with ROMS3.9 or higher
Hmm, that is very weird because the variable isWvel is a scalar and well defined in mod_ncparam.F. It doesn't need an exception because SOLVE3D is not activated. It is used in read_phypar.F is inside a SOLVE3D conditional.
I compiled and ran the SOLITON test. It works for me. If you have made changes to the code, you need to check your modifications. Also, make sure that you are using a consistent version of roms.in and varinfo.dat. It is a very common problem that users forget to update those files too.
I compiled and ran the SOLITON test. It works for me. If you have made changes to the code, you need to check your modifications. Also, make sure that you are using a consistent version of roms.in and varinfo.dat. It is a very common problem that users forget to update those files too.
Re: Cannot run 2D only mode with ROMS3.9 or higher
Hi Hernan,
Thanks for the suggestions. I am sure the roms.in and varinfo.dat are copied or cited from the corresponding version folder. I also tested the SOLITON case, it has the same problem.
Yan
Thanks for the suggestions. I am sure the roms.in and varinfo.dat are copied or cited from the corresponding version folder. I also tested the SOLITON case, it has the same problem.
Yan
Re: Cannot run 2D only mode with ROMS3.9 or higher
Hi All,
I installed ROMS on the other HPC, also compiled with ifort (different version), still shows the same problem. However, it works when compiled with pgi. For the ifort compiles, I just use the original Linux-ifort.mk file, no additional flag is added or changed. Still looking for a solution, since ifort is faster according to our experience.
Hi Hernan,
If duplicate 'isWvel=ic+1' one more time, the error reports on the second one. It seems not a problem with isWvel, but ic.
Thank you,
Yan
I installed ROMS on the other HPC, also compiled with ifort (different version), still shows the same problem. However, it works when compiled with pgi. For the ifort compiles, I just use the original Linux-ifort.mk file, no additional flag is added or changed. Still looking for a solution, since ifort is faster according to our experience.
Hi Hernan,
If duplicate 'isWvel=ic+1' one more time, the error reports on the second one. It seems not a problem with isWvel, but ic.
Thank you,
Yan
Re: Cannot run 2D only mode with ROMS3.9 or higher
Hi All,
The problem comes from the variable MT defined in mod_param.F.
For version 3.8 and earlier, it is assigned as below
#if defined IS4DVAR || defined W4DVAR || defined W4DPSAS
MT=MAX(NAT,MAXVAL(NT))
#else
MT=MAX(2,MAXVAL(NT))
#endif
Starting from version 3.9, it is assigned only as
MT=MAX(NAT,MAXVAL(NT))
If running 2D mode, NAT=0, MT=0. Then the Do-loop in mod_ncparam.f90, right before 'isWvel=ic+1, could not be processed by ifort, which causes the error report. While for the older version, MT is always no less than 2, whether in 2D or 3D mode.
In addition, pgi can tolerate this without a problem.
Yan
The problem comes from the variable MT defined in mod_param.F.
For version 3.8 and earlier, it is assigned as below
#if defined IS4DVAR || defined W4DVAR || defined W4DPSAS
MT=MAX(NAT,MAXVAL(NT))
#else
MT=MAX(2,MAXVAL(NT))
#endif
Starting from version 3.9, it is assigned only as
MT=MAX(NAT,MAXVAL(NT))
If running 2D mode, NAT=0, MT=0. Then the Do-loop in mod_ncparam.f90, right before 'isWvel=ic+1, could not be processed by ifort, which causes the error report. While for the older version, MT is always no less than 2, whether in 2D or 3D mode.
In addition, pgi can tolerate this without a problem.
Yan
Re: Cannot run 2D only mode with ROMS3.9 or higher
wow! thanks for diggin in. But i see in mod_ncparam.F
ic=5
DO i=1,MT
ic=ic+1
isTvar(i)=ic
END DO
....
isWvel=ic+1
are you saying ifort can not do "DO i=1,0" ?
there still should be a value for ic =5.
ic=5
DO i=1,MT
ic=ic+1
isTvar(i)=ic
END DO
....
isWvel=ic+1
are you saying ifort can not do "DO i=1,0" ?
there still should be a value for ic =5.
Re: Cannot run 2D only mode with ROMS3.9 or higher
Hi John,
1. Yes, it seems that ifort cannot do "DO i=1,0".
2. ic has an assigned value of 5, but since the do loop does not work (with ifort), isTvar is not assigned in the right way. That causes further problems anywhere using isTvar.
Thank you,
Yan
1. Yes, it seems that ifort cannot do "DO i=1,0".
2. ic has an assigned value of 5, but since the do loop does not work (with ifort), isTvar is not assigned in the right way. That causes further problems anywhere using isTvar.
Thank you,
Yan
- arango
- Site Admin
- Posts: 1368
- Joined: Wed Feb 26, 2003 4:41 pm
- Location: DMCS, Rutgers University
- Contact:
Re: Cannot run 2D only mode with ROMS3.9 or higher
Obviously, this is a compiler bug! We find such bugs in ifort and gfortran from time to time. They disappears when we update the compiler. I added a SOLVE3D conditional to mod_ncpararm.F since such variables are not needed/used in shallow-water configurations.