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.
It is included in our project as a git submodule, and 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.
This can cause problems if we are cross compiling, e.g. for KNL, because the modparser compiler might not be runnable on the compilation node.
This can cause problems if we are cross compiling, e.g. for KNL, because the modparser compiler might not be runnable on the compilation node.
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.
You are probably best of building the software twice: Once without KNL support to create the modcc parser and next the KNL version using
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.
```bash
git clone git@github.com:eth-cscs/modparser.git
cd modparser
# example of setting a C++11 compiler
export CXX=`which gcc-4.8`
cmake .
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.
make -j
So add the g++ compiled modcc to your path
e.g:
```bash
# 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
...
@@ -116,26 +122,14 @@ which modcc
...
@@ -116,26 +122,14 @@ which modcc
- 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 online, 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.