Skip to content

Commit

Permalink
New prepend text
Browse files Browse the repository at this point in the history
  • Loading branch information
LucR31 committed Dec 21, 2023
1 parent faa9290 commit 629882d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions aiida_flexpart/calculations/flexpart_cosmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def define(cls, spec):
}

spec.input('metadata.options.max_wallclock_seconds', valid_type=int, default=1800)
spec.input('metadata.options.prepend_text', valid_type=str, default='')
spec.input('metadata.options.parser_name', valid_type=str, default='flexpart.cosmo')

# new ports
Expand Down
1 change: 1 addition & 0 deletions aiida_flexpart/calculations/flexpart_ifs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def define(cls, spec):
}

spec.input('metadata.options.max_wallclock_seconds', valid_type=int, default=1800)
spec.input('metadata.options.prepend_text', valid_type=str, default='')
spec.input('metadata.options.parser_name', valid_type=str, default='flexpart.ifs')

spec.input(
Expand Down
11 changes: 11 additions & 0 deletions examples/example_workflow_combi.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,21 @@ def test_run(flexpart_code):
'stash_mode': common.StashMode.COPY.value,
}

prepend_text_ = """#SBATCH --partition=normal
#SBATCH --account=em05
#SBATCH --constraint=mc
export OMP_NUM_THREADS=${SLURM_CPUS_PER_TASK:-1}
source $MODULESHOME/init/bash
ulimit -s unlimited
"""

#change wall time for cosmo and ifs in seconds
builder.flexpartcosmo.metadata.options.max_wallclock_seconds = 1800
#builder.flexpartifs.metadata.options.max_wallclock_seconds = 2700

builder.flexpartcosmo.metadata.options.prepend_text = prepend_text_
builder.flexpartifs.metadata.options.prepend_text = prepend_text_

engine.run(builder)


Expand Down

0 comments on commit 629882d

Please sign in to comment.