TestingExecutorSiwenna: Difference between revisions

From CSDMS
m Change title
m Use included Miniconda install instructions
Line 7: Line 7:
--[[User:Mpiper|Mpiper]] ([[User talk:Mpiper|talk]]) 12:33, 22 February 2018 (MST)
--[[User:Mpiper|Mpiper]] ([[User talk:Mpiper|talk]]) 12:33, 22 February 2018 (MST)


==Install Python==
==Set install directory==


Install a Python distribution to be used locally by the executor.
The install directory for this executor is '''/home/csdms/wmt/_testing'''.
We like to use Miniconda.


  mkdir -p /home/csdms/wmt/_testing && cd /home/csdms/wmt/_testing
  install_dir=/home/csdms/wmt/_testing
  curl https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -o miniconda.sh
  mkdir -p $install_dir
bash ./miniconda.sh -f -b -p $(pwd)/conda
export PATH=$(pwd)/conda/bin:$PATH
root=$(pwd)


If working with an existing Python install, be sure to update everything before continuing:
==Install Python==


conda update --all
{{:Shorter_Miniconda_install_instructions}}


==Install the CSDMS software stack==
==Install the CSDMS software stack==
Line 47: Line 43:
Next, install `wmt-exe` from source.
Next, install `wmt-exe` from source.


  mkdir -p $root/opt && cd $root/opt
  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 81: Line 77:
Hydrotrend is included in the `csdms-stack` metapackage.
Hydrotrend is included in the `csdms-stack` metapackage.
Test it by starting a Python session
Test it by starting a Python session
in '''$root/test'''
in '''$install_dir/test'''
and executing the setup and IRF methods.
and executing the setup and IRF methods.


Line 102: Line 98:
Permamodel is included in the `csdms-stack` metapackage.
Permamodel is included in the `csdms-stack` metapackage.
Test a component by starting a Python session
Test a component by starting a Python session
in '''$root/test'''
in '''$install_dir/test'''
and executing the setup and IRF methods.
and executing the setup and IRF methods.



Revision as of 15:40, 27 February 2018

wmt-testing executor on siwenna

Instructions for installing and configuring a WMT executor on siwenna.

--Mpiper (talk) 12:33, 22 February 2018 (MST)

Set install directory

The install directory for this executor is /home/csdms/wmt/_testing.

install_dir=/home/csdms/wmt/_testing
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

Using the csdms-stack conda channel (the Bakery) install the CSDMS software stack, including several pre-built components, with the `csdms-stack` metapackage.

conda install csdms-stack -c csdms-stack -c defaults -c conda-forge

This metapackage currently includes

  • pymt
  • cca-tools
  • csdms-child
  • csdms-sedflux-3d
  • csdms-hydrotrend
  • csdms-permamodel-ku
  • csdms-permamodel-frostnumber
  • csdms-permamodel-kugeo
  • csdms-permamodel-frostnumbergeo
  • csdms-brake
  • csdms-pydeltarcm

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

Optionally install the `babelizer`, in case a component needs 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.

Note that the ILAMB component from the Bakery won't work because it's built against `pymt=0.2`; in particular, my BMI for ILAMB is incompatible with the `model_metadata` package in newer versions of PyMT.

HydroTrend

Hydrotrend is included in the `csdms-stack` metapackage. Test it by starting a Python session in $install_dir/test and executing the setup and IRF methods.

from pymt.components import Hydrotrend

comp = Hydrotrend()
comp.get_component_name()
# args = comp.setup('.')
# comp.initialize(*args)
comp.setup('.')
comp.initialize(None)
comp.get_start_time()
comp.get_end_time()
comp.get_current_time()
comp.update()
comp.finalize()

Permamodel

Permamodel is included in the `csdms-stack` metapackage. Test a component 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()