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

Compilation error on test script #37

Closed
chaithyagr opened this issue Dec 5, 2019 · 13 comments
Closed

Compilation error on test script #37

chaithyagr opened this issue Dec 5, 2019 · 13 comments

Comments

@chaithyagr
Copy link

I seem to be facing a rather weird issue on my local test with CUDA 10.2, gcc5.4, cmake3.10 and cmake3.12 (Fails with both cmakes)

>>> import numpy as np
>>> import pykeops.numpy as pknp
>>> x = np.arange(1, 10).reshape(-1, 3).astype('float32')
>>> y = np.arange(3, 9).reshape(-1, 3).astype('float32')
>>> my_conv = pknp.Genred('SqNorm2(x - y)', ['x = Vi(3)', 'y = Vj(3)'])
Compiling libKeOpsnumpy5ac3d464a2 in /home/cg260486/.cache/pykeops-1.2-cpython-35//build-libKeOpsnumpy5ac3d464a2:
       formula: Sum_Reduction(SqNorm2(x - y),1)
       aliases: x = Vi(0,3); y = Vj(1,3); 
       dtype  : float64
... make: Warning: File 'Makefile' has modification time 54 s in the future
make[1]: Warning: File 'CMakeFiles/Makefile2' has modification time 54 s in the future
make[2]: Warning: File 'CMakeFiles/Makefile2' has modification time 54 s in the future
make[3]: Warning: File 'CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/flags.make' has modification time 54 s in the future
In file included from /usr/include/c++/5/type_traits:35:0,
                 from /neurospin/optimed/Chaithya/Environments/CSMRI_sparkling/venv/lib/python3.5/site-packages/pykeops/keops/lib/sequences/include/tao/seq/concatenate.hpp:7,
                 from /neurospin/optimed/Chaithya/Environments/CSMRI_sparkling/venv/lib/python3.5/site-packages/pykeops/keops/core/formulas/maths/TensorDot.h:8,
                 from /neurospin/optimed/Chaithya/Environments/CSMRI_sparkling/venv/lib/python3.5/site-packages/pykeops/keops/keops_includes.h:33,
                 from /home/cg260486/.cache/pykeops-1.2-cpython-35/build-libKeOpsnumpy5ac3d464a2/libKeOpsnumpy5ac3d464a2.h:13,
                 from <command-line>:0:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
CMake Error at keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o.Release.cmake:219 (message):
  Error generating
  /home/cg260486/.cache/pykeops-1.2-cpython-35/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/./keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o


make[3]: *** [CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o] Error 1
make[2]: *** [CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/all] Error 2
make[1]: *** [CMakeFiles/libKeOpsnumpy5ac3d464a2.dir/rule] Error 2
make: *** [libKeOpsnumpy5ac3d464a2] Error 2

I had faced similar issue while trying to build pykeops locally, and I found that adding -std=c++11 arg for nvcc helped. Now, I am not sure if this is an issue in keops or cmake. Note that this works fine on Google Colab. So I think this is surely more about my environment, and I could not find sufficient resources online other than -std=c++11 to fix this.

@bcharlier
Copy link
Member

bcharlier commented Dec 6, 2019

Hi @chaithyagr ,

thank for the report. I do not have yet cuda 10.2 installed on any system... and will not be able to install it before next week. But commit 185ed8c should have fixed the problem. Can you try if you have time?

b.

@chaithyagr
Copy link
Author

Hello @bcharlier ,

Thank you for the quick response.

As I mentioned earlier, I had issues while building pykeops locally also. I fetched the lastest masterm and tried a build. I still have issues with both pykeops and keops build:

make VERBOSE=1

make: Warning: File 'Makefile' has modification time 43 s in the future
/usr/bin/cmake -H/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops -B/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build'
make[1]: Warning: File 'CMakeFiles/Makefile2' has modification time 45 s in the future
make -f CMakeFiles/keops.dir/build.make CMakeFiles/keops.dir/depend
make[2]: Entering directory '/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build'
make[2]: Warning: File 'CMakeFiles/keops.dir/flags.make' has modification time 42 s in the future
[  0%] Building NVCC (Device) object CMakeFiles/keops.dir/core/keops_generated_link_autodiff.cu.o
cd /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core && /usr/bin/cmake -E make_directory /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/.
cd /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core && /usr/bin/cmake -D verbose:BOOL=1 -D build_configuration:STRING= -D generated_file:STRING=/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/./keops_generated_link_autodiff.cu.o -D generated_cubin_file:STRING=/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/./keops_generated_link_autodiff.cu.o.cubin.txt -P /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/keops_generated_link_autodiff.cu.o.cmake
-- Removing /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/./keops_generated_link_autodiff.cu.o
/usr/bin/cmake -E remove /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/./keops_generated_link_autodiff.cu.o
-- Generating dependency file: /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/keops_generated_link_autodiff.cu.o.NVCC-depend
/usr/local/cuda/bin/nvcc -M -D__CUDACC__ /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/core/link_autodiff.cu -o /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/keops_generated_link_autodiff.cu.o.NVCC-depend -m64 -Dkeops_EXPORTS -DMAXIDGPU=0 -DMAXTHREADSPERBLOCK0=1024 -DSHAREDMEMPERBLOCK0=49152 -D_FORCE_INLINES -DCUDA_BLOCK_SIZE=192 -DUSE_CUDA=1 -D__TYPE__=float -DC_CONTIGUOUS=O -Xcompiler ,\"-Wall\",\"-Wno-unknown-pragmas\",\"-fmax-errors=2\",\"-fPIC\",\"-g\",\"-O0\",\"-g\" -gencode arch=compute_61,code=sm_61 --use_fast_math --compiler-options=-fPIC -ccbin /usr/bin/c++ --pre-include=keops.h -DNVCC -I/usr/local/cuda/include -I/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops -I/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build
In file included from /usr/include/c++/5/type_traits:35:0,
                 from /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/lib/sequences/include/tao/seq/concatenate.hpp:7,
                 from /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/core/formulas/maths/TensorDot.h:8,
                 from /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/keops_includes.h:34,
                 from /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/keops.h:13,
                 from <command-line>:0:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
CMake Error at keops_generated_link_autodiff.cu.o.cmake:219 (message):
  Error generating
  /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/./keops_generated_link_autodiff.cu.o

Now If I just run the failing command with -std=c++11 , the build passes:

/usr/local/cuda/bin/nvcc -M -D__CUDACC__ /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/core/link_autodiff.cu -o /neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build/CMakeFiles/keops.dir/core/keops_generated_link_autodiff.cu.o.NVCC-depend -m64 -Dkeops_EXPORTS -DMAXIDGPU=0 -DMAXTHREADSPERBLOCK0=1024 -DSHAREDMEMPERBLOCK0=49152 -D_FORCE_INLINES -DCUDA_BLOCK_SIZE=192 -DUSE_CUDA=1 -D__TYPE__=float -DC_CONTIGUOUS=O -Xcompiler ,\"-Wall\",\"-Wno-unknown-pragmas\",\"-fmax-errors=2\",\"-fPIC\",\"-g\",\"-O0\",\"-g\" -gencode arch=compute_61,code=sm_61 --use_fast_math --compiler-options=-fPIC -ccbin /usr/bin/c++ --pre-include=keops.h -DNVCC -I/usr/local/cuda/include -I/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops -I/neurospin/optimed/Chaithya/Codes/Libraries/keops/keops/build -std=c++11

@bcharlier
Copy link
Member

Thank you for the feedback. Well.. my guess was that this is precisely the expected behavior of CMAKE_CUDA_STANDARD...

I will check this later.

b

@chaithyagr
Copy link
Author

Some things I tested:

  1. In your commit, you passed CMAKE_CXX_STANDARD as value to CMAKE_CUDA_STANDARD, however, this value to me was not 14
  2. Even by hardcoding value of 14 to CMAKE_CUDA_STANDARD, i did not see -std=c++14 added, for which the reason is still unknown. However from https://cmake.org/cmake/help/v3.8/prop_tgt/CUDA_STANDARD.html, it looks like this is possible.

In order to unblock myself, I went ahead and added -std=c++14 as an explicit CUDA_NVCC_FLAG, and now, I see things building just fine. However, in the import I get the classic error :
return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 986, in _gcd_import File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 666, in _load_unlocked File "<frozen importlib._bootstrap>", line 577, in module_from_spec File "<frozen importlib._bootstrap_external>", line 906, in create_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed **ImportError: dynamic module does not define module export function (PyInit_libKeOpstorch3aa6f0f160)**

Any idea on how to fix this?
Classically, we use PYBIND11_MODULE define arg to prevent these issues. However, given these builds are dynamic, I am assuming the process is different in this case?

Also, my gcc is 5.4, cmake is 3.15 and CUDA is version 10.0 (I went from 10.2 to 10.0 assuming that could help fix things)

@bcharlier
Copy link
Member

Hi @chaithyagr ,

I checked on my various system and the compile flag std=c++11 is not explicitly needed with nvcc... Can you send me the id of your linux distro and the full output of

import pykeops
pykeops.verbose = True
pykeops.build_type = 'Debug'

import numpy as np
import pykeops.numpy as pknp
x = np.arange(1, 10).reshape(-1, 3).astype('float32')
y = np.arange(3, 9).reshape(-1, 3).astype('float32')
my_conv = pknp.Genred('SqNorm2(x - y)', ['x = Vi(3)', 'y = Vj(3)'])
print(my_conv(x, y))

b.

@chaithyagr
Copy link
Author

Here is the attached requested logs:

Compiling libKeOpsnumpy5ac3d464a2 in /home/cg260486/.cache/pykeops-1.2-cpython-36//build-libKeOpsnumpy5ac3d464a2:
       formula: Sum_Reduction(SqNorm2(x - y),1)
       aliases: x = Vi(0,3); y = Vj(1,3); 
       dtype  : float64
... -- The CXX compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include 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  
-- Compute properties automatically set to: -DMAXIDGPU=0;-DMAXTHREADSPERBLOCK0=1024;-DSHAREDMEMPERBLOCK0=49152
-- The CUDA compiler identification is NVIDIA 10.0.130
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- The CUDA Host CXX Compiler: /usr/bin/c++
-- Autodetected CUDA architecture(s): 6.1 
-- Using shared_obj_name: libKeOpsnumpy5ac3d464a2
-- Found PythonInterp: /volatile/Chaithya/Codes/sparkling/venv/bin/python3.6 (found version "3.6.9") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so
-- pybind11 v2.3.dev1
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2

In file included from /usr/include/c++/5/type_traits:35:0,
                 from /volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops/keops/lib/sequences/include/tao/seq/concatenate.hpp:7,
                 from /volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops/keops/core/formulas/maths/TensorDot.h:8,
                 from /volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops/keops/keops_includes.h:33,
                 from /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/libKeOpsnumpy5ac3d464a2.h:13,
                 from <command-line>:0:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
CMake Error at keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o.Debug.cmake:219 (message):
  Error generating
  /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/./keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o


make[3]: *** [CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o] Error 1
make[2]: *** [CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/all] Error 2
make[1]: *** [CMakeFiles/libKeOpsnumpy5ac3d464a2.dir/rule] Error 2
make: *** [libKeOpsnumpy5ac3d464a2] Error 2

--------------------- MAKE DEBUG -----------------
Command '['cmake', '--build', '.', '--target', 'libKeOpsnumpy5ac3d464a2', '--', 'VERBOSE=1']' returned non-zero exit status 2.
/usr/bin/cmake -H/volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops -B/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/make -f CMakeFiles/Makefile2 libKeOpsnumpy5ac3d464a2
make[1]: Entering directory '/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2'
/usr/bin/cmake -H/volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops -B/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles 5
/usr/bin/make -f CMakeFiles/Makefile2 CMakeFiles/libKeOpsnumpy5ac3d464a2.dir/all
make[2]: Entering directory '/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2'
/usr/bin/make -f CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/build.make CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/depend
make[3]: Entering directory '/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2'
[ 20%] Building NVCC (Device) object CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o
cd /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core && /usr/bin/cmake -E make_directory /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/.
cd /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core && /usr/bin/cmake -D verbose:BOOL=1 -D build_configuration:STRING=Debug -D generated_file:STRING=/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/./keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o -D generated_cubin_file:STRING=/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/./keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o.cubin.txt -P /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o.Debug.cmake
-- Removing /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/./keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o
/usr/bin/cmake -E remove /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/./keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o
-- Generating dependency file: /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o.NVCC-depend
/usr/local/cuda/bin/nvcc -M -D__CUDACC__ /volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops/keops/core/link_autodiff.cu -o /home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2/CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o.NVCC-depend -m64 -DkeopslibKeOpsnumpy5ac3d464a2_EXPORTS -DMAXIDGPU=0 -DMAXTHREADSPERBLOCK0=1024 -DSHAREDMEMPERBLOCK0=49152 -D_FORCE_INLINES -DCUDA_BLOCK_SIZE=192 -DUSE_CUDA=1 -D__TYPE__=double -DC_CONTIGUOUS=1 -DMODULE_NAME=libKeOpsnumpy5ac3d464a2 -D_GLIBCXX_USE_CXX11_ABI=0 -DUSE_DOUBLE=1 -DKERNEL_GEOM_TYPE=0 -DKERNEL_SIG_TYPE=0 -DKERNEL_SPHERE_TYPE=0 -DMODULE_NAME_FSHAPE_SCP=fshape_scp_gaussiangaussiangaussian_unoriented_double -Xcompiler ,\"-Wall\",\"-Wno-unknown-pragmas\",\"-fmax-errors=2\",\"-fPIC\",\"-g\",\"-O0\",\"-g\" -gencode arch=compute_61,code=sm_61 --use_fast_math --compiler-options=-fPIC -ccbin /usr/bin/c++ --pre-include=libKeOpsnumpy5ac3d464a2.h -DNVCC -I/usr/local/cuda/include -I/volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops -I/volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops/keops -I/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2
CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/build.make:63: recipe for target 'CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/keops/core/keopslibKeOpsnumpy5ac3d464a2_generated_link_autodiff.cu.o' failed
make[3]: Leaving directory '/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2'
CMakeFiles/Makefile2:215: recipe for target 'CMakeFiles/keopslibKeOpsnumpy5ac3d464a2.dir/all' failed
make[2]: Leaving directory '/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2'
CMakeFiles/Makefile2:264: recipe for target 'CMakeFiles/libKeOpsnumpy5ac3d464a2.dir/rule' failed
make[1]: Leaving directory '/home/cg260486/.cache/pykeops-1.2-cpython-36/build-libKeOpsnumpy5ac3d464a2'
Makefile:183: recipe for target 'libKeOpsnumpy5ac3d464a2' failed

--------------------- ----------- -----------------
Done.
Traceback (most recent call last):
  File "/volatile/Chaithya/Codes/sparkling/sparkling/fmm/gpu/test.py", line 9, in <module>
    my_conv = pknp.Genred('SqNorm2(x - y)', ['x = Vi(3)', 'y = Vj(3)'])
  File "/volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops/numpy/generic/generic_red.py", line 114, in __init__
    self.myconv = LoadKEops(self.formula, self.aliases, self.dtype, 'numpy').import_module()
  File "/volatile/Chaithya/Codes/sparkling/venv/lib/python3.6/site-packages/pykeops/common/keops_io.py", line 52, in import_module
    return importlib.import_module(self.dll_name)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'libKeOpsnumpy5ac3d464a2'

Process finished with exit code 1

@chaithyagr
Copy link
Author

Adding here,
The pyINIT issues are purely due to conflicting pykeops installations,
On updating the codes as mentioned #37 (comment) and as seen in above PR, I find the codes working fine.

However @bcharlier , as I mentioned in my PR, this seems to be a bit hardcoded solution.
The CMAKE_CXX_STANDARD doesnt seem to work as expected, so this is surely a quick dirty solution, particularly for my use case and people facing similar issues.

@bcharlier
Copy link
Member

what if you try with a newer gcc ?

@chaithyagr
Copy link
Author

Yes, I have been wanting to do this, but I seem to be facing a frozen ubuntu xenial base, due to which I cannot update gcc that easily. I plan to use a docker for this, however, as everything is working on google colab (that works with docker), I expect everything to work fine and thus I havent really done this.

Would you want me to try this?
For now, the above solution clearly works fine and I have no issues.

@chaithyagr
Copy link
Author

@bcharlier do you mean to try the same master codes on later gcc? I think that will work as that is the exact same environment as that in google colab.
Or would you want me to test my updates on later gcc?

Also, I wish to use my changes in some codes I am working on. While my changes or a better fix reaches to mainline and in a version of pykeops, can I still point my codes to install pykeops from my github location?
In the documentation, I see sys.path.append for this, but I am looking for a more general solutyion, like install from a particular git location?

@ReubenDo
Copy link

Hello all,
If it can help, I had similar errors when g++5/gcc5 was used by default instead of g++7/gcc7. I switched and it works now.
Cheers

@chaithyagr
Copy link
Author

Thanks @ReubenDo , so the only question is whether we need my PR at this point, but otherwise I think this issue is resolved.

@bcharlier
Copy link
Member

Hi @chaithyagr ,

I close the issue since the problem was configuration specific as far as I understood.

Best,

b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants