Skip to content

Conversation

bartgol
Copy link
Contributor

@bartgol bartgol commented Sep 18, 2024

Add checks during buildnml to ensure all input files needed by the case are readable by the current user. Here are some examples of errors when things go wrong:

  • input file is not a regular file (e.g., a directory or a socket):
  File "/storage/workdir/scream/scream-src/branch/components/eamxx//cime_config/eamxx_buildnml.py", line 958, in create_input_data_list_file
    raise IsADirectoryError(f"Input file '{file_path}' is a directory, not a regular file.")
IsADirectoryError: Input file '/home/lbertag/workdir/e3sm/e3sm-data/inputdata/atm/scream/init/screami_ne4p4L72_20220823.nc' is a directory, not a regular file.
  File "/storage/workdir/scream/scream-src/branch/components/eamxx//cime_config/eamxx_buildnml.py", line 960, in create_input_data_list_file
    raise OSError(f"Input file '{file_path}' exists but is not a regular file.")
OSError: Input file '/home/lbertag/workdir/e3sm/e3sm-data/inputdata/atm/scream/init/screami_ne4p4L72_20220823.nc' exists but is not a regular file.
  • input file is not readable by current user:
   File "/storage/workdir/scream/scream-src/branch/components/eamxx//cime_config/eamxx_buildnml.py", line 980, in create_input_data_list_file
    raise PermissionError ("Input file exists but it is not readable for current user\n"
PermissionError: Input file exists but it is not readable for current user
 - file name: /home/lbertag/workdir/e3sm/e3sm-data/inputdata/atm/scream/init/screami_ne4p4L72_20220823.nc
 - file owner: e3sm-jenkins
 - file group: lbertag
 - permissions: -rw-------
 - current user: lbertag
 - current user groups: ['lbertag', 'wheel', 'wg-azure-openai-web-chat-pilot-REQ', 'wg-azure-openai-web-chat-pilot', 'wg-sierrap9v100-snl-users', 'wg-trilinos-stakeholders', 'wg-cldera-sim-pathways', 'wg-haaps-users-caraway', 'wg-trilinos-cnflnc-lic', 'wg-haaps-users-weaver', 'wg-jenkins-create-son', 'wg-trilinos-documents', 'wg-1400-site-authors', 'wg-trilinos-announce', 'wg-haaps-ohpc-users', 'wg-test-large-group', 'wg-trilinos-nightly', 'wg-01446-TierBoard', 'wg-cee-srn-hw-hpws', 'wg-ent-fido2-users', 'wg-gitlab-ex-users', 'wg-sems-confluence', 'wg-sems-users-1400', 'wg-dice-customers', 'wg-e3sm-ecosystem', 'wg-sems-users-son', 'wg-sems-users-srn', 'wg-cee-hw-stdsmp', 'wg-flight-cldera', 'wg-sems-at-users', 'wg-cmdv-hommexx', 'wg-flight-users', 'wg-boca-cldera', 'wg-sandia-acme', 'wg-vpn-otp-all', 'wg-VPNwithOPT', 'wg-boca-users', 'wg-ihpc-users', 'wg-sems-users', 'wg-0144X-US', 'wg-1400-all', 'wg-trilinos', 'wg-ACESCOP', 'wg-hommexx', 'wg-CLDERA', 'wg-SC-BER', 'wg-SC-PIs', 'wg-ai4esp', 'wg-albany', 'wg-EEx', 'wg-ASCR', 'wg-ccsm']
(bartgol) lbertag@s1007989:[SMS.ne4pg2_ne4pg2.F2010-SCREAMv1.groppello_gnu.20240918_091519_ye0jmx]

Closes #3000

@bartgol bartgol added AT: AUTOMERGE CIME Concerns infrastructure related to CIME CI: skip eamxx-sa Skip eamxx standalone testing for this PR code usability labels Sep 18, 2024
@bartgol bartgol requested review from ndkeen and jgfouca September 18, 2024 15:29
@bartgol bartgol self-assigned this Sep 18, 2024
@bartgol bartgol force-pushed the bartgol/eamxx/check-input-permissions branch from a84c340 to ba4dea0 Compare September 18, 2024 15:30
@bartgol
Copy link
Contributor Author

bartgol commented Sep 18, 2024

I'm going to merge, since I already verified that things work on my workstation. If nightlies disagree with me, I'll fix in the morning.

@bartgol bartgol merged commit df3c8a7 into master Sep 18, 2024
3 checks passed
@bartgol bartgol deleted the bartgol/eamxx/check-input-permissions branch September 18, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: skip eamxx-sa Skip eamxx standalone testing for this PR CIME Concerns infrastructure related to CIME code usability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need to check for file permissions at setup if possible (not runtime)
3 participants