Changes between Version 1 and Version 2 of BuildingRoms
- Timestamp:
- 05/30/07 14:42:46 (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
BuildingRoms
v1 v2 7 7 1. Make a project directory 8 8 On our Opteron cluster, I have one directory where I keep the source code 9 10 /home/rsignell/models/roms_rutgers/trunk 11 9 {{{/home/rsignell/models/roms_rutgers/trunk}}} 12 10 and another where I actually do model runs 13 14 /home/rsignell/projects/ 11 {{{/home/rsignell/projects/}}} 15 12 16 13 So on my system, for a new test, I make a directory called 17 18 /home/rsignell/projects/test1 14 {{{/home/rsignell/projects/test1}}} 19 15 20 16 2. Checkout the source code using SVN (or unpack the source code if 21 you grabbed my tarfile) and copy the "build.sh"script (which you will22 find in ./ROMS/Binsubdirectory) to your project directory.17 you grabbed my tarfile) and copy the {{{build.sh}}} script (which you will 18 find in {{{./ROMS/Bin}}} subdirectory) to your project directory. 23 19 24 3. Edit "build.sh"20 3. Edit {{{build.sh}}} 25 21 26 I edit "build.sh" to specify: 22 I edit {{{build.sh}}} to specify: 23 {{{ 27 24 MY_ROMS_APPLICATION=LAKE_SIGNELL 28 25 MY_ROMS_SRC=/home/rsignell/models/roms_rutgers/trunk 29 26 MY_PROJECT_DIR=/home/rsignell/projects/test1 30 31 and set which compiler I want to use (e.g. pgi, ifort) and what type27 }}} 28 and set which compiler I want to use (e.g. {{{pgi}}}, {{{ifort}}}) and what type 32 29 of executable I want (MPI, OpenMP, or Serial) 33 30 34 31 Even though I use the pgi compiler on our cluster, I actually build 35 MPI code using the "mpif90" script, so I set USE_MPIF90on as well as36 pgi.32 MPI code using the {{{mpif90}}} script, so I set {{{USE_MPIF90}}} on as well as 33 {{{pgi}}}. 37 34 38 35 4. Compile. 39 Run the build.shscript. If you have more than one processor on the40 machine you are compiling on you can use the -joption to build36 Run the {{{build.sh}}} script. If you have more than one processor on the 37 machine you are compiling on you can use the {{{-j}}} option to build 41 38 faster. For example, to use 2 cpus: 42 39 {{{ 43 40 ./build.sh -j2 44 41 }}} 45 42 5. Set up the input files for the run 46 43 ROMS uses an ASCII input file to specify some of the run parameters, 47 and 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 50 right input file for the LAKE_SIGNELLcase. We also want a copy of51 varinfo.dat, which defines NetCDF parameters.52 44 and we use the {{{.in}}} extension by convention to indicate these files. 45 For the test cases, these are found in the {{{~/ROMS/External directory}}}. 46 So to run ROMS from our project directory, we need to copy over the 47 right input file for the {{{LAKE_SIGNELL}}} case. We also want a copy of 48 {{{varinfo.dat}}}, which defines NetCDF parameters. 49 {{{ 53 50 cp ~/models/ROMS/External/{ocean_lake_signell.in,varinfo.dat} ~/projects/test1 54 55 6. Run 56 ./oceanS < ocean_lake_signell.in(Serial)57 ./oceanO < ocean_lake_signell.in(OpenMP)58 mpirun -n 16 -hostfile node_file ./oceanM lake_signell.in(MPI)51 }}} 52 6. Run. 53 {{{./oceanS < ocean_lake_signell.in}}} (Serial) 54 {{{./oceanO < ocean_lake_signell.in}}} (OpenMP) 55 {{{mpirun -n 16 -hostfile node_file ./oceanM lake_signell.in}}} (MPI)