pair_comb_omp fails to compile with NVCC #43

Closed
crtrott opened this Issue Mar 24, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@crtrott

crtrott commented Mar 24, 2016

Using nvcc this pair style looks like it is failing to compile. I am 99% convinced this is an issue of NVCC not of the code though. For now I'd like to document it here. I will also file a bug report with NVIDIA. That said we could potentially use a workaround for the use case where this hurts (i.e. Kokkos and OMP are enabled, and Kokkos is compiled for the Cuda+OpenMP). That workaround would be to replace the OpenMP atomic with a Kokkos atomic (which has a simple pointer interface, and doesn't rely on Kokkos being initialized or anything else) if KOKKOS_HAVE_CUDA is defined. Not sure if that is acceptable. The only other thing I can do right now is to remove that pair style from the compilation.

mpicxx -g -O3   -DLAMMPS_GZIP -DLMP_USER_OMP -DLMP_PYTHON -DLMP_MPIIO -DLMP_KOKKOS  -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1    -I/projects/install/rhel6-x86_64/sems/compiler/python/2.7.9/include/python2.7 -I/projects/install/rhel6-x86_64/sems/compiler/python/2.7.9/include/python2.7 -I./ -I../../lib/kokkos/core/src -I../../lib/kokkos/containers/src -I../../lib/kokkos/algorithms/src  --std=c++11 -Xcompiler -fopenmp   -c ../pair_comb_omp.cpp
../domain_kokkos.h(27): warning: overloaded virtual function "LAMMPS_NS::Domain::x2lamda" is only partially overridden in class "LAMMPS_NS::DomainKokkos"

../domain_kokkos.h(27): warning: overloaded virtual function "LAMMPS_NS::Domain::lamda2x" is only partially overridden in class "LAMMPS_NS::DomainKokkos"

../pair_comb_omp.cpp(419): warning: variable "fqj" was set but never used

../pair_comb_omp.cpp(88): warning: variable "ecoul" was set but never used

../domain_kokkos.h(27): warning: overloaded virtual function "LAMMPS_NS::Domain::x2lamda" is only partially overridden in class "LAMMPS_NS::DomainKokkos"

../domain_kokkos.h(27): warning: overloaded virtual function "LAMMPS_NS::Domain::lamda2x" is only partially overridden in class "LAMMPS_NS::DomainKokkos"

../pair_comb_omp.cpp(88): warning: variable "ecoul" was set but never used

../pair_comb_omp.cpp(419): warning: variable "fqj" was set but never used

../pair_comb_omp.cpp: In member function \u2018virtual double LAMMPS_NS::PairCombOMP::yasu_char(double*, int&)\u2019:
../pair_comb_omp.cpp:522:1: error: expected primary-expression before \u2018}\u2019 token
 #endif
@akohlmey

This comment has been minimized.

Show comment
Hide comment
@akohlmey

akohlmey Mar 24, 2016

Member

yes, this is an issue with nvcc choking on the OpenMP atomic pragmas.
deleting pair_comb__omp._ is what i usually do in this case. perhaps we should put this into the Install.sh script for yes-kokkos?

Member

akohlmey commented Mar 24, 2016

yes, this is an issue with nvcc choking on the OpenMP atomic pragmas.
deleting pair_comb__omp._ is what i usually do in this case. perhaps we should put this into the Install.sh script for yes-kokkos?

@crtrott

This comment has been minimized.

Show comment
Hide comment
@crtrott

crtrott Mar 24, 2016

Yeah that seems like a reasonable solution.

crtrott commented Mar 24, 2016

Yeah that seems like a reasonable solution.

akohlmey pushed a commit that referenced this issue Sep 29, 2016

@akohlmey

This comment has been minimized.

Show comment
Hide comment
@akohlmey

akohlmey May 19, 2017

Member

nvcc from CUDA-8.0 can compile the code.

Member

akohlmey commented May 19, 2017

nvcc from CUDA-8.0 can compile the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment