Or run the script from the command line
If your computer system does not use a scheduler, or if you are logged into an Amazon Web Services (AWS) cloud instance, then you can run GEOS-Chem Classic directly from the terminal command line.
Here is a sample run script for interactive use. It is similar to the run script shown previously, with a few edits:
#!/bin/bash
###############################################################################
### Sample GEOS-Chem run script for interactive use
###############################################################################
# Set the proper # of threads for OpenMP
export OMP_NUM_THREADS=8
# Max out stack memory available to GEOS-Chem
ulimit -s unlimited
export OMP_STACKSIZE=500m
# Run GEOS-Chem. The "time" command will return CPU and wall times.
# Stdout and stderr will be directed to the "GC.log" log file
# (you can change the log file name below if you wish)
time -p ./gcclassic > GC.log 2>&1
# Exit normally
exit 0
The modifications entail:
Removing the SLURM-specific commands (i.e.
#SBATCH
,$SLURM_CPUS__PER_TASK
, andsrun
).
Manually specifying the number of cores that you wish GEOS-Chem to use (
export $OMP_NUM_THREADS=8
).Note
If you are logged into an AWS cloud instance, you can add
export OMP_NUM_THREADS=`ncpus`
to the run script. This will automatically set
OMP_NUM_THREADS
to the available number of cores.
To run GEOS-Chem interactively, type:
$ ./geoschem.run > GC.log 2>&1 &
This will run the job in the background. To monitor the progress of the job you can type:
$ tail -f GC.log
which will show the contents of the log file as they are being written.
Another way to view output from GEOS-Chem in real time is to use the tee command . This will print output to the screen and also send the same output to a log file. Type:
$ ./geoschem.run | tee GC.log