Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build the source code failed on google colab[CL/opencl.h: No such file or directory] #1909

Closed
chucklu opened this issue Oct 4, 2018 · 5 comments

Comments

@chucklu
Copy link

chucklu commented Oct 4, 2018

install the environment

--2018-10-04 04:09:39--  http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/cuda-repo-ubuntu1704_9.0.176-1_amd64.deb
Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 192.229.211.70, 2606:2800:21f:3aa:dcf:37b:1ed6:1fb
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|192.229.211.70|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2828 (2.8K) [application/x-deb]
Saving to: ‘cuda-repo-ubuntu1704_9.0.176-1_amd64.deb.2’

cuda-repo-ubuntu170 100%[===================>]   2.76K  --.-KB/s    in 0s      

2018-10-04 04:09:39 (274 MB/s) - ‘cuda-repo-ubuntu1704_9.0.176-1_amd64.deb.2’ saved [2828/2828]

Reading package lists... Done
Building dependency tree       
Reading state information... Done
dirmngr is already the newest version (2.2.4-1ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
(Reading database ... 59172 files and directories currently installed.)
Preparing to unpack cuda-repo-ubuntu1704_9.0.176-1_amd64.deb ...
Unpacking cuda-repo-ubuntu1704 (9.0.176-1) over (9.0.176-1) ...
Setting up cuda-repo-ubuntu1704 (9.0.176-1) ...
Executing: /tmp/apt-key-gpghome.gyRLoRytnR/gpg.1.sh --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub
gpg: requesting key from 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1704/x86_64/7fa2af80.pub'
gpg: key F60F4B3D7FA2AF80: "cudatools <cudatools@nvidia.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
Ign:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1710/x86_64  InRelease
Ign:2 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64  InRelease
Hit:3 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1710/x86_64  Release
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:7 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64  Release
Get:8 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:9 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Fetched 247 kB in 2s (124 kB/s)
Reading package lists... Done
mkdir: cannot create directory ‘/usr/lib/nvidia’: File exists
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '384.111-0ubuntu1' for 'nvidia-384' was not found
E: Version '384.111-0ubuntu1' for 'nvidia-opencl-icd-384' was not found
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cmake is already the newest version (3.10.2-1ubuntu2).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
clinfo is already the newest version (2.2.18.03.26-1).
libboost-all-dev is already the newest version (1.65.1.0ubuntu1).
libopenblas-dev is already the newest version (0.2.20+ds-4).
git is already the newest version (1:2.17.1-1ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
qtbase5-dev is already the newest version (5.9.5+dfsg-0ubuntu1).
qttools5-dev is already the newest version (5.9.5-0ubuntu1).
qttools5-dev-tools is already the newest version (5.9.5-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Number of platforms                               1
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 1.2 CUDA 9.2.176
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer
  Platform Extensions function suffix             NV

  Platform Name                                   NVIDIA CUDA
Number of devices                                 1
  Device Name                                     Tesla K80
  Device Vendor                                   NVIDIA Corporation
  Device Vendor ID                                0x10de
  Device Version                                  OpenCL 1.2 CUDA
  Driver Version                                  396.44
  Device OpenCL C Version                         OpenCL C 1.2 
  Device Type                                     GPU
  Device Topology (NV)                            PCI-E, 00:00.4
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               13
  Max clock frequency                             823MHz
  Compute Capability (NV)                         3.7
  Device Partition                                (core)
    Max number of sub-devices                     1
    Supported partition types                     None
  Max work item dimensions                        3
  Max work item sizes                             1024x1024x64
  Max work group size                             1024
  Preferred work group size multiple              32
  Warp size (NV)                                  32
  Preferred / native vector sizes                 
    char                                                 1 / 1       
    short                                                1 / 1       
    int                                                  1 / 1       
    long                                                 1 / 1       
    half                                                 0 / 0        (n/a)
    float                                                1 / 1       
    double                                               1 / 1        (cl_khr_fp64)
  Half-precision Floating-point support           (n/a)
  Single-precision Floating-point support         (core)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  Yes
  Double-precision Floating-point support         (cl_khr_fp64)
    Denormals                                     Yes
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 Yes
    Round to infinity                             Yes
    IEEE754-2008 fused multiply-add               Yes
    Support is emulated in software               No
  Address bits                                    64, Little-Endian
  Global memory size                              11996954624 (11.17GiB)
  Error Correction support                        Yes
  Max memory allocation                           2999238656 (2.793GiB)
  Unified memory for Host and Device              No
  Integrated memory (NV)                          No
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       4096 bits (512 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        212992 (208KiB)
  Global Memory cache line size                   128 bytes
  Image support                                   Yes
    Max number of samplers per kernel             32
    Max size for 1D images from buffer            134217728 pixels
    Max 1D or 2D image array size                 2048 images
    Max 2D image size                             16384x16384 pixels
    Max 3D image size                             4096x4096x4096 pixels
    Max number of read image args                 256
    Max number of write image args                16
  Local memory type                               Local
  Local memory size                               49152 (48KiB)
  Registers per block (NV)                        65536
  Max number of constant args                     9
  Max constant buffer size                        65536 (64KiB)
  Max size of kernel argument                     4352 (4.25KiB)
  Queue properties                                
    Out-of-order execution                        Yes
    Profiling                                     Yes
  Prefer user sync for interop                    No
  Profiling timer resolution                      1000ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            No
    Kernel execution timeout (NV)                 No
  Concurrent copy and kernel execution (NV)       Yes
    Number of async copy engines                  2
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_fp64 cl_khr_byte_addressable_store cl_khr_icd cl_khr_gl_sharing cl_nv_compiler_options cl_nv_device_attribute_query cl_nv_pragma_unroll cl_nv_copy_opts cl_nv_create_buffer

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  No platform
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   No platform
  clCreateContext(NULL, ...) [default]            No platform
  clCreateContext(NULL, ...) [other]              Success [NV]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  No platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  Invalid device type for platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  No platform

build the project

Cloning into 'leela-zero'...
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 4311 (delta 0), reused 4 (delta 0), pack-reused 4302
Receiving objects: 100% (4311/4311), 3.17 MiB | 12.99 MiB/s, done.
Resolving deltas: 100% (3092/3092), done.
Detected OS: Linux
make CC=gcc CXX=g++ \
	CXXFLAGS='-I/usr/include/openblas -I. -Wall -Wextra -pipe -O3 -g -ffast-math -flto -march=native -std=c++14 -DNDEBUG'  \
	LDFLAGS=' -flto -g' \
	leelaz
make[1]: Entering directory '/content/leela-zero/src'
g++ -I/usr/include/openblas -I. -Wall -Wextra -pipe -O3 -g -ffast-math -flto -march=native -std=c++14 -DNDEBUG -MD -MP -c -o Network.o Network.cpp
In file included from OpenCL.h:27:0,
                 from OpenCLScheduler.h:26,
                 from Network.cpp:46:
./CL/cl2.hpp:506:10: fatal error: CL/opencl.h: No such file or directory
 #include <CL/opencl.h>
          ^~~~~~~~~~~~~
compilation terminated.
Makefile:61: recipe for target 'Network.o' failed
make[1]: *** [Network.o] Error 1
make[1]: Leaving directory '/content/leela-zero/src'
Makefile:4: recipe for target 'default' failed
make: *** [default] Error 2
@alreadydone
Copy link
Contributor

@wonderingabout
Copy link
Contributor

google colab does not last very long (only a few hours then you have to wait next time), plus if you run with no gpu it wont even run

if you want to contribute, i strongly suggest you look at google cloud free trial rather : #1905

@gcp gcp added the techsupport label Oct 4, 2018
@chucklu
Copy link
Author

chucklu commented Oct 8, 2018

@alreadydone I am using the script from template provided by this project.
Running Leela Zero client on a Tesla K80 GPU for free (Google Colaboratory)

@chucklu
Copy link
Author

chucklu commented Oct 8, 2018

@wonderingabout

at the condition that your id is verified with a vald credit card, to avoid abuse (but you'll never be charged anything, even when your free trial credit ends)

However, I don't have a credit card. I am using Ant Credit Pay provided by Alibaba Group.

@chucklu
Copy link
Author

chucklu commented Oct 8, 2018

@wonderingabout Never mind, it back to normal now today. I can compile the source on google colab and run the autogtp for training.

@chucklu chucklu closed this as completed Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants