E3SM-Project / scream

Fork of E3SM used to develop exascale global atmosphere model written in C++
https://e3sm-project.github.io/scream/
Other
74 stars 54 forks source link

Need to check for file permissions at setup if possible (not runtime) #3000

Closed ndkeen closed 1 week ago

ndkeen commented 1 week ago

A user outside of e3sm group was trying a case and hit this runtime error:

  0: PIO: FATAL ERROR: Aborting... FATAL ERROR: Permission denied (file = 
/global/cfs/cdirs/e3sm/inputdata/lnd/clm2/surfdata_map/surfdata_ne256pg2_simyr2010_c230207.nc) 
(/global/u2/e/ebercosh/SCREAM/scream/externals/scorpio/src/clib/pioc_support.c: 5090)

I'm trying to change the permissions on the file (as Ben on vacation, I need to ask NERSC to change owner), but I would think we would not want this to be a runtime error -- as user could have waited quite a while in the Q.

Currently:

perlmutter-login15% ll /global/cfs/cdirs/e3sm/inputdata/lnd/clm2/surfdata_map/surfdata_ne256pg2_simyr2010_c230207.nc
-rw-rw----+ 1 bhillma bhillma 13916716800 Feb  7  2023 /global/cfs/cdirs/e3sm/inputdata/lnd/clm2/surfdata_map/surfdata_ne256pg2_simyr2010_c230207.nc
bartgol commented 1 week ago

This seems like a CIME issue. When CIME checks if all input data is present, it should also check the permissions, to ensure current user can at least read.

ndkeen commented 1 week ago

Yea I was wondering if it was just CIME. However, I don't recall seeing this type of error with vanilla e3sm -- guess I could try to test it. Now if CIME isn't going to change, is there a way we can do our own checking before runtime?

I've already fixed the permissions on the file.

bartgol commented 1 week ago

Yeah, I think we can check the permissions, during buildnml in eamxx. The best we can do is error out though: no way to force new download, which would fail anyway since we can't overwrite the file.

bartgol commented 1 week ago

@ndkeen this was quite easy to do, so I just went ahead and I did it. See linked PR.

Also, congrats on opening issue 3000!