Difference between revisions of "CISM exercise I: build model"

From Interactive System for Ice sheet Simulation
Jump to: navigation, search
(Building CISM)
(Building CISM)
Line 7: Line 7:
 
Because we are currently working on readying Glimmer-CISM-2.0 for release, the most recent publicly available version on the code does not contain many recent updates that we would like to take advantage of in this coarse. For that reason, we will be working from an intermediate version of the code. The tarball for that version of the code can be found at:
 
Because we are currently working on readying Glimmer-CISM-2.0 for release, the most recent publicly available version on the code does not contain many recent updates that we would like to take advantage of in this coarse. For that reason, we will be working from an intermediate version of the code. The tarball for that version of the code can be found at:
  
  /home/stephen/tarballs/b/CISM-BNU-3-2011b.tar.gz
+
  /home/stephen/tarballs/CISM-BNU-3-2011b.tar.gz
  
 
To copy the tarball into your home directory and unpack it type
 
To copy the tarball into your home directory and unpack it type
  
  cp /home/stephen/tarballs/b/CISM-BNU-3-2011b.tar.gz ./
+
  cp /home/stephen/tarballs/CISM-BNU-3-2011b.tar.gz ./
  
 
  tar -xzvf CISM-BNU-3-2011b.tar.gz
 
  tar -xzvf CISM-BNU-3-2011b.tar.gz
Line 25: Line 25:
 
Next, we need to tell the configure script where to look to find the necessary NetCDF libraries and which fortran compiler we want to use to build the code:
 
Next, we need to tell the configure script where to look to find the necessary NetCDF libraries and which fortran compiler we want to use to build the code:
  
  ./configure --with-netcdf=/usr/local/lib FC=ifort F77=ifort
+
  ./configure --with-netcdf=/usr/local/lib FC="ifort -O0" F77="ifort -O0"
  
 
Check to make sure that the configuration step was successful with
 
Check to make sure that the configuration step was successful with

Revision as of 03:00, 21 March 2011

Building CISM

The first step is to acquire the model code. In common with many open-source projects, there are regular releases of CISM — these are numbered snapshots of the code and represent stable versions of the model (relative to development versions of the code on the repository). The latest release can be downloaded from the CISM website[1]:

http://developer.berlios.de/projects/glimmer-cism

Because we are currently working on readying Glimmer-CISM-2.0 for release, the most recent publicly available version on the code does not contain many recent updates that we would like to take advantage of in this coarse. For that reason, we will be working from an intermediate version of the code. The tarball for that version of the code can be found at:

/home/stephen/tarballs/CISM-BNU-3-2011b.tar.gz

To copy the tarball into your home directory and unpack it type

cp /home/stephen/tarballs/CISM-BNU-3-2011b.tar.gz ./
tar -xzvf CISM-BNU-3-2011b.tar.gz

To build the code, you need to first cd into the correct directory for the unpacked code:

cd CISM-BNU-3-2011b

CISM uses autotools to build the code. First, we need to build the build system by typing

./bootstrap

Next, we need to tell the configure script where to look to find the necessary NetCDF libraries and which fortran compiler we want to use to build the code:

./configure --with-netcdf=/usr/local/lib FC="ifort -O0" F77="ifort -O0"

Check to make sure that the configuration step was successful with

tail config.log

If you see 'configure: exit 0' as the final line then configure was successful. Now, we type

make

The code will take a while to build. When it is done, and assuming you haven't seen any obvious errors, you can confirm a successful build by checking in the example-drivers/simple_glide/src/ directory. If there is an executable file there called simple_glide, then your build was successful. This is the executable we will use to run the various test cases using the higher-order dynamics version of the model.


Go to the second set of exercises.

Go to the third set of exercises.

Return to main coarse page
Cite error: <ref> tags exist, but no <references/> tag was found