Skip to content
Snippets Groups Projects
Commit bedc2457 authored by Ben Cumming's avatar Ben Cumming Committed by GitHub
Browse files

Merge pull request #34 from w-klijn/master

Fix markdown of README.md
parents fa298c13 5179809d
No related branches found
No related tags found
No related merge requests found
...@@ -10,13 +10,10 @@ https://github.com/eth-cscs/nestmc-proto ...@@ -10,13 +10,10 @@ https://github.com/eth-cscs/nestmc-proto
3. TBB 3. TBB
4. TBB on Cray systems 4. TBB on Cray systems
5. Targeting KNL 5. Targeting KNL
6. Building and running on HBP pcp machines 6. Examples of environment configuration
a. Julia - Julia
## Basic installation
```bash ```bash
# clone repository # clone repository
git clone git@github.com:eth-cscs/nestmc-proto.git git clone git@github.com:eth-cscs/nestmc-proto.git
...@@ -34,7 +31,7 @@ export CXX=`which g++` ...@@ -34,7 +31,7 @@ export CXX=`which g++`
# build main project (out-of-tree) # build main project (out-of-tree)
mkdir build mkdir build
cd build cd build
cmake .. cmake <path to CMakeLists.txt>
make -j make -j
# test # test
...@@ -51,7 +48,6 @@ To ensure that CMake detects MPI correctly, you should specify the MPI wrapper f ...@@ -51,7 +48,6 @@ To ensure that CMake detects MPI correctly, you should specify the MPI wrapper f
export CXX=mpicxx export CXX=mpicxx
export CC=mpicc export CC=mpicc
cmake <path to CMakeLists.txt> -DWITH_MPI=ON cmake <path to CMakeLists.txt> -DWITH_MPI=ON
``` ```
## TBB ## TBB
...@@ -90,12 +86,11 @@ cmake <path to CMakeLists.txt> -DWITH_TBB=ON -DSYSTEM_CRAY=ON ...@@ -90,12 +86,11 @@ cmake <path to CMakeLists.txt> -DWITH_TBB=ON -DSYSTEM_CRAY=ON
# multithreading and MPI # multithreading and MPI
cmake <path to CMakeLists.txt> -DWITH_TBB=ON -DWITH_MPI=ON -DSYSTEM_CRAY=ON cmake <path to CMakeLists.txt> -DWITH_TBB=ON -DWITH_MPI=ON -DSYSTEM_CRAY=ON
``` ```
#### targeting KNL ## targeting KNL
## build modparser without KNL environment #### build modparser without KNL environment
The source to source compiler "modparser" that generates the C++/CUDA kernels for the ion channels and synapses is in a separate repository. The source to source compiler "modparser" that generates the C++/CUDA kernels for the ion channels and synapses is in a separate repository.
By default it will be built with the same compiler and flags that are used to build the miniapp and tests. By default it will be built with the same compiler and flags that are used to build the miniapp and tests.
...@@ -107,24 +102,34 @@ the now compiled executable ...@@ -107,24 +102,34 @@ the now compiled executable
Modparser requires a C++11 compiler, and has been tested on GCC, Intel, and Clang compilers Modparser requires a C++11 compiler, and has been tested on GCC, Intel, and Clang compilers
- if the default compiler on your is some ancient version of gcc you might need to load a module/set the CC and CXX environment variables. - if the default compiler on your is some ancient version of gcc you might need to load a module/set the CC and CXX environment variables.
CMake will look for the source to source compiler executable, `modcc`, in the `PATH` environment variable, and will use the version if finds instead of building its own. CMake will look for the source to source compiler executable, `modcc`, in the `PATH` environment variable, and will use the version if finds instead of building its own.
So add the g++ compiled modcc to your path So add the g++ compiled modcc to your path
e.g: e.g:
```bash ```bash
# First build a 'normal' non KNL version of the software
# Load your environment (see section 6 for detailed example)
export CC=`which gcc`; export CXX=`which g++`
# Make directory , do the configuration and build
mkdir build
cd build
cmake <path to CMakeLists.txt> -DCMAKE_BUILD_TYPE=release
make -j8
# set path and test that you can see modcc # set path and test that you can see modcc
export PATH=`pwd`/bin:$PATH export PATH=`pwd`/bin:$PATH
which modcc which modcc
``` ```
## set up environment #### set up environment
- source the intel compilers - source the intel compilers
- source the TBB vars - source the TBB vars
- I have only tested with the latest stable version from on-line, not the version that comes installed sometimes with the Intel compilers. - I have only tested with the latest stable version from on-line, not the version that comes installed sometimes with the Intel compilers.
## build miniapp #### build miniapp
```bash ```bash
# clone the repository and set up the submodules # clone the repository and set up the submodules
...@@ -138,7 +143,7 @@ cd build_knl ...@@ -138,7 +143,7 @@ cd build_knl
# run cmake with all the magic flags # run cmake with all the magic flags
export CC=`which icc` export CC=`which icc`
export CXX=`which icpc` export CXX=`which icpc`
cmake .. -DCMAKE_BUILD_TYPE=release -DWITH_TBB=ON -DWITH_PROFILING=ON -DVECTORIZE_TARGET=KNL -DUSE_OPTIMIZED_KERNELS=ON cmake <path to CMakeLists.txt> -DCMAKE_BUILD_TYPE=release -DWITH_TBB=ON -DWITH_PROFILING=ON -DVECTORIZE_TARGET=KNL -DUSE_OPTIMIZED_KERNELS=ON
make -j make -j
``` ```
...@@ -152,7 +157,7 @@ The flags passed into cmake are described: ...@@ -152,7 +157,7 @@ The flags passed into cmake are described:
- `-DUSE_OPTIMIZED_KERNELS=ON` : tell the source to source compiler to generate optimized kernels that use Intel extensions - `-DUSE_OPTIMIZED_KERNELS=ON` : tell the source to source compiler to generate optimized kernels that use Intel extensions
- without these vectorized code will not be generated. - without these vectorized code will not be generated.
## run tests #### run tests
Run some unit tests Run some unit tests
```bash ```bash
...@@ -214,39 +219,12 @@ total | 0.791 100.0 | 38.593 100.0 | ...@@ -214,39 +219,12 @@ total | 0.791 100.0 | 38.593 100.0 |
----------------------------------------------------- -----------------------------------------------------
``` ```
### Building and running on HBP pcp machines ## Examples of environment configuration
### Julia (HBP PCP system)
## Julia ``` bash
# load the needed modules
module load cmake module load cmake
module load intel-ics module load intel-ics
module load openmpi_ics/2.0.0 module load openmpi_ics/2.0.0
module load gcc/6.1.0 module load gcc/6.1.0
```
# set the correct gcc version
export CC=`which gcc`
export CXX=`which g++`
# First build a 'normal' non KNL version of the software
# Make directory , do the configuration and build
mkdir build
cd build
ccmake ../
make -j8
# now make sure that the modparser can be found
export PATH=`pwd`/modcc:$PATH
# Next build the knl version
# Make directory , do the cmake configuration and build
cd ../
mkdir build_knl
cd build_knl
cmake .. -DCMAKE_BUILD_TYPE=release -DWITH_TBB=ON -DWITH_PROFILING=ON -DVECTORIZE_TARGET=KNL
make -j8
# Example usage on the JULIA system:
salloc --time=04:30:00 --nodes=1 # Get time allocation on the compute nodes
srun --cpu_bind=none --nodes=1 --ntasks-per-node=1 mpirun -n 1 /gpfs/homeb/pcp0/pcp0016/code/nestmc/trunk/nestmc-proto/knl_build/miniapp/miniapp.exe
# For interactive session on a knl node
srun --cpu_bind=none --nodes=1 --pty /bin/bash -I
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment