diff --git a/ush/module-setup.sh b/ush/module-setup.sh index 158efd25690..0b2ffae4c9c 100755 --- a/ush/module-setup.sh +++ b/ush/module-setup.sh @@ -69,13 +69,23 @@ elif [[ ${MACHINE_ID} = stampede* ]] ; then fi module purge -elif [[ ${MACHINE_ID} = gaea* ]] ; then - # We are on GAEA. +elif [[ ${MACHINE_ID} = gaeac5 ]] ; then + # We are on GAEA C5. if ( ! eval module help > /dev/null 2>&1 ) ; then - source /usr/share/lmod/lmod/init/bash + # We cannot simply load the module command. The GAEA + # /etc/profile modifies a number of module-related variables + # before loading the module command. Without those variables, + # the module command fails. Hence we actually have to source + # /etc/profile here. source /etc/profile fi module reset +elif [[ ${MACHINE_ID} = gaeac6 ]]; then + # We are on GAEA C6. + if ( ! eval module help > /dev/null 2>&1 ) ; then + source /opt/cray/pe/lmod/lmod/init/bash + fi + module reset elif [[ ${MACHINE_ID} = expanse* ]]; then # We are on SDSC Expanse diff --git a/workflow/generate_workflows.sh b/workflow/generate_workflows.sh index e6d4e0493c8..d734e14f7e5 100755 --- a/workflow/generate_workflows.sh +++ b/workflow/generate_workflows.sh @@ -54,8 +54,6 @@ function _usage() { If this option is not chosen, the new entries that would have been written to your crontab will be printed to stdout. NOTES: - - This option is not supported on Gaea. Instead, the output will - need to be written to scrontab manually. - For Orion/Hercules, this option will not work unless run on the [orion|hercules]-login-1 head node. diff --git a/workflow/hosts/gaeac5.yaml b/workflow/hosts/gaeac5.yaml index 7746c630376..45a4034de85 100644 --- a/workflow/hosts/gaeac5.yaml +++ b/workflow/hosts/gaeac5.yaml @@ -19,6 +19,7 @@ PARTITION_DTN: 'dtn_f5_f6' RESERVATION: '' CLUSTERS: 'c5' CLUSTERS_DTN: 'es' +CONSTRAINT_DTN: 'f5' CHGRP_RSTPROD: 'NO' CHGRP_CMD: 'chgrp rstprod' HPSS_PROJECT: emc-global diff --git a/workflow/hosts/gaeac6.yaml b/workflow/hosts/gaeac6.yaml index 6ea549ae881..3363aabacff 100644 --- a/workflow/hosts/gaeac6.yaml +++ b/workflow/hosts/gaeac6.yaml @@ -20,13 +20,13 @@ PARTITION_CRON: 'cron_c6' RESERVATION: '' CLUSTERS: 'c6' CLUSTERS_DTN: 'es' +CONSTRAINT_DTN: 'f6' CHGRP_RSTPROD: 'NO' CHGRP_CMD: 'chgrp rstprod' HPSS_PROJECT: emc-global -# TODO enable HPSS archiving by default when DTN/f6 sluggishness is resolved -DO_ARCHCOM: 'NO' -ARCHCOM_TO: 'local' -ATARDIR: '${NOSCRUB}/archive_rotdir/${PSLOT}' +DO_ARCHCOM: 'YES' +ARCHCOM_TO: 'hpss' +ATARDIR: '/NCEPDEV/${HPSS_PROJECT}/1year/${USER}/${machine}/scratch/${PSLOT}' MAKE_NSSTBUFR: 'NO' MAKE_ACFTBUFR: 'NO' DO_TRACKER: 'YES' diff --git a/workflow/rocoto/gfs_tasks.py b/workflow/rocoto/gfs_tasks.py index 0f21fa83f3f..5cd4afdfb4c 100644 --- a/workflow/rocoto/gfs_tasks.py +++ b/workflow/rocoto/gfs_tasks.py @@ -2523,8 +2523,7 @@ def cleanup(self): pass else: dep_dict = {'type': 'metatask', 'name': f'{self.run}_earc_tars'} - - deps.append(rocoto.add_dependency(dep_dict)) + deps.append(rocoto.add_dependency(dep_dict)) else: if self.app_config.mode in ['cycled']: @@ -2633,6 +2632,8 @@ def cleanup(self): else: dep_dict = {'type': 'task', 'name': f'{self.run}_arch_tars'} + deps.append(rocoto.add_dependency(dep_dict)) + dependencies = rocoto.create_dependency(dep_condition='and', dep=deps) resources = self.get_resource('cleanup') diff --git a/workflow/rocoto/tasks.py b/workflow/rocoto/tasks.py index 8109ceef434..7723ce8573d 100644 --- a/workflow/rocoto/tasks.py +++ b/workflow/rocoto/tasks.py @@ -119,6 +119,10 @@ def _validate_system_key(input_dict, key): self.queue_service = _validate_system_key(base, 'QUEUE_SERVICE') self.queue_dtn = _validate_system_key(base, 'QUEUE_DTN') + self.constraint_batch = _validate_system_key(base, 'CONSTRAINT') + self.constraint_service = _validate_system_key(base, 'CONSTRAINT_SERVICE') + self.constraint_dtn = _validate_system_key(base, 'CONSTRAINT_DTN') + def _template_to_rocoto_cycstring(self, template: str, subs_dict: dict = {}) -> str: ''' Takes a string templated with ${ } and converts it into a string suitable @@ -363,6 +367,7 @@ def get_resource(self, task_name): task_queue = self.queue_service if self.queue_service else self.queue_batch task_partition = self.partition_service if self.partition_service else self.partition_batch task_clusters = self.clusters_service if self.clusters_service else self.clusters_batch + task_constraint = self.constraint_service if self.constraint_service else self.constraint_batch task_reservation = None # Reservations are only for batch nodes elif dtn_task: # First check if there is a DTN queue, partition, or clusters @@ -388,12 +393,20 @@ def get_resource(self, task_name): else: task_clusters = self.clusters_batch + if self.constraint_dtn: + task_constraint = self.constraint_dtn + elif self.constraint_service: + task_constraint = self.constraint_service + else: + task_constraint = self.constraint_batch + task_reservation = None else: # This is a batch task task_partition = self.partition_batch task_queue = self.queue_batch task_clusters = self.clusters_batch + task_constraint = self.constraint_batch task_reservation = self.reservation_batch # Scheduler-specific configurations @@ -428,6 +441,9 @@ def get_resource(self, task_name): if task_clusters: native += ' --clusters=' + task_clusters + if task_constraint: + native += ' --constraint=' + task_constraint + # Finally, construct and return the task resource dictionary task_resource = {'account': account, 'walltime': walltime,