-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eigen compatibility with OpenACC #311
Comments
Following the incompatibilities of
I tried to debug this with
and
By googling the errors I found out that those errors probably come from some segmentation fault coming from the
TODO: |
…wMajor storage order (improvement with in-place transposition)
…r and its unit test (full compatibility with OpenACC/CUDA backends)
* Two factors contribute to the above solution: - New eigen branch (version 3.5 and above). Currently we are using a mirrored version of Eigen in BlueBrain organisation https://github.com/BlueBrain/eigen/releases/tag/v3.5-alpha - An API that makes possible to call any Eigen `__device__` function from within OpenACC regions. * More details: Eigen-3.5+ provides better GPU support; however, some functions cannot be called directly from within OpenACC regions. Therefore, we need to wrap them in a special API (decorate them with `__device__` & `acc routine` tokens), which allows us to eventually call them from OpenACC. Calling these functions from CUDA kernels presents no issue. * From #726: Avoid use `[]` operator with eigen Matrix objects. This results into runtime error with OpenACC and PGI compiler. * Note that this should works in combination with BlueBrain/CoreNeuron/pull/624 fixes #311 fixes #135
BlueBrain/nmodl#311 has been closed, so hopefully these work now.
- Create nrnivmodl targets in nrn_add_test_group and add a CORENEURON option to that command. This means that we do not have to compile *all* MOD files for CoreNEURON if CoreNEURON is enabled in the build. - Drop MODFILE_PATTERNS, NRNIVMODL_ARGS and SUBMODULE arguments to nrn_add_test that were not being used. - The same de-duplication is done as before, so there is no change to the number of nrnivmodl invocations, but some targets no longer pass -coreneuron to nrnivmodl. * testcorenrn: re-enable NMODL+GPU tests now BlueBrain/nmodl#311 is closed.
This issue was raised when running
nrnivmodl-core
with the followingModelDB
model https://senselab.med.yale.edu/ModelDB/ShowModel?model=19176&file=%2fHCN2k%2fhcn2.mod#tabs-2 usingPGI 19.4
andPGI 19.10
with theOpenACC
backend generated fromNMODL
.The generated
c++
file forhcn2.mod
file contains a call to the followingEigen solver
generated by the translation of theDERIVATIVE
block:Compiling this file with
pgc++
there is the following issue (with-Minfo=acc
added to the compilation flags):This was due to throwing an exception in https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/Core/util/Memory.h#L70.
After fixing this issue by commenting out the problematic line, there was another issue regarding
atomic
coming from https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/Core/products/Parallelizer.h#L14 which was fixed by adding the-DEIGEN_HAS_CXX11_ATOMIC=0
compiler flag topgc++
.Following those, there was an issue coming from the
llvm based
pgc++
compiler, so we tried with thenollvm
backend.The final issue we came across was the following:
For this there is no solution found.
To reproduce all the issues in a
gpu node
:CoreNeuron
andNMODL
master
branches were usedThe text was updated successfully, but these errors were encountered: