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

Use a different name for the project in the remote platform to avoid conflicts...

Use a different name for the project in the remote platform to avoid conflicts when the running machine is local.
parent bc294aab
No related branches found
No related tags found
No related merge requests found
Pipeline #19070 skipped
......@@ -12,7 +12,7 @@ fi
# Go to the working directory
cd ${WORKDIR} || exit
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
. ${WORKDIR}/production_project/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%"
if [ ! $(rpm -qa | grep bzip2) ]; then
......@@ -31,10 +31,10 @@ if [ ! -z "$SPACK_BUILD_ICON" ]; then
echo "Installing ICON with spack!"
echo "cmd=$SPACK_BUILD_ICON"
# In case the autosubmit repository with the icon-nwp receipt doesn't exist, add it
if [[ $(spack repo list | grep "${WORKDIR}/proj/spack_repo") ]]; then
if [[ $(spack repo list | grep "${WORKDIR}/production_project/spack_repo") ]]; then
echo "icon spack repo was already added to repo list"
else
spack repo add ${WORKDIR}/proj/spack_repo
spack repo add ${WORKDIR}/production_project/spack_repo
fi
spack spec $SPACK_BUILD_ICON
spack install --reuse $SPACK_BUILD_ICON
......
......@@ -10,7 +10,7 @@ PYTHON_VERSION=%PYTHON_ENVIRONMENT.PYTHON_VERSION%
# Go to the working directory
cd ${WORKDIR}
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
. ${WORKDIR}/production_project/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%"
......
......@@ -12,7 +12,7 @@ RUNDIR=${WORKDIR}/${STARTDATE}/${MEMBER}
cd ${RUNDIR}
# Activate spack
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
. ${WORKDIR}/production_project/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%"
......
......@@ -5,15 +5,16 @@ WORKDIR=%HPCROOTDIR%
HPCUSER=%HPCUSER%
HPCHOST=%HPCHOST%
# Define local and remote namelists folders
# Define local and remote folders
REMOTE_WORKDIR=${WORKDIR}/
PROJ_FOLDER="%PROJDIR%"
folder_name="production_project"
# Transfer the project
if [[ "x$HPCHOST" == "xlocalhost" ]]; then
mkdir -p ${REMOTE_WORKDIR}/proj
rsync -v -u -r --no-relative ${PROJ_FOLDER}/ ${REMOTE_WORKDIR}/proj
mkdir -p ${REMOTE_WORKDIR}/${folder_name}
rsync -v -u -r --no-relative ${PROJ_FOLDER}/ ${REMOTE_WORKDIR}/${folder_name}
else
ssh ${HPCUSER}@${HPCHOST} mkdir -p ${REMOTE_WORKDIR}/proj
rsync -v -u -r --no-relative ${PROJ_FOLDER}/ ${HPCUSER}@${HPCHOST}:${REMOTE_WORKDIR}/proj
ssh ${HPCUSER}@${HPCHOST} mkdir -p ${REMOTE_WORKDIR}/${folder_name}
rsync -v -u -r --no-relative ${PROJ_FOLDER}/ ${HPCUSER}@${HPCHOST}:${REMOTE_WORKDIR}/${folder_name}
fi
......@@ -7,7 +7,7 @@
# Get some variables provided by autosubmit.
WORKDIR=%HPCROOTDIR%
PROJ_FOLDER=${WORKDIR}/proj
PROJ_FOLDER=${WORKDIR}/production_project
SST_FORCING=$( basename %simulation.initial_conditions.sea_surface_temperature_forcing% )
INTERPOLATED_SST=whatever.nc
......@@ -16,7 +16,7 @@ EXTERNAL_PARAMETERS_FILE=%simulation.external_parameters_filename%
STARTDATE=%SDATE%
# Load spack
. ${WORKDIR}/proj/autoicon/platforms/common/spack_utils.sh
. ${WORKDIR}/production_project/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%"
# Load dwd-icon-tools
......
......@@ -8,7 +8,7 @@ EXTERNAL_PARAMETERS_FILE=%simulation.external_parameters_filename%
SST_FORCING=%simulation.initial_conditions.sea_surface_temperature_forcing%
# Activate spack
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
. ${WORKDIR}/production_project/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%"
# Load icon module needed to retrieve some data
......
......@@ -8,7 +8,7 @@ EXTERNAL_PARAMETERS_FILE=%simulation.external_parameters_filename%
# Activate spack
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
. ${WORKDIR}/production_project/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%"
# Load icon module needed to retrieve some data
......
......@@ -6,7 +6,7 @@ DYNAMICS_GRID_FILENAME=%simulation.dynamics_grid_filename%
RADIATION_GRID_FILE=%simulation.radiation_grid_filename%
# Activate spack
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
. ${WORKDIR}/production_project/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%"
......
......@@ -11,7 +11,7 @@ RUNDIR=${WORKDIR}/${STARTDATE}/ideal
cd ${RUNDIR}
# Activate spack
. ${WORKDIR}/proj/platforms/common/spack_utils.sh
. ${WORKDIR}/production_project/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%"
......
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