GEOS GCM Quick Start: Difference between revisions

No edit summary
No edit summary
Line 31: Line 31:
  module load GEOSenv
  module load GEOSenv


which obtains the latest <code>git</code>, <code>CMake</code>, and <code>manage_externals</code> modules.
which obtains the latest <code>git</code>, <code>CMake</code>, and <code>mepo</code> modules.


== Cloning the Model ==
== Cloning the Model ==
Line 48: Line 48:


   git clone -b v10.17.0 https://github.com/GEOS-ESM/GEOSgcm.git
   git clone -b v10.17.0 https://github.com/GEOS-ESM/GEOSgcm.git
But if you do this you *should* use the Mepo method of building GEOS below. This is due to restrictions in how <code>checkout_externals</code> works (it refers to the sub-repositories of GEOS with SSH urls).


== Building GEOS ==
== Building GEOS ==
Line 59: Line 57:
==== Develop Version of GEOS GCM ====
==== Develop Version of GEOS GCM ====


The user will notice two files in the main directory: <code>Externals.cfg</code> and <code>Develop.cfg</code>. The difference between these two is that <code>Externals.cfg</code> always refers to stable tested released subrepositories. The <code>Develop.cfg</code> points to the <code>develop</code> branch of <code>@GEOSgcm_GridComp</code> and <code>@GEOSgcm_App</code>. This is equivalent in the CVS days of the difference between a stable <code>Jason-X_Y</code> tag and the development <code>Jason-UNSTABLE</code> tag. In order to build the <code>Develop.cfg</code> version of the model with <code>parallel_build.csh</code> do:
<code>parallel_build.csh</code> provides a special flag for checking out the development branches of GEOSgcm_GridComp and GEOSgcm_App. If you run:


parallel_build.csh -develop
<pre>parallel_build.csh -develop</pre>
then <code>mepo</code> will run:


<pre>mepo develop GEOSgcm_GridComp GEOSgcm_App</pre>
==== Debug Version of GEOS GCM ====
==== Debug Version of GEOS GCM ====


To obtain a debug version, you can run <code>parallel_build.csh -debug</code> which will build with debugging flags. This will build in <code>build-Debug/</code> and install into <code>install-Debug/</code>.
To obtain a debug version, you can run <code>parallel_build.csh -debug</code> which will build with debugging flags. This will build in <code>build-Debug/</code> and install into <code>install-Debug/</code>.


==== Mepo Version of GEOS GCM ====
==== Debug Version of GEOS GCM ====


GEOS GCM will soon be transitioning from using <code>checkout_externals</code> to using [https://github.com/GEOS-ESM/mepo <code>mepo</code>], a GMAO-developed multi-repository management tool. If you wish to use it via <code>parallel_build.csh</code> you can run:
To obtain a debug version, you can run <code>parallel_build.csh -debug</code> which will build with debugging flags. This will build in <code>build-Debug/</code> and install into <code>install-Debug/</code>.
 
parallel_build.csh -mepo
 
along with any other flags you usually use (<code>-develop</code> and <code>-debug</code>).


=== Multiple Steps for Building the Model ===
=== Multiple Steps for Building the Model ===


The steps detailed below are essentially those that <code>parallel_build.csh</code> performs for you. Either method should yield identical builds.
The steps detailed below are essentially those that <code>parallel_build.csh</code> performs for you. Either method should yield identical builds.
==== Checkout externals ====
Using the <code>checkout_externals</code> command to compose the model is done by:
cd GEOSgcm
checkout_externals
====== Checking out develop ======
To use the <code>Develop.cfg</code> file, run:
checkout_externals -e Develop.cfg


==== Mepo ====
==== Mepo ====


To checkout the full model with the [https://github.com/GEOS-ESM/mepo <code>mepo</code>] tool, you run:
The GEOS GCM is comprised of a set of sub-repositories. These are managed by a tool called [https://github.com/GEOS-ESM/mepo mepo]. To clone all the sub-repos, you can run <code>mepo clone</code> inside the fixture:
 
mepo init
mepo clone


<pre>cd GEOSgcm
mepo clone</pre>
The first command initializes the multi-repository and the second one clones and assembles all the sub-repositories according to <code>components.yaml</code>
The first command initializes the multi-repository and the second one clones and assembles all the sub-repositories according to <code>components.yaml</code>


===== Checking out develop =====
==== Checking out develop branches of GEOSgcm_GridComp and GEOSgcm_App ====
 
To get development branches of GEOS GCM with <code>mepo</code> is different. <code>mepo</code> itself knows (via <code>components.yaml</code>) what the development branch of each subrepository is. The equivalent of <code>Develop.cfg</code> for <code>mepo</code> is to checkout the development branches of GEOSgcm_GridComp and GEOSgcm_App:
 
mepo develop GEOSgcm_GridComp GEOSgcm_App


This must be done after <code>mepo clone</code> as it is running a git command in each sub-repository.
To get development branches of GEOSgcm_GridComp and GEOSgcm_App (a la the <code>-develop</code> flag for <code>parallel_build.csh</code>, one needs to run the equivalent <code>mepo</code> command. As mepo itself knows (via <code>components.yaml</code>) what the development branch of each subrepository is, the equivalent of <code>-develop</code> for <code>mepo</code> is to checkout the development branches of GEOSgcm_GridComp and GEOSgcm_App:


<pre>mepo develop GEOSgcm_GridComp GEOSgcm_App</pre>
This must be done ''after'' <code>mepo clone</code> as it is running a git command in each sub-repository.
==== Build the Model ====
==== Build the Model ====