Selecting the number of CPUs for the PCB simulation
First, you need to decide whether you will run the MITgcm as a debugging simulation (with 13 CPUs), or as a full science simulation (with 96 CPUs). You can change the number of CPUs for your MITgcm simulation with the setcpus
script:
To select a 13 CPU debugging simulation, type the following commands:
cd /n/regal/sunderland_lab/YOUR-USER-NAME/MITgcm_code/
./setcpus 13 pcb
Or to select a 96 CPU science simulation, type:
cd /n/regal/sunderland_lab/YOUR-USER-NAME/MITgcm_code/
./setcpus 96 pcb
The setcpus script will copy a couple of files into place with appropriate settings for each simulation.
Changing default PCB simulation parameter settings (if necessary)
First, if you need to override any of the default settings in the various header files (i.e. to increase parameter sizes), you can place updated files into this directory (created when you run ./setcpus in a previous step):
MITgcm_code/verification/pcb/code
Beware that the /verification/pcb/code/ directory does not contain all pcb simulation code. It only contains the files that you manually copied from the main code, edited, and saved to the directory. Here is a list of the most important settings:
File | Modification | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PROFILES_SIZE.h | Changed parameter NOBSGLOB from 500 to 400000 to allow MITgcm to read certain files in the run/profiles directory | ||||||||||||||||||||||||||||||
PCB_OPTIONS.h | You can define (or undefine) several C-preprocessor switches to turn activate (or deactivate) various PCB simulation options.
| ||||||||||||||||||||||||||||||
PCB_SIZE.h | You can modify tracer indices and size parameters for the PCB simulation if necessary:
|
You will probably not need to change any of the above settings unless you are making your own modifications to the PCB simulation.
Building the mitgcmuv executable for the PCB simulation
Once you are sure that you have made the proper settings in th pcb/code
directory, change to the build directory:
cd ../build
and type the following commands:
premake
make -j13 depend
make -j13
cp mitgcmuv ../run
Each of these commands will be described in more detail below:
Command | Description |
---|---|
premake | premake is an alias in your ~/.bashrc_mitgcm file.
|
make -j13 depend | This command builds the “dependencies” listing and adds it to the Makefile. In other words, it tells the Makefile which source code files depend on which other files.
|
make -j13 | Builds the MITgcm source code into an executable.
|
cp mitgcmuv ../run | Copies the mitgcmuv executable to the run directory, where it will be used to run MITgcm simulations. |