kokkos compile error

First I need to report that in the file src/MAKE/OPTIONS/Makefile.kokkos_cuda, the nvcc wrapper is located elsewhere, I gave it the absolute path…

#export OMPI_CXX = …/…/lib/config/nvcc_wrapper
export OMPI_CXX = /share/apps/src/n33/lammps/lammps-10Aug15/src/lib/kokkos/config/nvcc_wrapper

Following that fix, I encounter an error on an nvcc option and in that wrapper file I find the code block but am unsure what to fix in the c++11 section. Any ideas?

Created src/MAKE/MINE/Makefile.auto
Action exe …
make[1]: Entering directory `/home/apps/src/n33/lammps/lammps-10Aug15/src/Obj_auto’
mpicxx -g -O3 -DLAMMPS_GZIP -DLMP_KOKKOS -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I./ -I…/…/lib/kokkos/core/src -I…/…/lib/kokkos/containers/src -I…/…/lib/kokkos/algorithms/src --std=c++11 -arch=sm_35 -Xcompiler -fopenmp -c …/angle_charmm.cpp
nvcc fatal : Unknown option ‘-std’

#Handle c++11 setting
–std=c++11|-std=c++11)
cuda_args="$cuda_args $1"
;;

-Henk

What is the version of your gcc? It needs to be newer than 4.7.2.

Ray

ah, my bad, missed that requirement, I was using 4.4.7 but switching to 4.8.4 did not change the error. I started a brand new, clean env, and build machine ‘make mpi’ successfully, then tried kokkos again via

[[email protected]…5756… src]# which gcc g++
/share/apps/CENTOS6/gcc/4.8.4/bin/gcc
/share/apps/CENTOS6/gcc/4.8.4/bin/g++

or this way…

[[email protected]…5756… src]# export NVCC_WRAPPER_DEFAULT_COMPILER=/share/apps/CENTOS6/gcc/4.8.4/bin/g++

same error on option ‘-std=c11++’

-Henk

​two comments:

- it is a *very* bad idea to do compilations as root. particularly
compilation of applications. one little typo in a makefile (and they *do*
happen) or a required but unset environment variable and your whole system
installation can be ruined with an innocent 'rm -rf $(VAR)​/*'

- the error message originates from nvcc, so gcc cannot cause it, but
probably your nvidia toolkit is not new enough either (you need 6.5 or 7.0
according to the readme).

axel.

ah, my bad, missed that requirement, I was using 4.4.7 but switching to

points well made Alex. I have toolkit 5.0 with K20X GPUs and the only dependency I saw was the requirement for compute capability 1.3 which is met. oh well, end of pavement, have too much running to start messing with new toolkit, perhaps when we replace these K20s … we’ll use the USER-CUDA accelerator for now

Thanks all.

-Henk

points well made Alex. I have toolkit 5.0 with K20X GPUs and the only dependency I saw was the requirement for compute capability 1.3 which is met. oh well, end of pavement, have too much running to start messing with new toolkit, perhaps when we replace these K20s … we’ll use the USER-CUDA accelerator for now

You should check out the GPU package as well. USER-CUDA is practically unmaintained for quite a while now with some known issues

Axel

#export OMPI_CXX = …/…/lib/config/nvcc_wrapper

It should be lib/kokkos/config …

Thanks,

Steve

Hi Axel,

When I compile the kokkos cuda version of LAMMPS, it always gives the error:

make[1]: Entering directory /home/kingui/Downloads/lammps-11Sep15/src/Obj_kokkos_cuda'** **/home/kingui/Downloads/lammps-11Sep15/lib/kokkos/config/nvcc_wrapper -g -O3 -DLAMMPS_GZIP -DLMP_KOKKOS -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -I./ -I../../lib/kokkos/core/src -I../../lib/kokkos/containers/src -I../../lib/kokkos/algorithms/src --std=c++11 -arch=sm_35 -c ../angle_charmm.cpp** **nvcc fatal : Unknown option '-std'** <b>make[1]: *** [angle_charmm.o] Error 255</b> **make[1]: Leaving directory /home/kingui/Downloads/lammps-11Sep15/src/Obj_kokkos_cuda’
make: *** [kokkos_cuda] Error 2

It seems nvcc has something woring with -std. Do you know any possible reason?

Kind regards,

MC

Hi Axel,

When I compile the kokkos cuda version of LAMMPS, it always gives the
error:

*make[1]: Entering directory
`/home/kingui/Downloads/lammps-11Sep15/src/Obj_kokkos_cuda'/home/kingui/Downloads/lammps-11Sep15/lib/kokkos/config/nvcc_wrapper
-g -O3 -DLAMMPS_GZIP -DLMP_KOKKOS -DMPICH_SKIP_MPICXX
-DOMPI_SKIP_MPICXX=1 -I./ -I../../lib/kokkos/core/src
-I../../lib/kokkos/containers/src -I../../lib/kokkos/algorithms/src
--std=c++11 -arch=sm_35 -c ../angle_charmm.cppnvcc fatal : Unknown
option '-std'make[1]: *** [angle_charmm.o] Error 255make[1]: Leaving
directory `/home/kingui/Downloads/lammps-11Sep15/src/Obj_kokkos_cuda'make:
*** [kokkos_cuda] Error 2*

It seems nvcc has something woring with -std. Do you know any possible
reason?

you *just* saw the explanations for what can go wrong in the preceding
discussion. please *do* make an effort to follow those and make sure that
when you report an error, that you also provide the necessary information.
it is *extremely* annoying to have to play 20 questions with everybody.

the most important question, for example, you don't provide any information
on: ​does your compile environment​ match the minimum requirements for
KOKKOS?

axel.

Kokkos in LAMMPS requires gcc 4.8.1 or higher and CUDA 6.5 or higher. Sorry for the confusion–I will update the docs. I also edited the default Makefile.kokkos_cuda so it can automatically find the nvcc wrapper.

Stan