Skip to content

pair_comb_omp fails to compile with NVCC #43

@crtrott

Description

@crtrott

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions