libclfft issueshttps://gitlab.aei.uni-hannover.de/einsteinathome/libclfft/-/issues2020-08-21T14:09:52Zhttps://gitlab.aei.uni-hannover.de/einsteinathome/libclfft/-/issues/3Using an CPU as OpenCL device on macOS leads to a floating point exception2020-08-21T14:09:52ZMaximillian Benschmaximillian.bensch@aei.mpg.deUsing an CPU as OpenCL device on macOS leads to a floating point exceptionAfter !4 was merged, also CPU device are possible. On linux this is no problem, but on macOS this leads to a floating point exception, because `CL_KERNEL_WORK_GROUP_SIZE` is 1 for CPU OpenCL devices, which seems to be macOS specific, acc...After !4 was merged, also CPU device are possible. On linux this is no problem, but on macOS this leads to a floating point exception, because `CL_KERNEL_WORK_GROUP_SIZE` is 1 for CPU OpenCL devices, which seems to be macOS specific, according to this post: https://stackoverflow.com/a/25287001. This leads to a division by zero [here](https://gitlab.aei.uni-hannover.de/einsteinathome/libclfft/-/blob/0edfa5d2705b5ac73f4bbf4bf5dfc55dd2781ef4/src/fft_kernelstring.cpp#L1280) in the kernel generation code, because `batchSize` depends on the work group size, and seems to be expected to be at least 8.
\cc @ReinhardPrix @bema @hbeggensteinhttps://gitlab.aei.uni-hannover.de/einsteinathome/libclfft/-/issues/1Problem building this on atlas [at least not very 'user friendly']2019-06-14T11:50:53ZReinhard PrixProblem building this on atlas [at least not very 'user friendly']so I'm struggling to re-create how I built this on atlas.
There seems to be some install-path mismatch between where cuda stuff gets installed and what the Makefile assumes:
eg on a GPU-enabled node, `a3901` we have:
`$ source /usr/loca...so I'm struggling to re-create how I built this on atlas.
There seems to be some install-path mismatch between where cuda stuff gets installed and what the Makefile assumes:
eg on a GPU-enabled node, `a3901` we have:
`$ source /usr/local/atlas-cuda/9.0/setup.sh`
==> sets CUDA_INSTALL_PATH=/usr/local/atlas-cuda/9.0
and there we find `$CUDA_INSTALL_PATH/include/CL/cl.h`
in eclfft/src, however, the Makefile doesn't include this path, instead:
`
CXXFLAGS += -O3 -Wall -g -I$(NVIDIA_SDK_INSTALL_PATH)/OpenCL/common/inc -I$(AMDAPPSDKROOT)/include -I../include -fPIC
`
none of which matches the actual include path, and no env-variable I can set to make it actually find cl.h, and so I get:
`
$ make
make[1]: Entering directory '/work/repr/Software/development/eclfft/src'
g++ -O3 -Wall -g -I/usr/local/cuda/OpenCL/common/inc -I/opt/AMDAPP/include -I../include -fPIC -c fft_setup.cpp
In file included from fft_internal.h:66:0,
from fft_setup.cpp:63:
../include/clFFT.h:70:23: fatal error: CL/cl.h: No such file or directory
#include <CL/cl.h>
^
compilation terminated.
`
Am I missing something?
What is the 'official' way to correctly build this, and maybe should this be patched to be more user friendly?
PS: OK, I finally figured out by looking at the build-line that I *can* get this to work via
`
CXXFLAGS=-I$CUDA_INSTALL_PATH/include make
`
but ideally the Makefile should simply include the possibility of a `CUDA_INSTALL_PATH` being available and use that as well?
Not sure who to best assign this to ...
/cc @hbeggenstein @maxBenschBernd MachenschalkBernd Machenschalk