Running MESSAGE_ix in HPCs #967
Replies: 3 comments 5 replies
-
|
Hi @criscfer, thanks for reaching out :) |
Beta Was this translation helpful? Give feedback.
-
|
(Just moving this to a discussion because that seems more appropriate; if we discover an underlying issue with message_ix, we can still create a dedicated issue for that :) |
Beta Was this translation helpful? Give feedback.
-
|
Hi all. I have been trying to recreate the issues I initially highlighted, however, it now seems that the cluster where we run our SLURM jobs is working as I originally expected, and is executing our model runs. This lead me to have other questions which you may be able to address, concerning how the MESSAGEix framework behaves in SLURM job environments. I have noticed that my test scenario runs as I executed when executed locally, solving to optimality and creating our output files. When executing the same scenario inside a SLURM job, however, the model solves, but is considered infeasible, therefore not producing our own model report outputs. This is a very strange and rare behavior, which I have seen before in local runs of the model Have ever seen this behavior before from remote jobs? Do you have any insight that can help me address this new unexpected behavior? Additionally, do you have any tips to run MESSAGEix in a job array, that is not already mentioned in the resources mentioned in previous messages to this thread? Specs and Additional InformationThe table below contains the specs of the jobs I have been running, and how I run the model locally.
See below for the CBC solver report from the cloud run of the model. As requested, I am also attaching the batch file I used to run the jobs on the cloud here: #!/bin/bash
#SBATCH --account=user_group_account
#SBATCH --cpus-per-task=8
#SBATCH --mem=125G
#SBATCH --time=2:00:00
#SBATCH [email protected]
#SBATCH --mail-type=ALL
#SBATCH --array=1
#SBATCH --output=slurm-YOUR_JOB_NAME.out
echo "Current working directory: $PWD"
echo "Starting run at: `date`"
# Load Compute Canada modules
module load StdEnv/2023 gcc/12.3 python/3.12 arrow/18.1.0 postgresql/16.0 rust java/17.0.6
# Create virtual environment
virtualenv --no-download $SLURM_TMPDIR/env
source $SLURM_TMPDIR/env/bin/activate
# Install packages in the environment
pip install --no-index --upgrade pip
pip install -e .
# Change the solver for MESSAGE from CPLEX to CBC
sed -i 's/option LP = CPLEX ;/option LP = CBC ;/' $SLURM_TMPDIR/env/lib/python3.12/site-packages/message_ix/model/MESSAGE/auxiliary_settings.gms
# Export the path to the GAMS installation - SESIT team's project folder
export PATH=$PATH:/project/rrg-mcpher16/SHARED/software/gams/gams48.6_linux_x64_64_sfx/
# Delete bloat from the folder
rm -rf docs/ Documentation/ tests/
rm -rf *.yml LICENSE *.pdf
# Begin running script
srun python MESSAGE_CA.py
The from setuptools import setup, find_packages
setup(
name='messageix_canada',
version='0.1.0',
description='An Open Source Integrated Assessment Model for Canada',
author='Your Name',
author_email='[email protected]',
packages=find_packages(include=['MESSAGE_CA', 'MESSAGE_CA.*']), # Adjust if needed
install_requires=[
'setuptools >= 64',
'pandas',
'numpy<2.0.0', # local version runs most recent version of numpy
'plotly',
'pycountry',
'ixmp',
'message_ix >= 3.4.0',
'pyam-iamc >= 0.6',
'scipy',
'toml',
'ipykernel',
'pytest',
'click',
'message-ix-models[report]',
'typing_extensions', # Dependency of IXMP. This line is not included in the local copy of setup.py
],
entry_points={
'console_scripts': [
'message-canada=MESSAGE_CA:messagerun',
],
},
extras_require={
'extras': ['geotext', 'message-ix-models'],
},
) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is this about?
My team at the University of Victoria is looking to execute a series of many runs of our version of the MESSAGEix model, MESSAGEix for Canada, to perform a sensitivity analysis on our inputs to the model. We have been finding it quite difficult, however, to perform many runs in parallel, or even in series, using some HPC and cloud computing resources we have access to.
The bottlenecks we have experienced so far have mostly been due to issues around how GAMS interacts with the model. Some examples of failure cases are:
.gmsmodel filesHas anyone else in the wider community ever tried to run MESSAGEix on HPC clusters, or cloud environments and experienced similar issues? Is there a correct way to carry-out model executions on distributed computing resources?
I have browsed through the documentation, but have not found a clear method for running the model in these remote environments. The only pages I could find related to this topic coming out of the main documentation are listed below.
Any help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions