PermafrostExecutorSiwenna: Difference between revisions
m Change title |
m Use included Miniconda install instructions |
||
Line 7: | Line 7: | ||
--[[User:Mpiper|Mpiper]] ([[User talk:Mpiper|talk]]) 14:52, 22 February 2018 (MST) | --[[User:Mpiper|Mpiper]] ([[User talk:Mpiper|talk]]) 14:52, 22 February 2018 (MST) | ||
== | ==Set install directory== | ||
The install directory for this executor is '''/home/csdms/wmt/permafrost'''. | |||
install_dir=/home/csdms/wmt/permafrost | |||
mkdir -p $install_dir | |||
==Install Python== | |||
{{:Shorter_Miniconda_install_instructions}} | |||
==Install the CSDMS software stack== | ==Install the CSDMS software stack== | ||
Line 38: | Line 34: | ||
Next, install `wmt-exe` from source. | Next, install `wmt-exe` from source. | ||
mkdir -p $ | mkdir -p $install_dir/opt && cd $install_dir/opt | ||
git clone https://github.com/csdms/wmt-exe | git clone https://github.com/csdms/wmt-exe | ||
cd wmt-exe | cd wmt-exe | ||
Line 65: | Line 61: | ||
We installed ILAMB above. | We installed ILAMB above. | ||
Test it by starting a Python session | Test it by starting a Python session | ||
in '''$ | in '''$install_dir/test''' | ||
and executing the setup and IRF methods. | and executing the setup and IRF methods. | ||
Line 98: | Line 94: | ||
Test a component (here, FnM) by starting a Python session | Test a component (here, FnM) by starting a Python session | ||
in '''$ | in '''$install_dir/test''' | ||
and executing the setup and IRF methods. | and executing the setup and IRF methods. | ||
Revision as of 15:39, 27 February 2018
Instructions for installing and configuring a WMT executor on siwenna.
--Mpiper (talk) 14:52, 22 February 2018 (MST)
Set install directory
The install directory for this executor is /home/csdms/wmt/permafrost.
install_dir=/home/csdms/wmt/permafrost mkdir -p $install_dir
Install Python
Install a Python distribution to be used locally by WMT. We like to use Miniconda.
cd $install_dir curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o miniconda.sh bash ./miniconda.sh -f -b -p $(pwd)/conda export PATH=$(pwd)/conda/bin:$PATH
If working with an existing Miniconda install, be sure to update everything before continuing:
conda update conda conda update --all
Install the CSDMS software stack
A limiting factor in setting up this executor is the componentized version of ILAMB can only be run with `pymt=0.2`; in particular, the BMI I wrote for ILAMB is incompatible with the `model_metadata` package in newer versions of PyMT. To ensure all the packages meet the same dependencies (looking at you, numpy), simultaneously install `cca-tools`, `pymt=0.2` and `csdms-ilamb` using the csdms-stack conda channel (the Bakery),
conda install cca-tools pymt=0.2 csdms-ilamb -c csdms-stack -c defaults -c conda-forge
Next, install `wmt-exe` from source.
mkdir -p $install_dir/opt && cd $install_dir/opt git clone https://github.com/csdms/wmt-exe cd wmt-exe python setup.py develop
Install the `babelizer` for components that need to be built from source.
conda install -c csdms-stack babelizer
Optionally install IPython for testing.
conda install ipython
When running IPython remotely on siwenna, it's helpful to set
export MPLBACKEND=Agg
Install and test CSDMS components
Each section below describes how to install and test a particular CSDMS component.
ILAMB
We installed ILAMB above. Test it by starting a Python session in $install_dir/test and executing the setup and IRF methods.
from pymt.components import ILAMB comp = ILAMB() comp.get_component_name() comp.setup('.')
At this point, stop and edit bmi_ilamb.yaml, updating the `ilamb_root` attribute with the appropriate location on siwenna, /home/csdms/ilamb. All other attributes can be left unchanged with their default values.
comp.initialize('bmi_ilamb.yaml') comp.get_start_time() comp.get_end_time() comp.get_current_time() comp.update() comp.finalize()
ILAMB is run at the call to `update`. The default run takes about 75 min.
Permamodel
Install the permamodel components from the Bakery using the `csdms-permamodel` metapackage.
conda install csdms-permamodel -c csdms-stack
Test a component (here, FnM) by starting a Python session in $install_dir/test and executing the setup and IRF methods.
from pymt.components import FrostNumberModel comp = FrostNumberModel() comp.get_component_name() # args = comp.setup('.') # comp.initialize(*args) comp.setup('.') comp.initialize('frostnumber_model.cfg') comp.get_start_time() comp.get_end_time() comp.get_current_time() comp.update() comp.finalize()