diff --git a/docs.it4i/cs/arm.md b/docs.it4i/cs/arm.md new file mode 100644 index 0000000000000000000000000000000000000000..f5bd27fc8904db177e6064ccc12bca2b840d4643 --- /dev/null +++ b/docs.it4i/cs/arm.md @@ -0,0 +1,49 @@ +# Using ARM partition + +For testing your application on the ARM partition, +you need to prepare a job script for that partition or use the interactive job: + +``` +salloc -A PROJECT-ID -p p01-arm +``` + +On the partition, you should reload the list of modules: + +``` +ml architecture/aarch64 +``` + +For compilation, `gcc` and `OpenMPI` compilers are available. +Hence, the compilation process should be the same as on the `x64` architecture. + +Let's have the following `hello world` example: + +``` +#include "mpi.h" +#include "omp.h" + +int main(int argc, char **argv) +{ + int rank; + MPI_Init(&argc, &argv); + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + #pragma omp parallel + { + printf("Hello on rank %d, thread %d\n", rank, omp_get_thread_num()); + } + MPI_Finalize(); +} +``` + +You can compile and run the example: + +``` +ml OpenMPI/4.1.4-GCC-11.3.0 +mpic++ -fopenmp hello.cpp -o hello +mpirun -n 4 ./hello +``` + +Please see [gcc options](https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html) for more advanced compilation settings. +No complications are expected as long as the application does not use any intrinsic for `x64` architecture. +If you want to use intrinsic, +[SVE](https://developer.arm.com/documentation/102699/0100/Optimizing-with-intrinsics) instruction set is available.