paboyle / Grid

Data parallel C++ mathematical object library
GNU General Public License v2.0
155 stars 111 forks source link

SyCL branch compilation instructions for CUDA backend #294

Open kostrzewa opened 4 years ago

kostrzewa commented 4 years ago

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 commented 4 years ago

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
paboyle commented 4 years ago

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

kostrzewa commented 4 years ago

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

paboyle commented 4 years ago

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

kostrzewa commented 4 years ago

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

paboyle commented 4 years ago

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

kostrzewa commented 4 years ago

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