diff --git a/docs.it4i/anselm/software/compilers.md b/docs.it4i/anselm/software/compilers.md index 71e60499b1bb335ddb7a6919e22457aa70b68fa5..63fa258ae9a05b96f2c4f70ec5d0b6291cba9870 100644 --- a/docs.it4i/anselm/software/compilers.md +++ b/docs.it4i/anselm/software/compilers.md @@ -59,21 +59,21 @@ $ g++ -v Simple program to test the compiler -```console +```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; - } +/* 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 @@ -108,21 +108,21 @@ For production runs, it is recommended to use the native Infiband implementation Example UPC code: -```console +```cpp $ cat hello.upc - /* hello.upc - a simple UPC example */ - #include <upc.h> - #include <stdio.h> - - int main() { - if (MYTHREAD == 0) { - printf("Welcome to Berkeley UPC!!!n"); - } - upc_barrier; - printf(" - Hello from thread %in", MYTHREAD); - return 0; - } +/* hello.upc - a simple UPC example */ +#include <upc.h> +#include <stdio.h> + +int main() { + if (MYTHREAD == 0) { + printf("Welcome to Berkeley UPC!!!n"); + } + upc_barrier; + printf(" - Hello from thread %in", MYTHREAD); + return 0; +} ``` To compile the example with the "ibv" UPC network use