Grid icon indicating copy to clipboard operation
Grid copied to clipboard

SyCL branch compilation instructions for CUDA backend

Open kostrzewa opened this issue 4 years ago • 7 comments

Are there any compilation instructions for the CUDA backend of the sycl branch of Grid? It seems that the build system does not automatically use nvcc where necessary. I've tried messing with OMPI_MPICXX but this makes configure fail. If you have a configure line lying around using OpenMPI and GCC, this would be rather helpful!

kostrzewa avatar Jun 22 '20 14:06 kostrzewa

The following sems to at least pass configure, but I'm not sure if I'm passing all required flags:

CXX=nvcc \
MPICXX=mpicxx \
CXXFLAGS="-gencode=arch=compute_61,code=compute_61 -std=c++11" \
~/code/grid_sycl/configure \                                                                                                                
  --enable-precision=double \
  --enable-simd=GPU \
  --enable-accelerator=cuda \
  --enable-comms=mpi-auto \
  --prefix=$(pwd)/install_dir

kostrzewa avatar Jun 22 '20 14:06 kostrzewa

I'm using:

../configure\
--prefix /ccs/home/paboyle/prefix \
--enable-precision=double\
--enable-unified=yes \
--enable-accelerator=cuda \
--enable-summit \
--enable-comms=mpi \
--enable-simd=GPU \
CXX=nvcc \
CXXFLAGS="-ccbin mpicxx -gencode arch=compute_70,code=sm_70 -I/ccs/home/paboyle/prefix/include/ -std=c++11" \
LDFLAGS=-L/ccs/home/paboyle/prefix/lib/ 

on summit

paboyle avatar Jun 22 '20 17:06 paboyle

Thanks! Just one more question for now: is it normal that the CayleyFermion instantiations take hours to compile?

kostrzewa avatar Jun 22 '20 18:06 kostrzewa

Not hours - I'm used to ~20 minutes with make -j which isn't great but not intolerable.

paboyle avatar Jun 22 '20 18:06 paboyle

Strange, it took my Ryzen5 3600 almost 8 hours to compile grid (gcc 8.4.0) with the configure line that I gave above in https://github.com/paboyle/Grid/issues/294#issuecomment-647559858

kostrzewa avatar Jun 23 '20 06:06 kostrzewa

wow.... and I thought power 9 was bad.... You are using parallel make?

paboyle avatar Jun 24 '20 22:06 paboyle

Yes, running on all cores :) Time to get a threadripper as a dev machine methinks...

kostrzewa avatar Jun 25 '20 06:06 kostrzewa