Newer
Older
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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.