This is an implementation of parallel speedy.f90 software for multi-core processors.
Original project is from: https://github.com/samhatfield/speedy.f90
speedy.f90 is an intermediate complexity atmospheric general circulation model written in modern Fortran. It is based on SPEEDY, developed by Fred Kucharski, Franco Molteni and Martin P. King. Zenodo DOI: 10.5281/zenodo.5816982
In this project, we implement a parallel speedy.f90 using OpenMP, add supports for building on multiple platforms including Intel® CPU, AMD® CPU, with different compilers:
- GNU Fortran compiler
gfortran
- Intel Fortran compiler
ifort
- Intel OneAPI Fortran compiler
ifx
- Cray Fortran compiler
ftn
Steps for installation are basically the same as the original speedy.f90, but with extensions of builing options.
-
Install the NetCDF library and get the location the install directory.
-
Set the NETCDF environment variable to point to the directory containing the NetCDF include and lib directories.
-
Run build.sh to build speedy.f90:
bash build.sh --target <TARGET>
, some optional targets include:Parameter Compiler Platforms OpenMP general gfortran Intel, AMD Off genomp gfortran Intel, AMD On intel Intel compiler Intel Off intelomp Intel compiler Intel On
For example, to install on Intel CPUs with OpenMP enabled:
bash build.sh --target intelomp
Edit the parameters in namelist.mnl if necessary, then bash run.sh
.
Most commonly used parameters in our experiments:
! nsteps_out = model variables are output every nsteps_out timesteps
! nstdia = model diagnostics are printed every nstdia timesteps
¶ms
nsteps_out = 100
nstdia = 180
/
! start_datetime = the start datetime of the model integration
! end_datetime = the end datetime of the model integration
&date
start_datetime%year = 1982
start_datetime%month = 1
start_datetime%day = 1
start_datetime%hour = 0
start_datetime%minute = 0
end_datetime%year = 1982
end_datetime%month = 2
end_datetime%day = 1
end_datetime%hour = 0
end_datetime%minute = 0
/
- "Segmentation fault" when omp enabled: try
ulimit -s unlimited
. - Multiple threads not monitored:
setenv OMP_DYNAMIC false
orexport OMP_DYNAMIC=FALSE
.