error occurs when running 3d examples

224 views
Skip to first unread message

qin...@doane.edu

unread,
Dec 15, 2020, 10:42:40 PM12/15/20
to Deformetrica

Hi all,

I have followed your instructions to install the deformetrica successfully, and some 2d examples could be run successfully. However, when I run examples on 3d data, I got the following errors:

(deformetrica) [LiQing@localhost brains]$ deformetrica estimate model.xml data_set.xml -p optimization_parameters.xml

Logger has been set to: WARNING

/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/in_out/xml_parameters.py:574: UserWarning: Unknown entry while parsing the optimization_parameters xml: use-cuda

  warnings.warn(msg)

Compiling libKeOpstorch3f2a025ff1 in /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1:

       formula: Sum_Reduction(Exp(-G*SqDist(X,Y)) * P,0)

       aliases: G = Pm(0,1); X = Vi(1,3); Y = Vj(2,3); P = Vj(3,3); 

       dtype  : float32

... nvcc fatal   : Unsupported gpu architecture 'compute_30'

CMake Error at keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o.Release.cmake:220 (message):

  Error generating

  /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/./keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o



gmake[3]: *** [CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/build.make:85: CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o] Error 1

gmake[2]: *** [CMakeFiles/Makefile2:210: CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/all] Error 2

gmake[1]: *** [CMakeFiles/Makefile2:272: CMakeFiles/libKeOpstorch3f2a025ff1.dir/rule] Error 2

gmake: *** [Makefile:203: libKeOpstorch3f2a025ff1] Error 2


--------------------- MAKE DEBUG -----------------

Command '['cmake', '--build', '.', '--target', 'libKeOpstorch3f2a025ff1', '--', 'VERBOSE=1']' returned non-zero exit status 2.

/home/LiQing/bin/cmake -S/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/pykeops -B/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1 --check-build-system CMakeFiles/Makefile.cmake 0

/opt/rh/devtoolset-8/root/usr/bin/gmake  -f CMakeFiles/Makefile2 libKeOpstorch3f2a025ff1

gmake[1]: Entering directory '/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1'

/home/LiQing/bin/cmake -S/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/pykeops -B/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1 --check-build-system CMakeFiles/Makefile.cmake 0

/home/LiQing/bin/cmake -E cmake_progress_start /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles 4

/opt/rh/devtoolset-8/root/usr/bin/gmake  -f CMakeFiles/Makefile2 CMakeFiles/libKeOpstorch3f2a025ff1.dir/all

gmake[2]: Entering directory '/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1'

/opt/rh/devtoolset-8/root/usr/bin/gmake  -f CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/build.make CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/depend

gmake[3]: Entering directory '/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1'

[ 25%] Building NVCC (Device) object CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o

cd /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core && /home/LiQing/bin/cmake -E make_directory /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/.

cd /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core && /home/LiQing/bin/cmake -D verbose:BOOL=1 -D build_configuration:STRING=Release -D generated_file:STRING=/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/./keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o -D generated_cubin_file:STRING=/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/./keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o.cubin.txt -P /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o.Release.cmake

-- Removing /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/./keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o

/home/LiQing/bin/cmake -E rm -f /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/./keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o

-- Generating dependency file: /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o.NVCC-depend

/usr/local/cuda-11.0/bin/nvcc -M -D__CUDACC__ /home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/pykeops/keops/core/link_autodiff.cu -o /home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1/CMakeFiles/keopslibKeOpstorch3f2a025ff1.dir/keops/core/keopslibKeOpstorch3f2a025ff1_generated_link_autodiff.cu.o.NVCC-depend -m64 -DkeopslibKeOpstorch3f2a025ff1_EXPORTS -D_FORCE_INLINES -DCUDA_BLOCK_SIZE=192 -DUSE_CUDA=1 -D__TYPE__=float -DC_CONTIGUOUS=1 -D__TYPEACC__=float -DSUM_SCHEME=1 -D_GLIBCXX_USE_CXX11_ABI=0 -DUSE_DOUBLE=0 -DUSE_HALF=0 -DMODULE_NAME=libKeOpstorch3f2a025ff1 -DKERNEL_GEOM_TYPE=0 -DKERNEL_SIG_TYPE=0 -DKERNEL_SPHERE_TYPE=0 -DMODULE_NAME_FSHAPE_SCP=fshape_scp_gaussiangaussiangaussian_unoriented_float -Xcompiler ,\"-DUSE_OPENMP\",\"-fopenmp\",\"-Wall\",\"-Wno-unknown-pragmas\",\"-fmax-errors=2\",\"-fPIC\",\"-O3\",\"-DNDEBUG\",\"-O3\" -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_70,code=compute_70 -gencode arch=compute_75,code=compute_75 --use_fast_math --compiler-options=-fPIC -ccbin /opt/rh/devtoolset-8/root/usr/bin/c++ --pre-include=libKeOpstorch3f2a025ff1.h -DNVCC -I/usr/local/cuda-11.0/include -I/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/pykeops -I/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/pykeops/keops -I/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1 -I/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/torch/include -I/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/torch/include/torch/csrc/api/include

gmake[3]: Leaving directory '/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1'

gmake[2]: Leaving directory '/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1'

gmake[1]: Leaving directory '/home/LiQing/.cache/pykeops-1.4.1-cpython-38/build-libKeOpstorch3f2a025ff1'


--------------------- ----------- -----------------

Done.

Traceback (most recent call last):

  File "/home/LiQing/anaconda3/envs/deformetrica/bin/deformetrica", line 8, in <module>

    sys.exit(main())

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/__main__.py", line 113, in main

    deformetrica.estimate_deterministic_atlas(

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/api/deformetrica.py", line 186, in estimate_deterministic_atlas

    self.__launch_estimator(estimator, write_output)

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/api/deformetrica.py", line 506, in __launch_estimator

    estimator.update()

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/core/estimators/scipy_optimize.py", line 101, in update

    result = minimize(self._cost_and_derivative, self.x0.astype('float64'),

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 617, in minimize

    return _minimize_lbfgsb(fun, x0, args, jac, bounds,

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/lbfgsb.py", line 306, in _minimize_lbfgsb

    sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/optimize.py", line 261, in _prepare_scalar_function

    sf = ScalarFunction(fun, x0, args, grad, hess,

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 76, in __init__

    self._update_fun()

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 166, in _update_fun

    self._update_fun_impl()

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 73, in update_fun

    self.f = fun_wrapped(self.x)

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 70, in fun_wrapped

    return fun(x, *args)

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/optimize.py", line 74, in __call__

    self._compute_if_needed(x, *args)

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/scipy/optimize/optimize.py", line 68, in _compute_if_needed

    fg = self.fun(x, *args)

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/core/estimators/scipy_optimize.py", line 213, in _cost_and_derivative

    attachment, regularity, gradient = self.statistical_model.compute_log_likelihood(

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/core/models/deterministic_atlas.py", line 333, in compute_log_likelihood

    return self._compute_attachment_and_regularity(dataset, template_data, template_points, control_points,

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/core/models/deterministic_atlas.py", line 421, in _compute_attachment_and_regularity

    new_attachment, new_regularity = DeterministicAtlas._deform_and_compute_attachment_and_regularity(

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/core/models/deterministic_atlas.py", line 351, in _deform_and_compute_attachment_and_regularity

    exponential.update()

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/core/model_tools/deformations/exponential.py", line 173, in update

    self.shoot()

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/core/model_tools/deformations/exponential.py", line 210, in shoot

    new_cp, new_mom = self._euler_step(self.shoot_kernel, self.control_points_t[i], self.momenta_t[i], dt)

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/core/model_tools/deformations/exponential.py", line 483, in _euler_step

    return cp + h * kernel.convolve(cp, cp, mom), \

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/deformetrica/support/kernels/keops_kernel.py", line 82, in convolve

    res = self.gaussian_convolve[d - 2](gamma, x.contiguous(), y.contiguous(), p.contiguous(), device_id=device_id)

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/pykeops/torch/generic/generic_red.py", line 395, in __call__

    out = GenredAutograd.apply(self.formula, self.aliases, backend, self.dtype, 

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/pykeops/torch/generic/generic_red.py", line 22, in forward

    myconv = LoadKeOps(formula, aliases, dtype, 'torch', optional_flags).import_module()

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/site-packages/pykeops/common/keops_io.py", line 70, in import_module

    return importlib.import_module(self.dll_name)

  File "/home/LiQing/anaconda3/envs/deformetrica/lib/python3.8/importlib/__init__.py", line 127, in import_module

    return _bootstrap._gcd_import(name[level:], package, level)

  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import

  File "<frozen importlib._bootstrap>", line 991, in _find_and_load

  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'libKeOpstorch3f2a025ff1'

Is it due to my device configuration? Any help will be appreciated!

Qing

Fleur Gaudfernau

unread,
Jan 8, 2021, 11:04:57 AM1/8/21
to Deformetrica
Hello,
I have just started using deformetrica and I encountered the same issue.
Apparently, pykeops is not compatible with CUDA 11+.
What you can do is create a virtual environment in which you will use cuda version 10 (this worked for me).

Steps to reproduce:
* (Load the right Python module) module load python/3.6
* (Load the right CUDA module) module load cuda/10
* (Create a virtualenv) python -m venv keops-env
* (Activate virtualenv) source keops-env/bin/activate
* (Update pip in the virtualenv, be sure to be in the active virtualenv) python -m pip install -U pip
* (Install pykeops) python -m pip install pykeops

Then you can call deformetrica.

Hope this works for you.
Kind regards,
Fleur
Reply all
Reply to author
Forward
0 new messages