Skip to content

Commit

Permalink
add is_exclusive to resource.AWSPW
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuang-jedi committed Jul 23, 2024
1 parent 492808d commit d7a262e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 2 additions & 0 deletions parm/config/gfs/config.resources.AWSPW
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# AWS-specific job resources

export is_exclusive="True"

# shellcheck disable=SC2312
for mem_var in $(env | grep '^memory_' | cut -d= -f1); do
unset "${mem_var}"
Expand Down
8 changes: 1 addition & 7 deletions workflow/rocoto/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,7 @@ def get_resource(self, task_name):
else:
native += ':shared'
elif scheduler in ['slurm']:
#The PW_CSP is a AWS (CSPs parameter), if it is on CSPs, we need 'native' defined
#as below. Or, it won't run, but with an error:
#"ufs_model.x: error while loading shared libraries: libiomp5.so: cannot open shared object file: No such file or directory"
#Even the library path is clearly in LD_LIBRARY_PATH, or load exactly the modules when build ufs_model.x
#TODO: find a mechanism to provide native scheduler information.
pw_csp = os.environ.get('PW_CSP', 'unknown')
if ( pw_csp in ['aws', 'azure', 'google'] ):
if task_config.get('is_exclusive', False):
native = '--export=ALL --exclusive'
else:
native = '--export=NONE'
Expand Down

0 comments on commit d7a262e

Please sign in to comment.