Closed belcloud closed 6 years ago
@belcloud Yes, I'll provide the linux binaries as soon as I can.
Regarding the build process: with CMake, after the configuration step, if something went wrong, you can check the CMakeCache.txt
in your build folder. The two vars OpenCL_INCLUDE_DIR
and OpenCL_LIBRARY
will be present in this file. Edit it to match your installation and relaunch the CMake generation process. Next, you just have to build the binaries with the generated build files.
Regarding the fact that your SDK hasn't been found, you're surely missing some env vars.
For Cuda, a CUDA_PATH
should have been defined. You can export it before launching CMake.
export CUDA_PATH=/usr/local/cuda-8.0
Thank you, export CUDA_PATH=/usr/local/cuda-8.0 solved the issue.
cmake worked ok, but make fails like this:
/root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:287:14: error: âp_mutexâ was not declared in this scope std::mutex& p_mutex, ^ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:288:2: error: âcondition_variableâ is not a member of âstdâ std::condition_variable& p_barrier, ^ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:288:27: error: âp_barrierâ was not declared in this scope std::condition_variable& p_barrier, ^ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:289:12: error: âshared_ptrâ is not a member of âstdâ std::list<std::shared_ptr<GenerationContext>>& p_generationContexts, ^ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:289:12: error: âshared_ptrâ is not a member of âstdâ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:289:49: error: âp_generationContextsâ was not declared in this scope std::list<std::shared_ptr<GenerationContext>>& p_generationContexts, ^ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:289:49: error: â&â cannot appear in a constant-expression /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:290:2: error: âshared_ptrâ is not a member of âstdâ std::shared_ptr<GenerationDevice>& p_generationDevice ^ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:290:2: error: âshared_ptrâ is not a member of âstdâ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:290:37: error: template argument 1 is invalid std::shared_ptr<GenerationDevice>& p_generationDevice ^ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:290:37: error: template argument 2 is invalid /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:428:2: error: expected â}â at end of input }} ^ /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:428:2: error: expected â}â at end of input In file included from /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:21:0: /root/gpuPlotGenerator-4.1.1/util.h: In instantiation of âstd::string cryo::util::formatValue(T, const std::vector<T>&, const std::vector<std::basic_string<char> >&) [with T = long long unsigned int; std::string = std::basic_string<char>]â: /root/gpuPlotGenerator-4.1.1/CommandGenerate.cpp:163:96: required from here /root/gpuPlotGenerator-4.1.1/util.h:79:68: error: âclass std::vector<long long unsigned int>â has no member named âcrbeginâ typename std::vector<T>::const_reverse_iterator it(parts.crbegin()); ^ /root/gpuPlotGenerator-4.1.1/util.h:80:67: error: âclass std::vector<long long unsigned int>â has no member named âcrendâ typename std::vector<T>::const_reverse_iterator end(parts.crend()); ^ make[2]: *** [CMakeFiles/gpuPlotGenerator.dir/CommandGenerate.cpp.o] Error 1 make[1]: *** [CMakeFiles/gpuPlotGenerator.dir/all] Error 2 make: *** [all] Error 2
Can you please advise?
[ 4%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/PlotsFile-linux.cpp.o /home/mining/burst/gpuPlotGenerator/PlotsFile-linux.cpp: In static member function ‘static void cryo::gpuPlotGenerator::PlotsFile::preallocate(const string&, long long unsigned int)’: /home/mining/burst/gpuPlotGenerator/PlotsFile-linux.cpp:20:10: error: ‘close’ was not declared in this scope close(fd);
make[2]: [CMakeFiles/gpuPlotGenerator.dir/build.make:543: CMakeFiles/gpuPlotGenerator.dir/PlotsFile-linux.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:68: CMakeFiles/gpuPlotGenerator.dir/all] Error 2 make: *** [Makefile:84: all] Error 2
Same issue on ubuntu 16.04
The 4.1.2 version corrects that. I also provide linux x64 binaries compiled against the CUDA-8.0 libOpenCL.
Thank you!
A slight problem, on centos 7.
./gpuPlotGenerator: /lib64/libstdc++.so.6: version
CXXABI_1.3.8' not found (required by ./gpuPlotGenerator)
./gpuPlotGenerator: /lib64/libstdc++.so.6: version CXXABI_1.3.9' not found (required by ./gpuPlotGenerator) ./gpuPlotGenerator: /lib64/libstdc++.so.6: version
GLIBCXX_3.4.22' not found (required by ./gpuPlotGenerator)
./gpuPlotGenerator: /lib64/libstdc++.so.6: version GLIBCXX_3.4.21' not found (required by ./gpuPlotGenerator)
@belcloud You'll have to build it from sources.
I've tried, unfortunately, i'm getting the following error on both centos 7 and ubuntu 16, even with the latest git version:
for(std::shared_ptr<GenerationDevice>& generationDevice : generationDevices) { ^ /root/xx/gpuPlotGenerator/CommandGenerate.cpp:175:40: error: expected primary-expression before â>â token for(std::shared_ptr<GenerationDevice>& generationDevice : generationDevices) { ^ /root/xx/gpuPlotGenerator/CommandGenerate.cpp:175:60: error: found â:â in nested-name-specifier, expected â::â for(std::shared_ptr<GenerationDevice>& generationDevice : generationDevices) { ^ /root/xx/gpuPlotGenerator/CommandGenerate.cpp:175:43: error: âgenerationDeviceâ has not been declared for(std::shared_ptr<GenerationDevice>& generationDevice : generationDevices) { ^ /root/xx/gpuPlotGenerator/CommandGenerate.cpp:175:79: error: expected â;â before â)â token for(std::shared_ptr<GenerationDevice>& generationDevice : generationDevices) { ^ /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected primary-expression at end of input }} ^ /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â;â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected primary-expression at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â)â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected statement at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â}â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â}â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected âcatchâ at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â(â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected type-specifier at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â)â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â{â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â}â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp: At global scope: /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â}â at end of input /root/xx/gpuPlotGenerator/CommandGenerate.cpp:428:2: error: expected â}â at end of input In file included from /root/xx/gpuPlotGenerator/CommandGenerate.cpp:21:0: /root/xx/gpuPlotGenerator/util.h: In instantiation of âstd::string cryo::util::formatValue(T, const std::vector<T>&, const std::vector<std::basic_string<char> >&) [with T = long long unsigned int; std::string = std::basic_string<char>]â: /root/xx/gpuPlotGenerator/CommandGenerate.cpp:163:96: required from here /root/xx/gpuPlotGenerator/util.h:79:68: error: âclass std::vector<long long unsigned int>â has no member named âcrbeginâ typename std::vector<T>::const_reverse_iterator it(parts.crbegin()); ^ /root/xx/gpuPlotGenerator/util.h:80:67: error: âclass std::vector<long long unsigned int>â has no member named âcrendâ typename std::vector<T>::const_reverse_iterator end(parts.crend()); ^ make[2]: *** [CMakeFiles/gpuPlotGenerator.dir/CommandGenerate.cpp.o] Error 1 make[1]: *** [CMakeFiles/gpuPlotGenerator.dir/all] Error 2 make: *** [all] Error 2
Thanks
@belcloud From the error, I'd say that you have an old compiler. This program uses C++11 features, so you need a gcc 4.8+. What's your GCC version?
On centos 7, 4.8.5 On ubuntu 16, 5.4.0
Can you provide an email? I can give a vps for testing if you want.
bhamon@mailinator.com
@belcloud Based on what I see, that's a compiler issue on CentOS only. Here is an extract of the first build error:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
It seems that the c++11 support is disabled by default on those GCC builds. I updated the CMake build file and published a new version (4.1.3).
Thank you for the VPS. I built the gpuPlotGenerator in /opt/gpuPlotGenerator
.
As a side note: you now need a CMake 3.1+ version to build the plotter. On CentOS, you need to upgrade it (the default installed version is 2.8+).
Thank you very much!
Hi bhamon,
Almost like belcloud, I am running Linux Mint with gcc 5.4. I also had the same error with -std=C++11 and made the changes you did on the CMakeLists.txt. It looked like it was working I got the following warnings and final errors that showed the compiler failed.
xepherx@xepherx-A880G ~/Downloads/gpuPlotGenerator-4.1.2 $ make
[ 4%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/Command.cpp.o
[ 9%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/CommandGenerate.cpp.o
[ 13%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/CommandHelp.cpp.o
[ 18%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/CommandListDevices.cpp.o
[ 22%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/CommandListPlatforms.cpp.o
[ 27%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/CommandSetup.cpp.o
[ 31%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/CommandVerify.cpp.o
[ 36%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/DeviceConfig.cpp.o
[ 40%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/GenerationConfig.cpp.o
[ 45%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/GenerationContext.cpp.o
[ 50%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/GenerationContextBuffer.cpp.o
[ 54%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/GenerationContextDirect.cpp.o
[ 59%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/GenerationDevice.cpp.o
/home/xepherx/Downloads/gpuPlotGenerator-4.1.2/GenerationDevice.cpp: In constructor ‘cryo::gpuPlotGenerator::GenerationDevice::GenerationDevice(const std::shared_ptr<cryo::gpuPlotGenerator::DeviceConfig>&, const std::shared_ptr<cryo::gpuPlotGenerator::OpenclDevice>&)’:
/home/xepherx/Downloads/gpuPlotGenerator-4.1.2/GenerationDevice.cpp:32:19: warning: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, cl_int*)’ is deprecated [-Wdeprecated-declarations]
m_commandQueue = clCreateCommandQueue(m_context, m_device->getHandle(), 0, &error);
^
In file included from /home/xepherx/Downloads/gpuPlotGenerator-4.1.2/OpenclError.h:15:0,
from /home/xepherx/Downloads/gpuPlotGenerator-4.1.2/GenerationDevice.cpp:15:
/usr/include/CL/cl.h:1359:1: note: declared here
clCreateCommandQueue(cl_context /* context */,
^
/home/xepherx/Downloads/gpuPlotGenerator-4.1.2/GenerationDevice.cpp:32:19: warning: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, cl_int*)’ is deprecated [-Wdeprecated-declarations]
m_commandQueue = clCreateCommandQueue(m_context, m_device->getHandle(), 0, &error);
^
In file included from /home/xepherx/Downloads/gpuPlotGenerator-4.1.2/OpenclError.h:15:0,
from /home/xepherx/Downloads/gpuPlotGenerator-4.1.2/GenerationDevice.cpp:15:
/usr/include/CL/cl.h:1359:1: note: declared here
clCreateCommandQueue(cl_context /* context */,
^
/home/xepherx/Downloads/gpuPlotGenerator-4.1.2/GenerationDevice.cpp:32:83: warning: ‘_cl_command_queue* clCreateCommandQueue(cl_context, cl_device_id, cl_command_queue_properties, cl_int*)’ is deprecated [-Wdeprecated-declarations]
m_commandQueue = clCreateCommandQueue(m_context, m_device->getHandle(), 0, &error);
^
In file included from /home/xepherx/Downloads/gpuPlotGenerator-4.1.2/OpenclError.h:15:0,
from /home/xepherx/Downloads/gpuPlotGenerator-4.1.2/GenerationDevice.cpp:15:
/usr/include/CL/cl.h:1359:1: note: declared here
clCreateCommandQueue(cl_context /* context */,
^
[ 63%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/GenerationWork.cpp.o
[ 68%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/gpuPlotGenerator.cpp.o
[ 72%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/OpenclDevice.cpp.o
[ 77%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/OpenclError.cpp.o
[ 81%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/OpenclPlatform.cpp.o
[ 86%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/PlotsFile.cpp.o
[ 90%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/util.cpp.o
[ 95%] Building CXX object CMakeFiles/gpuPlotGenerator.dir/PlotsFile-linux.cpp.o
[100%] Linking CXX executable gpuPlotGenerator
Followed by a long list of errors like these:
`CMakeFiles/gpuPlotGenerator.dir/Command.cpp.o: In function `cryo::gpuPlotGenerator::Command::Command(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
Command.cpp:(.text+0x2f): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/gpuPlotGenerator.dir/Command.cpp.o: In function `cryo::gpuPlotGenerator::Command::Command(cryo::gpuPlotGenerator::Command const&)':
Command.cpp:(.text+0x69): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/gpuPlotGenerator.dir/Command.cpp.o: In function `cryo::gpuPlotGenerator::Command::~Command()':
Command.cpp:(.text+0x94): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
Command.cpp:(.text+0xa9): undefined reference to `operator delete(void*)'
CMakeFiles/gpuPlotGenerator.dir/Command.cpp.o: In function `cryo::gpuPlotGenerator::Command::~Command()':
Command.cpp:(.text+0xd0): undefined reference to `operator delete(void*)'
CMakeFiles/gpuPlotGenerator.dir/Command.cpp.o:(.rodata._ZTVN4cryo16gpuPlotGenerator7CommandE[_ZTVN4cryo16gpuPlotGenerator7CommandE]+0x20): undefined reference to `__cxa_pure_virtual'
CMakeFiles/gpuPlotGenerator.dir/Command.cpp.o:(.rodata._ZTVN4cryo16gpuPlotGenerator7CommandE[_ZTVN4cryo16gpuPlotGenerator7CommandE]+0x28): undefined reference to `__cxa_pure_virtual'
CMakeFiles/gpuPlotGenerator.dir/Command.cpp.o:(.rodata._ZTIN4cryo16gpuPlotGenerator7CommandE[_ZTIN4cryo16gpuPlotGenerator7CommandE]+0x0): undefined reference to `vtable for __cxxabiv1::__class_type_info'
CMakeFiles/gpuPlotGenerator.dir/CommandGenerate.cpp.o: In function `cryo::gpuPlotGenerator::CommandGenerate::CommandGenerate()':
CommandGenerate.cpp:(.text+0x1c0): undefined reference to `std::allocator<char>::allocator()'
CommandGenerate.cpp:(.text+0x1d5): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
CommandGenerate.cpp:(.text+0x1f4): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
CommandGenerate.cpp:(.text+0x200): undefined reference to `std::allocator<char>::~allocator()'
CommandGenerate.cpp:(.text+0x22d): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
CommandGenerate.cpp:(.text+0x23e): undefined reference to `std::allocator<char>::~allocator()'
CMakeFiles/gpuPlotGenerator.dir/CommandGenerate.cpp.o: In function `cryo::gpuPlotGenerator::CommandGenerate::~CommandGenerate()':
CommandGenerate.cpp:(.text+0x2c1): undefined reference to `operator delete(void*)'
CMakeFiles/gpuPlotGenerator.dir/CommandGenerate.cpp.o: In function `cryo::gpuPlotGenerator::CommandGenerate::~CommandGenerate()':
CommandGenerate.cpp:(.text+0x2e8): undefined reference to `operator delete(void*)'
CMakeFiles/gpuPlotGenerator.dir/CommandGenerate.cpp.o: In function `cryo::gpuPlotGenerator::CommandGenerate::help() const':
CommandGenerate.cpp:(.text+0x300): undefined reference to `std::cout'
CommandGenerate.cpp:(.text+0x305): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
CommandGenerate.cpp:(.text+0x30a): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)'
CommandGenerate.cpp:(.text+0x312): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))'
CommandGenerate.cpp:(.text+0x31c): undefined reference to `std::cout'
`
Nevermind, I got it working after a few changes. I didn't have Threads installed.
sudo apt-get install libpthread-stubs0-dev
I deleted the old files and started fresh.
cmake .
(Confirmed pthread found, before it hadn't)
make -d
Only issue now is cmake confirmed that it found OpenCl version 2.0 but gpuPlotGenerator still doesn't see my graphic card. It shows my integrated Graphics Drive with OpenCl version 1.2. Still this is the best plotter I have found so far to make optimized plots.
@zmeharen Glad you got it working.
About your GPU not being detected by OpenCL 2.0, it is a driver issue. Maybe a parameter to change in the driver software (Catalyst control center or NVidia control panel), or a lack of support for your card.
@zmeharen
Do following. Copy from AMDSDK 3.0 install without root: home/username/AMDAPPSDK-3.0/lib/x86_64/sdk/* too with root: /usr/lib/x86_64-linux-gnu/
remove package opencl-headers from ubuntu 14.04 or higher to use AMDSDK files.
Then it will recognize 2.0 only
Hello
Any idea what causes this?
[root@localhost gpuPlotGenerator]# cmake3 . -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Looking for CL_VERSION_2_0 -- Looking for CL_VERSION_2_0 - not found -- Looking for CL_VERSION_1_2 -- Looking for CL_VERSION_1_2 - found CMake Error at /usr/share/cmake3/Modules/FindPackageHandleStandardArgs.cmake:148 (message): Could NOT find OpenCL (missing: OpenCL_LIBRARY) (found version "1.2") Call Stack (most recent call first): /usr/share/cmake3/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) cmake/FindOpenCL.cmake:143 (find_package_handle_standard_args) CMakeLists.txt:7 (find_package)
@burstpay There is a difference between the opencl-headers package you might install than the package from AMD the whole SDK. The package from AMD would only install without opencl-headers installed.
There are some conflicts there, using only a CL_version_1_2 or CL 2. Building with CL 1.2 might also work for those who manage to compile, but will then show a CPU as unit.
@burstpay Can i close this issue? Is your problem solved?
Yes, please close. Thank you
Hello
Can you please provide the linux x64 binaries for the latest version?
Also, how can we set the OpenCL location in the latest cmake version? I've tried: export OpenCL_INCLUDE_DIR=/usr/local/cuda-8.0/include/ export OpenCL_LIBRARY=/usr/local/cuda-8.0/lib64/ without success. cuda installed in /usr/local/cuda by default on centos7, is it possible to make the cmake script check this location as well?
Thank you for this great software!