CMT Tutorial Build Project: Difference between revisions

From CSDMS
(Brief description on how to checkout and build a CSDMS CMT project)
 
(Redirect to pymt page)
Tag: Replaced
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
= CMT Tutorial: Build a CCA Project for CMT =
[[Image:Alert-yellow.png | center | 50px | Out-of-date page ]]
This tutorial describes how checkout the latest version of the CSDMS CCA components, create a bocca project for CMT, and compile the project.  At the end of this tutorial, the user will be able to see their new project within CMT and run its components.
This page is out of date.
 
Please see the
{| style="background-color:#ffffcc;" cellpadding="20" cellspacing="0" border="1"
[[PyMT]]
|Before beginning, you will need to have loaded the necessary modules:
page for information on the Python Modeling Toolkit,
<tt>
the successor to CMT.
:> module load git cmake
:> module load csdms cca
</tt>
|}
 
The basic steps to building the project are:
* [[CMT_Tutorial_Build_Project|Checkout]] the latest version of the CSDMS components
* [[CMT_Tutorial_Build_Project|Create]] a bocca project containing the components
* [[CMT_Tutorial_Build_Project|Compile]] the project
* [[CMT_Tutorial_Build_Project|Commit]] changes to the repository
 
== Checkout ==
The collection of CSDMS components is stored in a [http://csdms.colorado.edu/viewvc/components/ Subversion repository].  For this tutorial we will be compiling just the components for the STM project rather than the entire collection.
<syntaxhighlight lang=bash>
> git-svn clone https://csdms.colorado.edu/svn/components -s stm
</syntaxhighlight>
 
== Create ==
Move to the source directory and create a directory that will contain the build.
<syntaxhighlight lang=bash>
  > cd stm
  > mkdir _build && cd _build
</syntaxhighlight>
 
Use cmake to configure a makefile for the bocca project, and then build the project.
<syntaxhighlight lang=bash>
  > cmake ..
  > make stm
</syntaxhighlight>
This make command uses bocca-build to create the bocca project based on the XML description contained in projects/stm.xml.
 
== Commit (Optional) ==
If you've made changes to the project and would like other users to see your changes in the repository, you will need to commit your local changes.  First copy your changed files to the source directory that is under version control.
<syntaxhighlight lang=bash>
  > cd ..
  > make save
</syntaxhighlight>
This uses bocca-save to copy all of the user-editable files from your project to the versioned source directory (src/csdms).
 
You now can commit your changes.  How exactly you do this depends on what version control software you use (I'm using git-svn).  
<syntaxhighlight lang=bash>
  > git commit <changed_file>
  > git-svn dcommit
</syntaxhighlight>

Latest revision as of 15:17, 14 March 2020

Out-of-date page

This page is out of date. Please see the PyMT page for information on the Python Modeling Toolkit, the successor to CMT.