Ask Your Question

piranha's profile - activity

2020-03-27 07:06:31 -0500 received badge  Notable Question (source)
2016-02-03 13:31:29 -0500 received badge  Popular Question (source)
2013-04-01 16:42:30 -0500 asked a question opencv 2.4.4 compile failed on Mountain Lion and CUDA 5.0

I would appreciate any help regarding this compilation error of opencv 2.4.4. on my late 2009 Mac Book Pro running Mountain Lion 10.8.3., Cuda 5.0.36 and Cudadriver 5.0.45

Thank you

$ cmake -G "Unix Makefiles" -D CMAKE_CXX_COMPILER=/usr/bin/g++ -D CMAKE_C_COMPILER=/usr/bin/gcc -D WITH_CUDA=ON MAKE_INSTALL_PREFIX=/usr/local/Cellar/opencv/2.4.4 ../ -- The CXX compiler identification is GNU 4.2.1 -- The C compiler identification is GNU 4.2.1 -- Checking whether CXX compiler has -isysroot -- Checking whether CXX compiler has -isysroot - yes -- Checking whether CXX compiler supports OSX deployment target flag -- Checking whether CXX compiler supports OSX deployment target flag - yes -- Check for working CXX compiler: /usr/bin/g++ -- Check for working CXX compiler: /usr/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detected version of GNU GCC: 42 (402) -- Performing Test HAVE_CXX_W -- Performing Test HAVE_CXX_W - Success -- Performing Test HAVE_C_W -- Performing Test HAVE_C_W - Success -- Performing Test HAVE_CXX_WALL -- Performing Test HAVE_CXX_WALL - Success -- Performing Test HAVE_C_WALL -- Performing Test HAVE_C_WALL - Success -- Performing Test HAVE_CXX_WERROR_RETURN_TYPE -- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Success -- Performing Test HAVE_C_WERROR_RETURN_TYPE -- Performing Test HAVE_C_WERROR_RETURN_TYPE - Success -- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR -- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Success -- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR -- Performing Test HAVE_C_WERROR_NON_VIRTUAL_DTOR - Success -- Performing Test HAVE_CXX_WERROR_ADDRESS -- Performing Test HAVE_CXX_WERROR_ADDRESS - Success -- Performing Test HAVE_C_WERROR_ADDRESS -- Performing Test HAVE_C_WERROR_ADDRESS - Success -- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT -- Performing Test HAVE_CXX_WERROR_SEQUENCE_POINT - Success -- Performing Test HAVE_C_WERROR_SEQUENCE_POINT -- Performing Test HAVE_C_WERROR_SEQUENCE_POINT - Success -- Performing Test HAVE_CXX_WFORMAT -- Performing Test HAVE_CXX_WFORMAT - Success -- Performing Test HAVE_C_WFORMAT -- Performing Test HAVE_C_WFORMAT - Success -- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY -- Performing Test HAVE_CXX_WERROR_FORMAT_SECURITY - Success -- Performing Test HAVE_C_WERROR_FORMAT_SECURITY -- Performing Test HAVE_C_WERROR_FORMAT_SECURITY - Success -- Performing Test HAVE_CXX_WMISSING_DECLARATIONS -- Performing Test HAVE_CXX_WMISSING_DECLARATIONS - Failed -- Performing Test HAVE_C_WMISSING_DECLARATIONS -- Performing Test HAVE_C_WMISSING_DECLARATIONS - Success -- Performing Test HAVE_CXX_WMISSING_PROTOTYPES -- Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Success -- Performing Test HAVE_C_WMISSING_PROTOTYPES -- Performing Test HAVE_C_WMISSING_PROTOTYPES - Success -- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES -- Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed -- Performing Test HAVE_C_WSTRICT_PROTOTYPES -- Performing Test HAVE_C_WSTRICT_PROTOTYPES - Success -- Performing Test HAVE_CXX_WUNDEF -- Performing Test HAVE_CXX_WUNDEF - Success -- Performing Test HAVE_C_WUNDEF -- Performing Test HAVE_C_WUNDEF - Success -- Performing Test HAVE_CXX_WINIT_SELF -- Performing Test HAVE_CXX_WINIT_SELF - Success -- Performing Test HAVE_C_WINIT_SELF -- Performing Test HAVE_C_WINIT_SELF - Success -- Performing Test HAVE_CXX_WPOINTER_ARITH -- Performing Test HAVE_CXX_WPOINTER_ARITH - Success -- Performing Test HAVE_C_WPOINTER_ARITH -- Performing Test HAVE_C_WPOINTER_ARITH - Success -- Performing Test HAVE_CXX_WSHADOW -- Performing Test HAVE_CXX_WSHADOW - Success -- Performing Test HAVE_C_WSHADOW -- Performing Test HAVE_C_WSHADOW - Success -- Performing Test HAVE_CXX_WSIGN_PROMO -- Performing Test HAVE_CXX_WSIGN_PROMO - Success -- Performing Test HAVE_C_WSIGN_PROMO -- Performing Test HAVE_C_WSIGN_PROMO - Failed -- Performing Test HAVE_CXX_WNO_NARROWING -- Performing Test HAVE_CXX_WNO_NARROWING - Failed -- Performing Test HAVE_C_WNO_NARROWING -- Performing Test HAVE_C_WNO_NARROWING - Failed -- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR -- Performing Test HAVE_CXX_WNO_DELETE_NON_VIRTUAL_DTOR - Failed -- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR -- Performing Test HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR - Failed -- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS -- Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed -- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS -- Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed -- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION -- Performing Test HAVE_CXX_FDIAGNOSTICS_SHOW_OPTION - Success -- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION -- Performing Test HAVE_C_FDIAGNOSTICS_SHOW_OPTION - Success -- Performing Test HAVE_CXX_PTHREAD -- Performing Test HAVE_CXX_PTHREAD - Success -- Performing Test HAVE_C_PTHREAD -- Performing Test ... (more)

2013-04-01 16:34:46 -0500 answered a question Gpu API call error (out of memory) in mallocPitch

Cuda 5.0.36 and Cudadriver 5.0.45 are now working on my late 2009 Mac Book Pro after I installed Mountain Lion 10.8.3. All Cuda 1.1. Nvidia SDK demos are working.

2013-04-01 16:34:09 -0500 commented question Gpu API call error (out of memory) in mallocPitch

Cuda 5.0.36 and Cudadriver 5.0.45 are now working on my late 2009 Mac Book Pro after I installed Mountain Lion 10.8.3. All Cuda 1.1. Nvidia SDK demos are working.

2012-10-14 15:33:19 -0500 commented question Gpu API call error (out of memory) in mallocPitch

Kirill, Thanks for your reply. Sorry for my late answer, I could not work on this project for a while.

The loop exits on the first iteration when it tries to load the mat to the gpu.

2012-09-24 00:01:16 -0500 received badge  Student (source)
2012-09-23 07:22:44 -0500 received badge  Editor (source)
2012-09-23 06:49:57 -0500 asked a question Gpu API call error (out of memory) in mallocPitch

Hi, I compiled OpenCV 2.4.9 with cmake and WITH_CUDA=ON and I get the following error on my Late 2009 Mac Book Pro (GPU 9400M) with Snow Leopard. gpu-z does not find my cuda gpu... but OpenCV does! OpenCV finds the GPU 9400m but does not run my test code... but I found posts with people that made this work! What am I doing wrong? I have been trying to solve this problem for days now. Any help would be much appreciated!

#### error ###############
OpenCV Error: Gpu API call (out of memory) in mallocPitch, file /Users/michael/Documents/OpenCV-2.4.2/modules/core/src/gpumat.cpp, line 1276
terminate called after throwing an instance of 'cv::Exception'
  what():  /Users/michael/Documents/OpenCV-2.4.2/modules/core/src/gpumat.cpp:1276: error: (-217) out of memory in function mallocPitch

Abort trap
#### Code #########################
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <opencv2/core/core.hpp>
#include <opencv2/gpu/gpu.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/contrib/contrib.hpp>
#include <opencv2/imgproc/imgproc.hpp>

using namespace std;
using namespace cv;

int main(int, char**)
{
    gpu::printCudaDeviceInfo(cv::gpu::getDevice());
    Mat src2, dst;
    Mat src = imread("file.png", CV_LOAD_IMAGE_GRAYSCALE);  
    gpu::GpuMat edges;
    namedWindow("Window", WINDOW_AUTOSIZE);
    for(;;)
    {
    src.copyTo(src2);
    gpu::GpuMat frame_gpu(src2);
    gpu::GaussianBlur(frame_gpu, edges, Size(7,7), 1.5, 1.5);
    edges.download(dst);
        imshow("Window", dst);

        if(waitKey(30) >= 0) break;
    }
    return 0;
}

#### CUDA Device Query (Runtime API) #######################
Device count: 1
Device 0: "GeForce 9400M"
  CUDA Driver Version / Runtime Version          4.10 / 4.10
  CUDA Capability Major/Minor version number:    1.1
  Total amount of global memory:                 254 MBytes (265945088 bytes)
  ( 2) Multiprocessors x ( 8) CUDA Cores/MP:     16 CUDA Cores
  GPU Clock Speed:                               1.10 GHz
  Memory Clock rate:                             1062.50 Mhz
  Memory Bus Width:                              128-bit
  Max Texture Dimension Size (x,y,z)             1D=(8192), 2D=(65536,32768), 3D=(2048,2048,2048)
  Max Layered Texture Size (dim) x layers        1D=(8192) x 512, 2D=(8192,8192) x 512
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       16384 bytes
  Total number of registers available per block: 8192
  Warp size:                                     32
  Maximum number of threads per block:           512
  Maximum sizes of each dimension of a block:    512 x 512 x 64
  Maximum sizes of each dimension of a grid:     65535 x 65535 x 1
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             256 bytes
  Concurrent copy and execution:                 No with 0 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            Yes
  Support host page-locked memory mapping:       Yes
  Concurrent kernel execution:                   No
  Alignment requirement for Surfaces:            Yes
  Device has ECC support enabled:                No
  Device is using TCC driver mode:               No
  Device supports Unified Addressing (UVA):      No
  Device PCI Bus ID / PCI location ID:           2 / 0
  Compute Mode:
      Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) 
#### copencv config ###########

-- General configuration for OpenCV 2.4.9 =====================================
--   Version control:               commit:b7b32e7
-- 
--   Platform:
--     Host:                        Darwin 10.8.0 ...
(more)