I am trying to setup a plan for our weather model development project. The first stage of the plan clones and builds multiple executables. I want to build each executable in a separate task. I am creating the tasks with inline scripting. The challenge I am facing is that I need to be able to set the environment by loading a number of modules and do not know how to do this in a uniform way. The way I do this now is to load the modules in the inline script for each task, i.e.
module load intel/xe_2017.1.043
module load hdf5/1.8.19-parallel
module load p4est/2.0
make -j32 fcst_model
Is there a way to do this in a single location within the plan or job and have each task inherit that environment?
Thanks.