Skip to content
Snippets Groups Projects
Unverified Commit 405b8bd3 authored by Kjartan Thor Wikfeldt's avatar Kjartan Thor Wikfeldt Committed by GitHub
Browse files

Merge pull request #2 from PDC-support/thor/mixed-updates

small updates
parents d0487f49 b47e670e
Branches
Tags
No related merge requests found
...@@ -22,7 +22,35 @@ The Cray automatically loads several [modules](https://www.pdc.kth.se/support/do ...@@ -22,7 +22,35 @@ The Cray automatically loads several [modules](https://www.pdc.kth.se/support/do
- Heimdal - [Kerberos commands](https://www.pdc.kth.se/support/documents/login/login.html#general-information-about-kerberos) - Heimdal - [Kerberos commands](https://www.pdc.kth.se/support/documents/login/login.html#general-information-about-kerberos)
- OpenAFS - [AFS commands](https://www.pdc.kth.se/support/documents/data_management/afs.html) - OpenAFS - [AFS commands](https://www.pdc.kth.se/support/documents/data_management/afs.html)
- SLURM - [batch jobs](https://www.pdc.kth.se/support/documents/run_jobs/queueing_jobs.html) and [interactive jobs](https://www.pdc.kth.se/support/documents/run_jobs/run_interactively.html) - SLURM - [batch jobs](https://www.pdc.kth.se/support/documents/run_jobs/queueing_jobs.html) and [interactive jobs](https://www.pdc.kth.se/support/documents/run_jobs/run_interactively.html)
- Programming environment - [Compilers for software development](https://www.pdc.kth.se/support/documents/software_development/development.html)
# Compiling MPI programs on Beskow
By default the cray compiler is loaded into your environment. In order to use another compiler you have to swap compiler modules:
```
module swap PrgEnv-cray PrgEnv-gnu
```
or
```
module swap PrgEnv-cray PrgEnv-intel
```
On Beskow one should always use the *compiler wrappers* `cc`, `CC` or
`ftn` (for C, C++ and Fortran codes, respectively),
which will automatically link to MPI libraries and linear
algebra libraries like BLAS, LAPACK, etc.
Examples:
```
# Fortran
ftn [flags] source.f90
# C
cc [flags] source.c
# C++
CC [flags] source.cpp
```
# Running MPI programs on Beskow # Running MPI programs on Beskow
...@@ -32,6 +60,9 @@ First it is necessary to book a node for interactive use: ...@@ -32,6 +60,9 @@ First it is necessary to book a node for interactive use:
salloc -A <allocation-name> -N 1 -t 1:0:0 salloc -A <allocation-name> -N 1 -t 1:0:0
``` ```
You might also need to specify a reservation by adding the flag
`--reservation=<name-of-reservation>`.
Then the srun command is used to launch an MPI application: Then the srun command is used to launch an MPI application:
``` ```
......
...@@ -28,7 +28,8 @@ which will help you get going on Beskow. ...@@ -28,7 +28,8 @@ which will help you get going on Beskow.
# Exercise 1: Run "Hello, World" # Exercise 1: Run "Hello, World"
Run the "Hello, World" program found in the lecture. Make sure you understand how each processors prints its rank as well as the total number of processors in the communicator MPI_COMM_WORLD. [Compile](https://www.pdc.kth.se/support/documents/software_development/development.html)
and run the "Hello, World" program found in the lecture. Make sure you understand how each processors prints its rank as well as the total number of processors in the communicator MPI_COMM_WORLD.
# Exercise 2: Send data across all processes # Exercise 2: Send data across all processes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment