Table of Contents |
---|
minLevel | 1 |
---|
maxLevel | 2 |
---|
include | |
---|
outline | false |
---|
indent | |
---|
exclude | |
---|
type | list |
---|
class | |
---|
printable | false |
---|
|
...
Expand |
---|
|
[Feb 2024] According to the information from nvidia-smi , NVIDIA driver version on LANTA is currently525.105.17 which supports CUDA version up to 12.0. Please be aware of the compatibility between CUDA and cray-mpich . For instance, CUDA 12 is supported only since cray-mpich/8.1.27 . For cross-compile, you may have to use nvcc -ccbin cc to compile .cu You have to manually pass the respective OpenACC/OpenMP offloading flags of each compiler. You may have to pass -lcudart (cudatoolkit), -L${NVIDIA_PATH}/cuda/lib64 -lcudart -lcuda (nvhpc-mixed) and possibly a few others at linking phase (or by setting them in LDFLAGS before configure).
|
Build target
To enable optimizations that depend on the hardware architecture of LANTA, the following modules should be loaded together with PrgEnv
.
...
Expand |
---|
title | Example: PrgEnv-intel + NetCDF |
---|
|
Code Block |
---|
| module purge
module load craype-x86-milan
module load PrgEnv-intel
module load cray-hdf5-parallel
module load cray-netcdf-hdf5parallel
module list
# Without version specified, the latest version will be loaded. |
|
CPE version
...
Expand |
---|
title | [Feb 2024] Current CPE toolchains |
---|
|
CPE toolchain | Note |
---|
cpeGNU/23.03 | GCC 11.2.0 | cpeCray/23.03 | CCE 15.0.1 | cpeIntel/23.03 | Deprecated and hidden. It will be removed in the future. | cpeIntel/23.09 | Intel Compiler 2023.1.0 |
|
...
All ThaiSC modules are located at the same module path, so there is no module hierarchy. Executing module avail
on LANTA will display all available ThaiSC modules. For a more concise list, you can use module overview
. To learn more about a specific module, then, use module whatis <name>
and or module help <name>
to learn more about a specific module.
Users can readily use ThaiSC modules and CPE toolchains to build their applications. Some popular application software are pre-installed as well, for more information, refer to Applications usage.
...
Expand |
---|
title | Example: HelloWorld.cpp |
---|
|
Code Block |
---|
| # Create the source code
cat << Eof > HelloWorld.cpp
#include <iostream>
#include <mpi.h>
#include <omp.h>
int main(){
int rank, thread ;
omp_lock_t io_lock ;
omp_init_lock(&io_lock);
MPI_Init(nullptr,nullptr);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
#pragma omp parallel private(thread)
{
thread = omp_get_thread_num();
omp_set_lock(&io_lock);
std::cout << "HelloWorld from rank " << rank << " thread " << thread << std::endl;
omp_unset_lock(&io_lock);
}
omp_destroy_lock(&io_lock);
MPI_Finalize();
return 0; }
Eof
# Compile the source file 'HelloWorld.cpp'
CC -craype-verbose -o hello.exe HelloWorld.cpp -fopenmp
# Run the program
srun -p compute-devel -N1 -n4 -c2 hello.exe |
|
...
3. Adding software paths
The Linux OS will not be able to find your program if it is not in its search paths. The commonly used ones are namely PATH
(for executable/binary), LD_LIBRARY_PATH
(for shared library), and PYTHONPATH
(for python packages). Users MUST append or prepend them using syntax such as export PATH=<software-bin-path>:${PATH}
, otherwise, prior search paths added by module load
and others will disappear.
If <your-install-location>
is where your software is installed, then putting the below commands in your job script should be sufficient in most cases.
...
Some of them can be omitted if there no such sub-directory when using ls <your-install-location>
. Additionally,
...
the software also generates Python packages, then you may have to check where those packages are installed. Usually, they are in <your-install-location>/lib/python<Version>/site-packages , <your-install-location>/lib64/python<Version>/site-packages or other similar paths. Then, adding a line such as below would inform Python where the packages are. Code Block |
---|
| export PYTHONPATH=<your-install-location>/lib/python<Version>/site-packages:${PYTHONPATH} |
|
Expand |
---|
|
If some software dependencies were installed locally, their search paths should also be added. We do NOT recommend specifying these search paths in ~/.bashrc directly, as it could lead to library conflicts when having more than one main software. Some software provides a script to be sourced before using. In this case
|
...
Expand |
---|
|
If the software also generates Python packages, then you may have to check where those packages are installed. Usually, they are in <your-install-location>/lib/python<Version>/site-packages , <your-install-location>/lib64/python<Version>/site-packages or other similar paths. Then, adding a line such as below would make Python know where the packages are. Code Block |
---|
| export PYTHONPATH=<your-install-location>/lib/python<Version>/site-packages:${PYTHONPATH} |
|
Expand |
---|
|
When executing your program, if you encounter If 'xxx' is not a typo you can use command-not-found to lookup ... , then, your current PATH variable may be incorrect.
xxx: error while loading shared libraries: libXXX.so: cannot open shared object file , then,
If libXXX.so seem to be related to your software, then you may set LD_LIBRARY_PATH variable in Step 3 incorrectly. If libXXX.so seem to be from a module you used to build your software, then loading that module should fix the problem.
ModuleNotFoundError: No module named 'xxx' , then, your current PYTHONPATH may be incorrect.
Preliminary check could be performed on frontend node by doing something like Code Block |
---|
| bash # You should check them in another bash shell
module purge
module load <...>
module load <...>
export PATH=<software-bin-path>:${PATH}
export LD_LIBRARY_PATH=<software-lib/lib64-path>:${LD_LIBRARY_PATH}
export PYTHONPATH=<software-python-site-packages>:${PYTHONPATH}
<executable> --help
<executable> --version
exit |
|
...
5. Running your software
Anchor |
---|
| RunningTheSoftware |
---|
| RunningTheSoftware |
---|
isMissingRequiredParameters | true |
---|
|
Each software has its own command to be issued. Please read the software documentation and forum. Special attention should be paid to how the software recognizes and maps computing resources (CPU-MPI-GPU); occasionally, users may need to insert additional input arguments at runtime. The total resources concurrently utilized in this stage should be less than or equal to the resources previously requested in
Stage 1. Oversubscribing resources
will can reduce overall performance and could cause permanent damage to the hardware.
...
Note |
---|
For multi-threaded applications, it is essential to specify -c or --cpus-per-tasks after srun , to prevent a potential decrease in performance (~50%) due to improper CPU binding. |
3.2 Submitting a job
Anchor |
---|
| SubmitYourJob |
---|
| SubmitYourJob |
---|
isMissingRequiredParameters | true |
---|
|
...
Code Block |
---|
|
username@lanta-xname:~> sbatch job-script.sh # Simplest
Submitted batch job XXXXXX1
username@lanta-xname:~> sbatch -J jobname1<jobname> job-script.sh # Same as having '#SBATCH -j jobname1' in job-script.sh
Submitted batch job XXXXXX2
username@lanta-xname:~> sbatch -D your<your-case-directorydirectory> job-script.sh
Submitted batch job XXXXXX3 |
...
Installation
...
guide
Reference
...