follow the steps below to set up the environment variable for linux
first type module --version
if not showing anything, install it first
check to see the correct modulepath and modulefiles. use echo $MODULEPATH
to see the directories containing modulefiles.
you will see directories where the module command will look for modulefiles
type modinfo -n gcc/9.4.0
to see the full path to the module file and if it's not there, then you need to create one in your home directory
or another modulepath.
to load the module for gcc/9.4.0 use module load gcc/9.4.0
. this should set the environment variables and paths for using
gcc-9 as your compiler.
and yes, you can use the icc -0 xxxxx
to compile your code with gcc-9
for a deep understanding the following link will help:
https://modules.readthedocs.io/en/latest/INSTALL.html
https://southgreenplatform.github.io/trainings/hpc/moduleinstallation/
> book: linux pocket guide by daniel J. Barrett
>
> book: The linux command line by william shotts