Skip to content
Snippets Groups Projects
Commit 0ace322d authored by Oriol Tintó's avatar Oriol Tintó
Browse files

Build Icon creates a file called icon_environment.env which can be sourced to...

Build Icon creates a file called icon_environment.env which can be sourced to set up the proper environment to run icon.
parent 5c5b9a4f
No related branches found
No related tags found
No related merge requests found
Pipeline #19690 passed
...@@ -70,3 +70,31 @@ if [ ! -f "${definitions_tar_file}" ]; then ...@@ -70,3 +70,31 @@ if [ ! -f "${definitions_tar_file}" ]; then
# Create a file containing the environment variable that needs to be set in order to use DWD's definitions: # Create a file containing the environment variable that needs to be set in order to use DWD's definitions:
echo "export ECCODES_DEFINITION_PATH=${WORKDIR}/definitions.edzw-${eccodes_version}-1" >eccodes_defs.env echo "export ECCODES_DEFINITION_PATH=${WORKDIR}/definitions.edzw-${eccodes_version}-1" >eccodes_defs.env
fi fi
# Create a file to set the proper environment to run ICON:
cat >icon_environment.env <<EOF
# This file loads the proper environment to run icon.
# Activate spack
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
load_spack "%spack.init%" "%spack.root%" "%spack.url%" "%spack.branch%" "%spack.externals%" "%spack.compiler%" "%spack.disable_local_config%" "%spack.user_cache_path%" "%spack.user_config_path%" "%spack.upstreams%"
# Get proper load command.
SPACK_BUILD_ICON="%ICON.BUILD_CMD%"
SPACK_LOAD_ICON="%ICON.LOAD_CMD%"
if [ "${SPACK_LOAD_ICON}" == "build_cmd" ]; then
SPACK_LOAD_ICON=${SPACK_BUILD_ICON}
fi
# Load icon module
spack load --first ${SPACK_LOAD_ICON}
# Set environment variable for eccodes-dwd definitions:
source ${WORKDIR}/eccodes_defs.env
# Increase stack size limit
ulimit -s unlimited
EOF
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment