Closed aoeftiger closed 5 years ago
(replicating the email conversation here for completeness)
Can you please verify whether there is a ext_opencl_clhpp folder inside your build directory after the cmake .. stage?
I haven't downloaded anything by hand, as you can see in the cmake output, it claims to have downloaded it if I understand correctly.
thanks for the verification. The only reason why the file would then be missing from compilation is if the include path is not set accordingly. Could you please re-run with
make VERBOSE=1
and post the the list of command line flags? specifically whether /u/aoeftige/git/sixtracklib/build/ext_opencl_clhpp
is added?
Thank you!
It doesn't seem so:
$ make VERBOSE=1
(...)
[ 17%] Building CXX object sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/track_job.cpp.o
cd /u/aoeftige/git/sixtracklib/build/sixtracklib/common/internal && /usr/bin/c++ -I/u/aoeftige/git/sixtracklib -O3 -DNDEBUG -fPIC -Wall -Werror -pedantic -ansi -msse2 -std=gnu++11 -o CMakeFiles/sixtrack_common_internal_cxx.dir/track_job.cpp.o -c /u/aoeftige/git/sixtracklib/sixtracklib/common/internal/track_job.cpp
In file included from /u/aoeftige/git/sixtracklib/sixtracklib/opencl/context.h:24:0,
from /u/aoeftige/git/sixtracklib/sixtracklib/opencl/track_job_cl.h:22,
from /u/aoeftige/git/sixtracklib/sixtracklib/common/internal/track_job.cpp:31:
/u/aoeftige/git/sixtracklib/sixtracklib/opencl/cl.h:39:26: fatal error: CL/cl2.hpp: No such file or directory
#include <CL/cl2.hpp>
^
compilation terminated.
sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/build.make:75: recipe for target 'sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/track_job.cpp.o' failed
make[2]: *** [sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/track_job.cpp.o] Error 1
make[2]: Leaving directory '/u/aoeftige/git/sixtracklib/build'
CMakeFiles/Makefile2:377: recipe for target 'sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/all' failed
make[1]: *** [sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/all] Error 2
make[1]: Leaving directory '/u/aoeftige/git/sixtracklib/build'
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Why is it using /usr/bin/c++ anyway, shouldn't it be the g++ I've loaded in my environment variables?
That's ok, /usr/bin/c++ should be a symlink to g++.
here this assumption seems not to be true unfortunately..
$ /usr/bin/c++ --version
c++ (Debian 4.9.2-10+deb8u2) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ which g++
/cvmfs/it.gsi.de/compiler/gcc/8.2.0/bin/g++
$ g++ --version
g++ (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I mean, yes, it is a symlink to g++ -- just the system-wide one and not the one I loaded with module load
(following our skype version: seems like the system provided libOpenCL.so
has not been compiled vs. gcc 8.2.0
so cmake
apparently automatically falls back to the system-wide gcc 4.9.2
despite the module loaded 8.2.0 ...)
funnily enough, not loading any module, I don't get it to work even with the system-wide gcc v==4.9.2
(which should be theoretically compatible with the system provided libOpenCL)..
In the cmake process (as documented above, same for gcc 4.9.2) I get
(...)
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "1.2")
(...)
It also downloads the headers
(...)
-- ---- -- attempting to fetch OpenCL 2.x C++ headers
-- ---- -- successfully provisioned header at /u/aoeftige/git/sixtracklib/build/ext_opencl_clhpp/CL/cl2.hpp
(...)
Later in make
after the successful cmake ..
I again don't find the cl2.hpp:
$ make
Scanning dependencies of target sixtrack_opencl
[ 1%] Building CXX object sixtracklib/opencl/CMakeFiles/sixtrack_opencl.dir/internal/argument.cpp.o
[ 2%] Building CXX object sixtracklib/opencl/CMakeFiles/sixtrack_opencl.dir/internal/base_context.cpp.o
[ 3%] Building CXX object sixtracklib/opencl/CMakeFiles/sixtrack_opencl.dir/internal/context.cpp.o
[ 4%] Building CXX object sixtracklib/opencl/CMakeFiles/sixtrack_opencl.dir/internal/track_job_cl.cpp.o
[ 4%] Built target sixtrack_opencl
Scanning dependencies of target sixtrack_common_buffer
[ 5%] Building C object sixtracklib/common/buffer/CMakeFiles/sixtrack_common_buffer.dir/alignment.c.o
[ 7%] Building C object sixtracklib/common/buffer/CMakeFiles/sixtrack_common_buffer.dir/buffer.c.o
[ 8%] Building C object sixtracklib/common/buffer/CMakeFiles/sixtrack_common_buffer.dir/mem_pool.c.o
[ 8%] Built target sixtrack_common_buffer
Scanning dependencies of target sixtrack_common_context_cxx
[ 9%] Building CXX object sixtracklib/common/context/CMakeFiles/sixtrack_common_context_cxx.dir/context_base.cpp.o
[ 10%] Building CXX object sixtracklib/common/context/CMakeFiles/sixtrack_common_context_cxx.dir/context_base_c99.cpp.o
[ 11%] Building CXX object sixtracklib/common/context/CMakeFiles/sixtrack_common_context_cxx.dir/context_base_with_nodes.cpp.o
[ 12%] Building CXX object sixtracklib/common/context/CMakeFiles/sixtrack_common_context_cxx.dir/context_base_with_nodes_c99.cpp.o
[ 14%] Building CXX object sixtracklib/common/context/CMakeFiles/sixtrack_common_context_cxx.dir/argument_base.cpp.o
[ 15%] Building CXX object sixtracklib/common/context/CMakeFiles/sixtrack_common_context_cxx.dir/argument_base_c99.cpp.o
[ 15%] Built target sixtrack_common_context_cxx
Scanning dependencies of target sixtrack_common_context
[ 16%] Building C object sixtracklib/common/context/CMakeFiles/sixtrack_common_context.dir/compute_arch.c.o
[ 16%] Built target sixtrack_common_context
Scanning dependencies of target sixtrack_common_internal_cxx
[ 17%] Building CXX object sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/track_job_base.cpp.o
[ 18%] Building CXX object sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/track_job.cpp.o
In file included from /u/aoeftige/git/sixtracklib/sixtracklib/opencl/context.h:24:0,
from /u/aoeftige/git/sixtracklib/sixtracklib/opencl/track_job_cl.h:22,
from /u/aoeftige/git/sixtracklib/sixtracklib/common/internal/track_job.cpp:31:
/u/aoeftige/git/sixtracklib/sixtracklib/opencl/cl.h:39:26: fatal error: CL/cl2.hpp: No such file or directory
#include <CL/cl2.hpp>
^
compilation terminated.
sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/build.make:75: recipe for target 'sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/track_job.cpp.o' failed
make[2]: *** [sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/track_job.cpp.o] Error 1
CMakeFiles/Makefile2:377: recipe for target 'sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/all' failed
make[1]: *** [sixtracklib/common/internal/CMakeFiles/sixtrack_common_internal_cxx.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
While the file is there ;)
$ ls ext_opencl_clhpp/CL/
cl2.hpp
Could you please try to pull from the upstream_master branch of my fork git@github.com:martinschwinzerl/sixtracklib.git and check whether this fixes your problems?
I've created a pull request (#64) but since the problems are difficult to reproduce, I would feel better if you could give it a go and run the full opencl unit-tests before merging
Thank you!
Yay!!
$ make
(...)
[100%] Built target generate_buffer_generic_obj
$
Pull request #64 seems to have fixed the issue, please re-open if the problem persists.
Following issue #62 , I have removed the
-pedantic
flags and try to compile. There are no openCL headers found on the system, so Martin's new check automatically downloads the v2 headers from kronos. This seems to work during the download in the cmake process but they seem to be missing afterwards during the make...?cmake
make