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

Crashing somewhere in cam_pio_openfile on both pleiades and yellowstone

Hello all,
I have tried this code on both pleiades and yellowstone and get the same issue, so I believe this is a coding issue rather than a machine specific problem. I am trying to open up a netCDF file. The relevant coding statements are:

integer :: lev_did, lat_did, mlt_did, alpha_vid, flux_vid, levels_vid, maglat_vid, mlt_vid
character(len=256) :: mepedfile ! meped precip patterns file name
integer :: ierr
type(file_desc_t) :: fid !NetCDF file id


if (masterproc) then
write(iulog,*) 'MEE: Opening netcdf in read only'
! Open the netcdf file (read only)
call getfil(epp_meped_file, mepedfile, 0)
write(iulog,*) 'epp_meped_param_init(): Reading meped precipitation patterns from ', mepedfile

call cam_pio_openfile(fid,mepedfile,0)
write(iulog,*) 'epp_meped_param_init(): File opened ', mepedfile

! read the table dimensions
ierr = pio_inq_dimid(fid, "lev", lev_did)
write(iulog,*) 'epp_meped_param_init(): lev_did ', lev_did
ierr = pio_inq_dimlen(fid, lev_did, epp_meped_nLevs)
write(iulog,*) 'epp_meped_param_init(): epp_meped_nLevs ', epp_meped_nLevs

ierr = pio_inq_dimid(fid, "lat", lat_did)
write(iulog,*) 'epp_meped_param_init(): lat_did ', lat_did
ierr = pio_inq_dimlen(fid, lat_did, epp_meped_nLats)
write(iulog,*) 'epp_meped_param_init(): epp_meped_nLats ', epp_meped_nLats

ierr = pio_inq_dimid(fid, "mlt", mlt_did)
write(iulog,*) 'epp_meped_param_init(): mlt_did ', mlt_did
ierr = pio_inq_dimlen(fid, mlt_did, epp_meped_nMLTs)
write(iulog,*) 'epp_meped_param_init(): epp_meped_nLats ', epp_meped_nMLTs
endif


The run crashes sometime after:
write(iulog,*) 'epp_meped_param_init(): Reading meped precipitation patterns from ', mepedfile

and sometime before:
write(iulog,*) 'epp_meped_param_init(): File opened ', mepedfile

suggesting that the crash happens during:
call cam_pio_openfile(fid,mepedfile,0)

I do not receive any error messages in the atm log and the only error I get in the cesm log is:
ERROR: 0031-300 Forcing all remote tasks to exit due to exit code 1 in task 60

which does not mean very much to me. I have DEBUG turned on, but it did not give my any extra messages. Any ideas on what I am doing wrong? Thanks for any advice!

-Ethan
 

santos

Member
The third argument to cam_pio_openfile should be "pio_nowrite" (from the pio module), not "0".If that's not the cause of your problem, you should check in your run directory for files or directories starting with "core". These files are not always very clear on yellowstone (in fact they are randomly missing or empty sometimes), but they are another source of information. The full cesm.log could also be helpful, if you can post it.
 

santos

Member
The third argument to cam_pio_openfile should be "pio_nowrite" (from the pio module), not "0".If that's not the cause of your problem, you should check in your run directory for files or directories starting with "core". These files are not always very clear on yellowstone (in fact they are randomly missing or empty sometimes), but they are another source of information. The full cesm.log could also be helpful, if you can post it.
 
Great! The combo of your comments fixed the problem and my code now runs on Yellowstone! Pleiades is another story, but I'll make a new post for that. -Ethan
 
Great! The combo of your comments fixed the problem and my code now runs on Yellowstone! Pleiades is another story, but I'll make a new post for that. -Ethan
 
Top