-
Notifications
You must be signed in to change notification settings - Fork 0
Programming language resources
Many numerically-intensive science applications (such as GEOS-Chem) are written in Fortran, which generates highly-optimized executables suitable for running on HPC installations. There are several Fortran compilers available, but we recommend the GNU Fortran (aka gfortran), which is open-source, and therefore suitable for running in cloud computing environments.
- GNU Fortran Compiler page on the GEOS-Chem wiki
- Intel Fortran Compiler page on the GEOS-Chem wiki
- FortranTutorial.com
- Introduction to Modern Fortran (by Cambridge Univ, UK)
- Fortran tutorial (by Victor Decyk, UCLA
- Fortran 90 for the Fortran 77 programmer
- Using OpenMP parallelization with Fortran (by openmp.org)
- Degenerate Conic blog by Jacob Williams -- interesting Fortran developments
We use GCPy and other Python code to analyze and visualize output from GEOS-Chem simulations. Python, which is open-source, contains many packages that are suitable for scientific applications. Please also see our list of Python tools for GEOS-Chem.
You can also use mamba to install custom Python environments for your research applications. By default mamba installs your packages in your home directory under ~/.conda. While a safe place to keep this data it is also very low performance due to filesystem latency. It also makes it hard to share your Python environments with other people on the cluster.
You can tell mamba to install to a different location. We recommend installing Python environments to your /n/jacob_lab/Users/$USER directory (where $USER is the environment variable that stores your Cannon username).
-
Make sure that the Python 3.10.9 module is loaded into your Linux environment. This also loads the
mambapackage manager.module list python Currently Loaded Modules Matching: python 1) module load python/3.10.9-fasrc01
If python is not loaded, then type:
$ module load python/3.10.9-fasrc01 -
Create the following directory:
$ cd /n/jacob_lab/Users/$USER $ mkdir -p mamba
-
Add the following environment variables to your
~/.my_personal_settingsor~/.bash_aliasesfile (whichever one you have):# Specify installation path for Python packages and environments export MAMBA_PREFIX="/n/jacob_lab/Users/$USER/mamba" export MAMBA_ENVS_PATH="${MAMBA_PREFIX}/envs" export MAMBA_PKGS_DIRS="${MAMBA_PREFIX}/pkgs"
-
Apply the changes by typing:
$ source ~/.bashrc -
Create the environment. We recommend using a YAML configuration file (such as
$ mamba env create -n ENV-NAME --file=CONFIG-FILE-NAMEwhere
ENV-NAMEis the name of your Python environment andCONFIG-FILE-NAMEis the name of a YAML configuration file containing a list of packages to be installed. If you don't have a configuration file, you can modify an existing configuration file (such as theenvironment.ymlfile that ships with GCPy). -
To activate the environment, type:
$ mamba activate ENV-NAMEand to deactivate the environment, type:
$ mamba deactivate
Follow these instructions to recreate a Mamba environment on a new machine.
-
Activate your current Mamba environment and export the package list to a YAML file:
$ mamba activate my-env $ mamba env export > my-environment.yml $ mamba deactivate
-
Log into the new machine and transfer the
my-environment.ymlfile there. Then use the following commands:$ mamba create --name my-env $ mamba activate my-env $ mamba env update --name root --file my-environment.yml $ mamba deactivate my-env
-
Delete your original Mamba environment on the old machine (if necessary):
$ mamba remove --name my-env --all
Group members: Feel free to add Need links here.