Closed edbennett closed 1 year ago
Hi @edbennett, sorry this is a bit tedious to forward nvcc flags. This is completely supported and we are using it in production. On Tursa I use
../../configure --with-grid=${HOME}/local/grid --prefix=${HOME}/local/grid CC=gcc CXX='nvcc -x cu'
where you need to change the paths to what is relevant for you. I'll try to improve that in the future, but would also welcome PRs for that 😉.
Thanks Antonin, that has let me progress. Worth noting in case anyone else stumbles across this issue that this severely breaks the CXXLD
step (it tries to interpret the binary as source code, and then outputs garbage to stdout and stderr seemingly indefinitely). I used make -n
and then copied and pasted the CXXLD
line, and re-ran it after removing the -x cu
argument, and it at least attempted to link.
If I have some spare time I'll see if I can make the process any smoother, but can't offer a timeline for that.
@edbennett no worries and thanks for the info. Is that ok to close the issue?
👍
I'm trying to use Hadrons on Tursa, but am not able to compile an app.
What I have tried:
Then make and install
Then make and install.
The configure step fails, as it sets
CXX=g++
rather than thenvcc
that was used for compiling Grid and Hadrons. This conflicts with theCXXFLAGS
which are designed to work withnvcc
, and are not recognised byg++
.If I manually set
CXX=nvcc
, then I get a huge number of errors, wherenvcc
doesn't recognise the CUDA functions and datatypes; the first couple are, for example:Manually setting
CXXFLAGS=""
doesn't make any difference, asconfigure
picks up the additionalCXXFLAGS
fromhadrons-config
.Am I missing a step or flags that would allow me to configure to compile for GPU, or is this not currently supported?
Many thanks