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

matio.h could not found #3

Closed
zhengdixin opened this issue Dec 8, 2016 · 13 comments
Closed

matio.h could not found #3

zhengdixin opened this issue Dec 8, 2016 · 13 comments

Comments

@zhengdixin
Copy link

zhengdixin commented Dec 8, 2016

Hi,

I came across a bug "matio.h could not found" while trying to make -j8. I also check the src/caffe/util/ and there is also no matio.h both in your version of caffe and BVLC version vaffe.

The following is Error Message:

CXX src/caffe/util/matio_io.cpp
src/caffe/util/matio_io.cpp:10:19: 致命错误: matio.h:没有那个文件或目录
编译中断。
Makefile:575: recipe for target '.build_release/src/caffe/util/matio_io.o' failed
make: *** [.build_release/src/caffe/util/matio_io.o] Error 1

Best Wishes~

@eugenelawrence
Copy link

eugenelawrence commented Dec 8, 2016

@zhengdixin , You must download matio first.
You can download it at this link.
https://sourceforge.net/projects/matio/files/matio/1.5.2/

@hszhao
Copy link
Owner

hszhao commented Dec 8, 2016

Hi,
This library is required in DeepLab v2 for layer 'mat_read_layer' and 'mat_write_layer'. I have updated the README.md.
Thanks.

@zhengdixin
Copy link
Author

@bkbkbkbkbk @hszhao
Lots of thanks for your help.

Best Wishes~

@sajjo79
Copy link

sajjo79 commented May 16, 2017

Hi,
could you please look into following error in installing the caffe provided in your PSPNet.
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
./include/caffe/common.cuh(9): error: function "atomicAdd(double *, double)" has already been defined

1 error detected in the compilation of "/tmp/tmpxft_00005c9b_00000000-5_interp.cpp4.ii".
Makefile:588: recipe for target '.build_release/cuda/src/caffe/util/interp.o' failed
make: *** [.build_release/cuda/src/caffe/util/interp.o] Error 1

Best

@sajjo79
Copy link

sajjo79 commented May 16, 2017

i also want to know that is it really required to build caffe model provided in your project code? Will it work with standard caffe installation?

@zhengdixin
Copy link
Author

zhengdixin commented May 17, 2017

@sajjo79 Hi, you should build the caffe provided by author. Because this caffe has a little difference from standard caffe.
For the first problem, I think you should modify the ./include/caffe/common.cuh file according to the following way:
#ifndef CAFFE_COMMON_CUH_
#define CAFFE_COMMON_CUH_

#include <cuda.h>

#if !defined(CUDA_ARCH) || CUDA_ARCH >= 600

#else
static inline device double atomicAdd(double address, double val) {
unsigned long long int
address_as_ull = (unsigned long long int*)address;
unsigned long long int old = *address_as_ull, assumed;
if (val==0.0)
return __longlong_as_double(old);
do {
assumed = old;
old = atomicCAS(address_as_ull, assumed, __double_as_longlong(val +__longlong_as_double(assumed)));
} while (assumed != old);
return __longlong_as_double(old);
}

#endif
#endif

@sajjo79
Copy link

sajjo79 commented May 18, 2017

Hi,
After incorporating change suggested by you, i get following error
src/caffe/util/interp.cu(150): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
detected during:
instantiation of "void caffe::caffe_gpu_interp2_kernel_backward<Dtype,packed>(int, float, float, int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(185): here
instantiation of "void caffe::caffe_gpu_interp2_backward<Dtype,packed>(int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(261): here

src/caffe/util/interp.cu(151): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
detected during:
instantiation of "void caffe::caffe_gpu_interp2_kernel_backward<Dtype,packed>(int, float, float, int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(185): here
instantiation of "void caffe::caffe_gpu_interp2_backward<Dtype,packed>(int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(261): here

src/caffe/util/interp.cu(152): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
detected during:
instantiation of "void caffe::caffe_gpu_interp2_kernel_backward<Dtype,packed>(int, float, float, int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(185): here
instantiation of "void caffe::caffe_gpu_interp2_backward<Dtype,packed>(int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(261): here

src/caffe/util/interp.cu(153): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
detected during:
instantiation of "void caffe::caffe_gpu_interp2_kernel_backward<Dtype,packed>(int, float, float, int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(185): here
instantiation of "void caffe::caffe_gpu_interp2_backward<Dtype,packed>(int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(261): here

src/caffe/util/interp.cu(162): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
detected during:
instantiation of "void caffe::caffe_gpu_interp2_kernel_backward<Dtype,packed>(int, float, float, int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(185): here
instantiation of "void caffe::caffe_gpu_interp2_backward<Dtype,packed>(int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(261): here

src/caffe/util/interp.cu(163): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
detected during:
instantiation of "void caffe::caffe_gpu_interp2_kernel_backward<Dtype,packed>(int, float, float, int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(185): here
instantiation of "void caffe::caffe_gpu_interp2_backward<Dtype,packed>(int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(261): here

src/caffe/util/interp.cu(164): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
detected during:
instantiation of "void caffe::caffe_gpu_interp2_kernel_backward<Dtype,packed>(int, float, float, int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(185): here
instantiation of "void caffe::caffe_gpu_interp2_backward<Dtype,packed>(int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(261): here

src/caffe/util/interp.cu(165): error: no instance of overloaded function "atomicAdd" matches the argument list
argument types are: (double *, double)
detected during:
instantiation of "void caffe::caffe_gpu_interp2_kernel_backward<Dtype,packed>(int, float, float, int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(185): here
instantiation of "void caffe::caffe_gpu_interp2_backward<Dtype,packed>(int, Dtype *, int, int, int, int, int, int, const Dtype *, int, int, int, int, int, int) [with Dtype=double, packed=false]"
(261): here

8 errors detected in the compilation of "/tmp/tmpxft_000077b2_00000000-13_interp.compute_50.cpp1.ii".
Makefile:588: recipe for target '.build_release/cuda/src/caffe/util/interp.o' failed
make: *** [.build_release/cuda/src/caffe/util/interp.o] Error 1

@SahilC
Copy link

SahilC commented May 27, 2017

@sajjo79 I am facing the same issue. Did you manage to fix this?

@whuhxb
Copy link

whuhxb commented Jul 22, 2017

@SahilC Have you solved the this problem?

This was referenced Oct 25, 2017
@kli017
Copy link

kli017 commented Dec 21, 2017

zhengdixin's solution is right just be care of the syntax

@sunying23
Copy link

I am facing the same issue when I adopted the solution of zhengdixin. How to pay attention to the syntax? @kli017

@sunying23
Copy link

sunying23 commented Jan 24, 2018 via email

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

8 participants