Closed grandyang closed 6 years ago
Hi,
which operating system and which cuda version do you use? What is the CMake output?
I am using CentOS 7, CUDA 9.1, here is the CMake output:
WRONG CUDA_SDK_ROOT_DIR:/usr/local/cuda-9.1 COMPILER FLAGS: CMAKE_BUILD_TYPE: RelWithDebInfo BUILD_SHARED_LIBS: ON CMAKE_C_FLAGS= CMAKE_CXX_FLAGS = -std=c++11 -fPIC -fmax-errors=3 -fpermissive -ggdb -Wunused-result -Wno-unused-variable -Wno-unused-value -Wno-unused-but-set-variable -Wdisabled-optimization -Wdiv-by-zero -Wc++11-compat -Wno-float-equal -fopenmp -O2 -DPARALLEL -ffast-math -DNDEBUG CMAKE_CXX_FLAGS_RELEASE = -O2 -DNDEBUG CUDA_NVCC_FLAGS= -arch=sm_30;-expt-extended-lambda;-ftemplate-backtrace-limit=2;-lineinfo;-std=c++11;-Xcompiler=-Wno-sign-compare;-O2;-keep;-src-in-ptx;-DNDEBUG;-Xptxas=-warn-lmem-usage;-Xptxas=-warn-spills CUDA_PROPAGATE_HOST_FLAGS= OFF COMPILE_DEFINITIONS = [-] ImageUtilities omitting IO module [+] ImageUtilities include GUI module [+] ImageUtilities include Math module [-] do not build static library [-] insufficient gcc version, building without ndarray NDARRAY_LIB= additional iuio libs: install: /usr/local Configuring done Generating done
I see several potential problems:
It seems you don't have OpenCV installed, because the IO module is turned off. Make Sure you have installed OpenCV 2.4.x or OpenCV 3.3 and set the IO module to ON.
Which gcc version do you have? Your CMake output says "insufficient gcc version [...]". GCC 4.9 and GCC 5.4 will work.
Did you set the environment variables as described in the point "Installation" ($IMAGEUTILITIES_ROOT, $COMPUTE_CAPABILITY, $CUDA_SDK_ROOT)?
I did not test CUDA 9.1 yet. CUDA 8 works fine.
I changed to Ubuntu 16.04, and get the imageutilities installed successfully.
But when I am compiling the slackprop, I have the following error:
_CMake Error at CMakeLists.txt:33 (find_package): By not providing "FindImageUtilities.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ImageUtilities", but CMake did not find one.
Could not find a package configuration file provided by "ImageUtilities" with any of the following names:
ImageUtilitiesConfig.cmake
imageutilities-config.cmake
Add the installation prefix of "ImageUtilities" to CMAKE_PREFIX_PATH or set "ImageUtilitiesDIR" to a directory containing one of the above files. If "ImageUtilities" provides a separate development package or SDK, be sure it has been installed.
I have tried to add the following in the .bashrc export ImageUtilities_DIR=/home/myName/Documents/cnn-crf-stereo/dependencies/imageutilities
But not working, so I tried the following line: cmake -D ImageUtilities_DIR=/home/myName/Documents/cnn-crf-stereo/dependencies/imageutilities ..
It seems that iucore cannot be found:
_-- 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
-- Found CUDA: /usr/local/cuda (found suitable version "9.1", minimum required is "5.0")
COMPILER FLAGS:
-- CMAKE_BUILD_TYPE: Release
-- BUILD_SHARED_LIBS: ON
-- CMAKE_C_FLAGS=
-- CMAKE_CXX_FLAGS = -std=c++11 -fPIC -fmax-errors=3 -fpermissive -ggdb -Wunused-result -Wno-unused-variable -Wno-unused-value -Wno-unused-but-set-variable -Wdisabled-optimization -Wdiv-by-zero -Wc++11-compat -Wno-float-equal -fopenmp -O2 -DPARALLEL -ffast-math -DNDEBUG
-- CMAKE_CXX_FLAGS_RELEASE = -O3 -DNDEBUG
-- CUDA_NVCC_FLAGS= -arch=sm_30;-expt-extended-lambda;-ftemplate-backtrace-limit=2;-lineinfo;-std=c++11;-Xcompiler=-Wno-sign-compare;-O2;-keep;-src-in-ptx;-DNDEBUG;-Xptxas=-warn-lmem-usage;-Xptxas=-warn-spills
-- CUDA_PROPAGATE_HOST_FLAGS= OFF
-- COMPILE_DEFINITIONS =
-- Imageutilities requested components: iucore;ndarray
CMake Error at /home/xiaochen/Documents/cnn-crf-stereo/dependencies/imageutilities/ImageUtilitiesConfig.cmake:136 (message):
iucore marked as required but not found
Call Stack (most recent call first):
CMakeLists.txt:33 (findpackage)
Do you have a clue how to fix it? Thanks a lot!
We are looking for an environment variable "IMAGEUTILITIES_ROOT" in the slackprop CMake file, i.e., you must set this environment variable in your .bashrc. My entry looks like
export IMAGEUTILITIES_ROOT=/home/myName/cnn-crf-stereo/dependencies/imageutilities
You don't need to set ImageUtilities_DIR, if everything is set up correctly, CMake will find it automatically. It is important that the IMAGEUTILITIES_ROOT environment variable is set before you configure the imageutilities with CMake. Also make sure you install the imageutilities using
make install
If everything worked correctly, you should additionally have the folders "include" and "lib" in your $IMAGEUTILITIES_ROOT folder. Then slackprop will find the imageutilities package.
Dear pknoebelreiter,I have compile the MAGEUTILITIES successfully,Is there any difference from your environment variable sudo gedit ~/.bashrc export IMAGEUTILITIES_ROOT=/home/jennifer/cnn-crf-stereo-master/dependencies/imageutilities export CUDA_SDK_ROOT_DIR=/usr/local/cuda/samples/ export COMPUTE_CAPABILITY=3.5 export IMAGEUTILITIES_ROOT=/usr/local/MATLAB/R2016b source ~/.bashrc In slackprop, I got the error,Do you have a clue how to fix it? Thanks a lot. CMake Error at CMakeLists.txt:33 (find_package): By not providing "FindImageUtilities.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ImageUtilities", but CMake did not find one.
Could not find a package configuration file provided by "ImageUtilities" with any of the following names:
ImageUtilitiesConfig.cmake
imageutilities-config.cmake
Add the installation prefix of "ImageUtilities" to CMAKE_PREFIX_PATH or set "ImageUtilities_DIR" to a directory containing one of the above files. If "ImageUtilities" provides a separate development package or SDK, be sure it has been installed.
while the folders "include" and "lib" are putted in /usr/local/, here is the log: Install the project... -- Install configuration: "RelWithDebInfo" -- Installing: /usr/local/lib/libiucore.so.2.1.0 -- Up-to-date: /usr/local/lib/libiucore.so.2.10 -- Up-to-date: /usr/local/lib/libiucore.so -- Up-to-date: /usr/local/include/iu/iugui.h -- Up-to-date: /usr/local/include/iu/iumath.h -- Up-to-date: /usr/local/include/iu/iudefs.h -- Up-to-date: /usr/local/include/iu/iucutil.h -- Up-to-date: /usr/local/include/iu/iucore.h -- Up-to-date: /usr/local/include/iu/iuhelpermath.h -- Installing: /usr/local/lib/libiugui.so.2.1.0 -- Up-to-date: /usr/local/lib/libiugui.so.2.10 -- Up-to-date: /usr/local/lib/libiugui.so -- Installing: /usr/local/lib/libiumath.so.2.1.0 -- Up-to-date: /usr/local/lib/libiumath.so.2.10 -- Up-to-date: /usr/local/lib/libiumath.so -- Up-to-date: /usr/local/include/iu/iucore/iucoreapi.h -- Up-to-date: /usr/local/include/iu/iucore/coredefs.h -- Up-to-date: /usr/local/include/iu/iucore/memorydefs.h -- Up-to-date: /usr/local/include/iu/iucore/linearmemory.h -- Up-to-date: /usr/local/include/iu/iucore/linearhostmemory.h -- Up-to-date: /usr/local/include/iu/iucore/lineardevicememory.h -- Up-to-date: /usr/local/include/iu/iucore/tensor_cpu.h -- Up-to-date: /usr/local/include/iu/iucore/tensor_gpu.h -- Up-to-date: /usr/local/include/iu/iucore/image.h -- Up-to-date: /usr/local/include/iu/iucore/image_allocator_cpu.h -- Up-to-date: /usr/local/include/iu/iucore/image_cpu.h -- Up-to-date: /usr/local/include/iu/iucore/image_allocator_gpu.h -- Up-to-date: /usr/local/include/iu/iucore/image_gpu.h -- Up-to-date: /usr/local/include/iu/iucore/volume.h -- Up-to-date: /usr/local/include/iu/iucore/volume_allocator_cpu.h -- Up-to-date: /usr/local/include/iu/iucore/volume_cpu.h -- Up-to-date: /usr/local/include/iu/iucore/volume_allocator_gpu.h -- Up-to-date: /usr/local/include/iu/iucore/volume_gpu.h -- Up-to-date: /usr/local/include/iu/iucore/copy.h -- Up-to-date: /usr/local/include/iu/iucore/vector.h -- Up-to-date: /usr/local/include/iu/common/derivative_kernels.cuh -- Up-to-date: /usr/local/include/iu/common/bind_textures.cuh -- Up-to-date: /usr/local/include/iu/iugui/qt5imagegpuwidget.h -- Up-to-date: /usr/local/include/iu/iugui/qt5disparitymapgpuwidget.h -- Up-to-date: /usr/local/include/iu/iugui/iuguiapi.h -- Up-to-date: /usr/local/include/iu/iumath/iumathapi.h -- Up-to-date: /usr/local/include/iu/iumath/typetraits.h -- Up-to-date: /usr/local/include/iu/iugui.h -- Up-to-date: /usr/local/include/iu/iumath.h -- Up-to-date: /usr/local/include/iu/iudefs.h -- Up-to-date: /usr/local/include/iu/iucutil.h -- Up-to-date: /usr/local/include/iu/iucore.h -- Up-to-date: /usr/local/include/iu/iuhelpermath.h -- Up-to-date: /usr/local/cmake/FindFlyCapture2.cmake -- Installing: /usr/local/lib/libndarray.so.1 -- Up-to-date: /usr/local/lib/libndarray.so -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_ref.host.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_iterator_div.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_iterator.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_iterator_over.h -- Up-to-date: /usr/local/include/iu/ndarray/bit_index.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_ref.kernel.h -- Up-to-date: /usr/local/include/iu/ndarray/mex_io.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_iu.h -- Up-to-date: /usr/local/include/iu/ndarray/type_expand_cuda.h -- Up-to-date: /usr/local/include/iu/ndarray/stacktrace.h -- Up-to-date: /usr/local/include/iu/ndarray/options.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_print.h -- Up-to-date: /usr/local/include/iu/ndarray/intn.h -- Up-to-date: /usr/local/include/iu/ndarray/type_name.h -- Up-to-date: /usr/local/include/iu/ndarray/tests.h -- Up-to-date: /usr/local/include/iu/ndarray/common_transforms.h -- Up-to-date: /usr/local/include/iu/ndarray/error_cuda.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_io.h -- Up-to-date: /usr/local/include/iu/ndarray/functor.h -- Up-to-date: /usr/local/include/iu/ndarray/common_transforms.h -- Up-to-date: /usr/local/include/iu/ndarray/transform.h -- Up-to-date: /usr/local/include/iu/ndarray/transform.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_mem.h -- Up-to-date: /usr/local/include/iu/ndarray/transform.h -- Up-to-date: /usr/local/include/iu/ndarray/error.kernel.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_op.h -- Up-to-date: /usr/local/include/iu/ndarray/error.h -- Up-to-date: /usr/local/include/iu/ndarray/defines.h -- Up-to-date: /usr/local/include/iu/ndarray/ndarray_op.cuh -- Up-to-date: /usr/local/include/iu/ndarray/transform.cuh -- Up-to-date: /usr/local/include/iu/ndarray/transform.cuh -- Up-to-date: /usr/local/include/iu/ndarray/transform.cuh -- Up-to-date: /usr/local/include/ndarray_exports.h
Hi,
you overwrite the environment variable IMAGEUTILITIES_ROOT in your .bashrc:
export IMAGEUTILITIES_ROOT=/usr/local/MATLAB/R2016b
This variable should be MATLAB_ROOT.
Oh my god, thanks khammernik. I did not noticed it before
Hi
I have the following error:
../cnn-crf-stereo/dependencies/imageutilities/tests/../src/ndarray/ndarray_mem.h:8:29: fatal error: ndarray_exports.h: No such file or directory
include "ndarray_exports.h"
compilation terminated. make[2]: [tests/ndarrayTest/CMakeFiles/ndarrayTest.dir/ndarray_example.cpp.o] Error 1 make[1]: [tests/ndarrayTest/CMakeFiles/ndarrayTest.dir/all] Error 2 make: *** [all] Error 2
Do you know where I can get the "ndarray_exports.h" file?