Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

machine problem

I have made dead case test and it works fine. I have chosen compset G for more reliable test and the model stopped when it tried to read ocean init TS file (ocean component of the model - POP2). I did some research and i figure out the problem. I will try to explain it:
if fortran reads direct access file the open statement looks like:
open(xx,file='xxx', access=........, recl=nx*ny*recl_fact*2)
nx*ny means number of data for reading
2 means it is for double precision (8 bytes)
recl_fact is machine depended factor.
Most of the machines has this factor equal 4. But on my machine this factor is equal 1. So if ocean model defined recl based on size of domain file is to small and it tries to read record which does not exist. I know ho to fix the problem, but i think there is much more reading statemnets like this. So my question is:
is it possible to add compiler flag to have recl_factor equal 4?
This machine have intel compilers (ifort and icc)

Thank you in advance for any help.
Jaromir
 

njn01

Member
jaromir said:
I have made dead case test and it works fine. I have chosen compset G for more reliable test and the model stopped when it tried to read ocean init TS file (ocean component of the model - POP2). I did some research and i figure out the problem. I will try to explain it:
if fortran reads direct access file the open statement looks like:
open(xx,file='xxx', access=........, recl=nx*ny*recl_fact*2)

I don't recognize this particular open statement. Can you point me to the exact line in the pop2 code that you are referring to?
 
I am referring to:
initial.F90
1104 in_file = construct_file(init_ts_file_fmt, &
1105 full_name=trim(init_ts_file), &
1106 record_length = rec_type_dbl, &
1107 recl_words=nx_global*ny_global)
1108 call data_set(in_file,'open_read')
1109
1110 i_dim = construct_io_dim('i',nx_global)
1111 j_dim = construct_io_dim('j',ny_global)
1112 k_dim = construct_io_dim('k',km)

line 1108 is referred to io.F90
90 case ('open_read')
91
92 if (data_file%data_format=='bin') then
93 call open_read_binary(data_file)
94 else if (data_file%data_format=='nc') then
95 call open_read_netcdf(data_file)
96 endif

and line 93 is referred to io_binary.F90
200 #ifdef USEPIOREAD
201 iostat = PIO_OpenFile(PIO_desc,data_file%file,iotype_direct_pbinary, trim(data_file%full_name))
202 #else
203 if (my_task < data_file%num_iotasks) then
204 path = trim(data_file%full_name)
205 open (unit=data_file%id(1),action='read',status='unknown', &
206 file=trim(path), form='unformatted',access='direct', &
207 recl=data_file%record_length)
208 endif
209 #endif

thanks,
jaromir
 
Top