Getting started with OpenMP on alvin
1. Log in to alvin:
ssh username@alvin.ruc.dk
(Use VPN client if connecting from outside the university network. )
2. Write an OpenMP program, compile and run it:
gcc -o hello -fopenmp hello.c
./hello
A hello.c program:
#include <stdio.h> #include <omp.h>int main (int argc, char *argv[]) { #pragma omp parallel printf("Hello from thread %d out of %d\n", omp_get_thread_num(), omp_get_num_threads()); }
Compilers:
gcc (GNU's C and C++ compiler)
icc (Intel's C and C++ compiler)
javac (Java compiler)
cilkc (Cilk C compiler)
cilk++ (Cilk C++ compiler)
Debuggers:
gdb (GNU's C debugger)
tcheck_cl (Intel's thread checker)
valgrind (Suite of tools for debugging and profiling)
Technical specifications:
Intel PowerEdge R900
Four Quad Core Xeon, 2.13GHz
Memory, 32GB, 667MHz
L1 I cache: 32K, L1 D cache 32K
L2 cache: 3072K
L3 cache: 12288K
Operating system: openSUSE Linux