Newer
Older
1
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Compilers
## Available Compilers
There are several compilers for different programming languages available on the cluster:
* C/C++
* Fortran 77/90/95/HPF
* Unified Parallel C
* Java
* NVIDIA CUDA
The C/C++ and Fortran compilers are provided by:
Open source:
* GNU GCC
* Clang/LLVM
Commercial licenses:
* Intel
* PGI
## Intel Compilers
For information about the usage of Intel Compilers and other Intel products, read the [Intel Parallel studio][1] page.
## PGI Compilers
The Portland Group Cluster Development Kit (PGI CDK).
```console
$ ml PGI
$ pgcc -v
$ pgc++ -v
$ pgf77 -v
$ pgf90 -v
$ pgf95 -v
$ pghpf -v
```
The PGI CDK also incudes tools for debugging and profiling.
PGDBG OpenMP/MPI debugger and PGPROF OpenMP/MPI profiler are available
```console
$ ml PGI
$ ml Java
$ pgdbg &
$ pgprof &
```
For more information, see the [PGI page][a].
## GNU
For compatibility reasons, the original (old 4.8.5) versions of GNU compilers as part of the OS are still available. These are accessible in the search path by default.
It is strongly recommended to use the up to date version which comes with the module GCC:
```console
$ ml GCC
$ gcc -v
$ g++ -v
$ gfortran -v
```
With the module loaded, two environment variables are predefined. One for maximum optimizations on the cluster's architecture, and the other for debugging purposes:
```console
$ echo $OPTFLAGS
-O3 -march=native
$ echo $DEBUGFLAGS
-O0 -g
```
For more information about the possibilities of the compilers, see the man pages.
**Simple program to test the compiler**
```cpp
$ cat count.upc
/* hello.upc - a simple UPC example */
#include <upc.h>
#include <stdio.h>
int main() {
if (MYTHREAD == 0) {
printf("Welcome to GNU UPC!!!n");
}
upc_barrier;
printf(" - Hello from thread %in", MYTHREAD);
return 0;
}
```
To compile the example, use:
```console
$ gupc -o count.upc.x count.upc
```
To run the example with 5 threads, use:
```console
$ ./count.upc.x -fupc-threads-5
```
For more information, see the man pages.
## Java
For information on how to use Java (runtime and/or compiler), read the [Java page][2].
## NVIDIA CUDA
For information on how to work with NVIDIA CUDA, read the [NVIDIA CUDA page][3].
[1]: intel/intel-suite/intel-compilers.md
[2]: lang/java.md
[3]: nvidia-cuda.md
[a]: http://www.pgroup.com/products/pgicdk.htm