README.md 2.35 KB
Newer Older
1
2
# PRACE CodeVault

Jussi's avatar
Jussi committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
PRACE CodeVault is an open repository containing various high
performance computing code samples. The project aims to support
self-learning of HPC programming and will be used as an Open platform
for the HPC community to share example code snippets, proof-of-concept
codes and so forth.  

CodeVault contains training material from PRACE partners, as well as
example codes of common HPC kernels such as dense and sparse linear
algebra, spectral and N-body methods, structured and unstructured
grids, Monte Carlo methods and parallel I/O. The code samples are
published as open source and can be used both for educational purposes
and as parts of real application suites (as permitted by particular
license).  

17
18
## How to contribute

Jussi's avatar
Jussi committed
19
20
21
22
Any contributions (new code samples, bug fixes, improvements etc.) are
warmly welcome. In order to contribute, please follow the standard
Gitlab workflow:

Jussi's avatar
Jussi committed
23
24
25
26
27
1. Fork the project into your personal space on GitLab.com
2. Create a feature branch
3. Work on your contributions
4. Push the commit(s) to your fork
5. Submit a merge request to the master branch
Valeriu Codreanu's avatar
Valeriu Codreanu committed
28

29
## Instructions for cloning/building a single example
Valeriu Codreanu's avatar
Valeriu Codreanu committed
30

31
### Cloning a single example
Valeriu Codreanu's avatar
Valeriu Codreanu committed
32

33
34
Since version 1.7 git supports sparse checkouts, allowing users only to clone specific directories and not the whole repository structure.
In order to do this we provide an example for cloning the `n-body_methods/dynamic_sparse_data_exchange` example. The steps are:
Valeriu Codreanu's avatar
Valeriu Codreanu committed
35
36

```bash
37
38
39
40
41
42
43
44
45
# Create empty repository with name 'CodeVault' 
# (you may use any other name)
git init CodeVault
cd CodeVault

# Set upstream repository
git remote add origin https://gitlab.com/PRACE-4IP/CodeVault.git

# Enable sparse checkout
Valeriu Codreanu's avatar
Valeriu Codreanu committed
46
git config core.sparsecheckout true
47
48
49
50
51
52
53
54
55
56
57

# List directories for sparse checkout
#  * The 'cmake' directory is necessary for the build system
#  * Adapt the second entry according to the example(s) of your interest
cat >.git/info/sparse-checkout <<END
/hpc_kernel_samples/cmake
/hpc_kernel_samples/n-body_methods/dynamic_sparse_data_exchange
END

# Do sparse checkout
git pull
Valeriu Codreanu's avatar
Valeriu Codreanu committed
58
59
60
git checkout master
```

61
### Building a single example
Valeriu Codreanu's avatar
Valeriu Codreanu committed
62

63
In order to build the example we cloned above, follow the typical CMake steps:
Valeriu Codreanu's avatar
Valeriu Codreanu committed
64
65

```bash
66
cd hpc_kernel_samples/n-body_methods/dynamic_sparse_data_exchange
Valeriu Codreanu's avatar
Valeriu Codreanu committed
67
68
69
70
71
72
73
mkdir build
cd build
cmake ..
make
make install # optional
```

74
This will compile the example provided that MPI is found.
Valeriu Codreanu's avatar
Valeriu Codreanu committed
75