gnu-compilers
Summary
Module Name: gcc
Support Level: Primary Support
Software Access Level: Open Access
Home Page: https://gcc.gnu.org
Software Description
MSI systems have available the GNU project compilers for C, C++, and Fortran. Extensive information concerning regarding these compilers is available at the GNU Compiler Collection website . gcc is installed natively on most systems. If gcc is installed natively, no module load is required for the default version of gcc. To see if gcc is installed natively:
which gcc
General Linux
To load this module for use in a Linux environment, you can run the command:
module load gcc
Depending on where you are working, there may be more than one version of gcc available. To see which modules are available for loading you can run:
module avail gcc
Slurm Example
#!/bin/bash
#SBATCH --job-name="rfm_RunGNU_COMPILER_Test_job"
#SBATCH --ntasks=1
#SBATCH --ntasks-per-node=1
#SBATCH --output=rfm_RunGNU_COMPILER_Test_job.out
#SBATCH --error=rfm_RunGNU_COMPILER_Test_job.err
#SBATCH --time=0:10:0
#SBATCH -p msismall
module load gcc/8.2.0
wget https://public.s3.msi.umn.edu/reframe/sw/gnu/hello.c
wget https://public.s3.msi.umn.edu/reframe/sw/gnu/hello.cpp
gcc hello.c -o hello; ./hello; g++ hello.cpp -o hello_cpp; ./hello_cpp