Difference between revisions of "CMT Command Line Tools"

From CSDMS
(The CMT command line tools getting started guide)
 
m (Describe the CMT resource file)
Line 3: Line 3:
  
 
{{Alert Box|message=Before beginning, you will need to have:
 
{{Alert Box|message=Before beginning, you will need to have:
* Set up an account on the [[HPCC_account_requirements | CSDMS cluster]], and be able to connect to it through an ssh client.]]
+
* Set up an account on the [[HPCC_account_requirements | CSDMS cluster]], and be able to connect to it through an ssh client.
 
}}
 
}}
 
  
 
== Load the CMT environment  ==
 
== Load the CMT environment  ==
Line 22: Line 21:
  
 
== Running a simple example ==
 
== Running a simple example ==
 +
 +
To run an example we first must prepare a CMT resource file. The resource file will tell CMT what components to use and how to connect them. The most basic way to run CMT on the command line is,
 +
 +
<syntaxhighlight lang=bash>
 +
$ cmt my_resource_file.rc
 +
</syntaxhighlight>
 +
 +
where <tt>my_resource_file.rc</tt> is described in the next section. Usually this file is prepared by the CMT graphical user interface, however, it is a fairly simple format and can be created by-hand without too much effort. It is much easier to start with a template though so I will provide links to some sample resource files.
  
 
== The CMT Resource File ==
 
== The CMT Resource File ==
 +
 +
The CMT resource file tells the CMT what to do through three main commands:
 +
# <tt>instantiate</tt>. Create an instance of a component.
 +
# <tt>connect</tt>. Connect two components.
 +
# <tt>parameters</tt>. Set a model parameter
 +
There are other too, but these are the main ones.

Revision as of 17:28, 2 May 2013

The CMT Command Line Tools

Warning 32.png Before beginning, you will need to have:
  • Set up an account on the CSDMS cluster, and be able to connect to it through an ssh client.

Load the CMT environment

Once logged into the CSDMS High Performance Computing Cluster, beach.colorado.edu, you will need to set up your environment to use the CMT command line tools. This is most easily done using modules.

$ module purge
$ module load cmtcl

This clears any previously loaded modules and then adds the cmt command to your path. If you have done this successfully, the following should print out a brief help message that describes some of the options for the cmt command,

$ cmt --help

Running a simple example

To run an example we first must prepare a CMT resource file. The resource file will tell CMT what components to use and how to connect them. The most basic way to run CMT on the command line is,

$ cmt my_resource_file.rc

where my_resource_file.rc is described in the next section. Usually this file is prepared by the CMT graphical user interface, however, it is a fairly simple format and can be created by-hand without too much effort. It is much easier to start with a template though so I will provide links to some sample resource files.

The CMT Resource File

The CMT resource file tells the CMT what to do through three main commands:

  1. instantiate. Create an instance of a component.
  2. connect. Connect two components.
  3. parameters. Set a model parameter

There are other too, but these are the main ones.