Changes between Initial Version and Version 1 of BuildingRoms


Ignore:
Timestamp:
05/30/07 14:33:07 (17 years ago)
Author:
csherwood
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildingRoms

    v1 v1  
     1Although you could just work within the source code distribution
     2using the Makefile, it's cleaner and will be better for you in the
     3future if you learn to use the build.sh script that allows you to
     4leave the source code directory unmodified, and have all the project
     5specific stuff in project directories.  Here's how it works:
     6
     71. Make a project directory
     8On our Opteron cluster, I have one directory where I keep the source code
     9
     10/home/rsignell/models/roms_rutgers/trunk
     11
     12and another where I actually do model runs
     13
     14/home/rsignell/projects/
     15
     16So on my system, for a new test, I make a directory called
     17
     18/home/rsignell/projects/test1
     19
     202. Checkout the source code using SVN (or unpack the source code if
     21you grabbed my tarfile) and copy the "build.sh" script (which you will
     22find in ./ROMS/Bin subdirectory) to your project directory.
     23
     243. Edit "build.sh"
     25
     26I  edit "build.sh" to specify:
     27MY_ROMS_APPLICATION=LAKE_SIGNELL
     28MY_ROMS_SRC=/home/rsignell/models/roms_rutgers/trunk
     29MY_PROJECT_DIR=/home/rsignell/projects/test1
     30
     31and set which compiler I want to use (e.g. pgi, ifort) and what type
     32of executable I want (MPI, OpenMP, or Serial)
     33
     34Even though I use the pgi compiler on our cluster, I actually build
     35MPI code using the "mpif90" script, so I set USE_MPIF90 on as well as
     36pgi.
     37
     384. Compile.
     39Run the build.sh script.  If you have more than one processor on the
     40machine you are compiling on you can use the -j option to build
     41faster.  For example, to use 2 cpus:
     42
     43./build.sh -j2
     44
     455. Set up the input files for the run
     46ROMS uses an ASCII input file to specify some of the run parameters,
     47and we use the ".in" extension by convention to indicate these files.
     48 For the test cases, these are found in the ~/ROMS/External directory.
     49 So to run ROMS from our project directory, we need to copy over the
     50right input file for the LAKE_SIGNELL case.  We also want a copy of
     51varinfo.dat, which defines NetCDF parameters.
     52
     53cp ~/models/ROMS/External/{ocean_lake_signell.in,varinfo.dat} ~/projects/test1
     54
     556. Run
     56./oceanS < ocean_lake_signell.in  (Serial)
     57./oceanO < ocean_lake_signell.in  (OpenMP)
     58mpirun -n 16 -hostfile node_file ./oceanM lake_signell.in   (MPI)