User Programming Environment
Last updated
Last updated
The conda/pytorch_1.11.0 and conda/tensorflow_2.4.1 modules are pre-configured with the necessary libraries for using PyTorch and TensorFlow. To use the conda command, you must first load the python/3.7.1 module.
It is recommended to use the Anaconda environment for AI frameworks on the Neuron system (please verify the licensing conditions).
Users can build and run Singularity container images based on their requirements to execute their programs.
Refer to [Appendix 3] ‘How to Use Singularity container’
※ Non-CUDA MPI libraries must be employed to use nodes that are not equipped with GPUs.
※ For user convenience, the "module" command can be abbreviated as the "ml" command.
Print a list of available modules
You can check a list of available modules, such as compilers and libraries.
Add a module to be used
You can add modules that you plan to use, such as compilers and libraries.
Modules that will be used can be added simultaneously.
Delete used modules
You can remove unnecessary modules. Several modules can be deleted simultaneously.
Print a list of used modules
You can check the list of modules that are currently configured.
Delete all used modules simultaneously.
Check the module installation path.
Finding a module
Saving and managing user module collections
A sequential program is a program that does not consider the parallel program environment. That is, it is a program that does not use a parallel program interface, such as OpenMP or MPI. A sequential program is run using only one processor in one node. Compiler-specific options used for compiling sequential programs are also used when compiling parallel programs. Hence, reference should be made to these options even if you are not interested in sequential programs.
To use an Intel compiler, add the required version of the Intel compiler module. Available modules can be checked using the “module avail” command.
※ Check available versions by referring to the programming tool installation status table.
Compiler types
icc / icpc
C / C++
.C, .cc, .cpp, .cxx,.c++
ifort
F77/F90
.f, .for, .ftn, .f90, .fpp, .F, .FOR, .FTN, .FPP, .F90
Intel compiler usage example
The following is an example of compiling a test sample file using an Intel compiler to generate a test.exe executable file.
※ You can copy a test sample file for job submission from /apps/shell/job_examples and use it.
2) GNU compiler
To use a GNU compiler, add the required version of the GNU compiler module. Available modules can be checked using the “module avail” command.
※ Check available versions by referring to the programming tool installation status table.
※ You must use version "gcc/4.8.5" or higher.
Compiler types
gcc / g++
C / C++
.C, .cc, .cpp, .cxx,.c++
gfortran
F77/F90
.f, .for, .ftn, .f90, .fpp, .F, .FOR, .FTN, .FPP, .F90
GNU compiler usage example
The following is an example of compiling a test sample file using a GNU compiler to generate a test.exe executable file.
※ You can copy a test sample file for job submission from /apps/shell/job_examples and use it.
To use a PGI compiler, add the required version of the PGI compiler module. Available modules can be checked using the “module avail” command.
※ Check available versions by referring to the programming tool installation status table.
Compiler types
pgcc / pgc++
C / C++
.C, .cc, .cpp, .cxx,.c++
pgfortran
F77/F90
.f, .for, .ftn, .f90, .fpp, .F, .FOR, .FTN, .FPP, .F90
PGI compiler usage example
The following is an example of compiling a test sample file using a PGI compiler to generate a test.exe executable file.
※ You can copy a test sample file for job submission from /apps/shell/job_examples and use it.
OpenMP is a technique developed to simplify the utilization of multi-threading through compiler directives alone. When compiling parallel programs using OpenMP, the same compiler as for sequential programs is used, with the addition of specific compiler options for parallel compilation. Most modern compilers support OpenMP directives.
icc / icpc / ifort
C / C++ / F77/F90
-qopenmp
gcc / g++ / gfortran
C / C++ / F77/F90
-fopenmp
pgcc / pgc++ / pgfortran
C / C++ / F77/F90
-mp
Example of compiling an OpenMP program (Intel compiler)
❍ The following is an example of compiling the test_omp sample file using the Intel compiler to create the executable file test_omp.exe with OpenMP:
Example of compiling an OpenMP program (GNU compiler)
The following is an example of compiling the test_omp sample file using the GNU compiler to create the executable file test_omp.exe with OpenMP:
Example of compiling an OpenMP program (PGI compiler)
The following is an example of compiling the test_omp sample file using the PGI compiler to create the executable file test_omp.exe with OpenMP:
Users can execute the MPI commands listed in the table below. These commands function as wrappers, allowing the compiler specified in the .bashrc file to compile the source code.
Category
Intel
GNU
PGI
Fortran
ifort
gfortran
pgfortran
Fortran + MPI
mpiifort
mpif90
mpif90
C
icc
gcc
pgcc
C + MPI
mpiicc
mpicc
mpicc
C++
icpc
g++
pgc++
C++ + MPI
mpiicpc
mpicxx
mpicxx
Even if compiling is performed using mpicc, it is necessary to use the options that correspond to the original compiler being wrapped.
Example of compiling an MPI program (Intel compiler)
The following is an example of compiling the test_mpi sample file using the Intel compiler to create the executable file test_mpi.exe with MPI:
Example of compiling an MPI program (GNU compiler)
The following is an example of compiling the test_mpi sample file using the GNU compiler to create the executable file test_mpi.exe with MPI:
Example of compiling an MPI program (PGI compiler)
The following is an example of compiling the test_mpi sample file using the PGI compiler to create the executable file test_mpi.exe with MPI:
Example of compiling a CUDA + MPI program
※ When using the Intel compiler, load the intel/19.1.2 module instead of gcc/10.2.0
Last updated on November 08, 2024.