xiaozhenBoy / cudamat

Automatically exported from code.google.com/p/cudamat
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

no suitable image found. Did find: libcudamat.so: mach-o, but wrong architecture #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. simply follow the INTSTALL.txt

What is the expected output? What do you see instead?
make is successful, but test returns an error saying (OSError: 
dlopen(libcudamat.so, 6): no suitable image found.  Did find:
    libcudamat.so: mach-o, but wrong architecture)
What I figure is that the Makefile produces a 32-bit executable file, however 
my platform is running 64-bit. Thus I'm unable to use it properly.

What version of the product are you using? On what operating system?
MacOS10.7 mountain lion

Please provide any additional information below.

Original issue reported on code.google.com by phoenix....@gmail.com on 30 Jan 2013 at 11:47

GoogleCodeExporter commented 9 years ago
got same error on 10.8

Seems like it's building libcudamat.so for the i386 architecture

lipo -info libcudamat.so 
Non-fat file: libcudamat.so is architecture: i386 

Unfortunately I'm not a whiz at compiling so I'm not sure how to modify the 
Makefile to change it to 64bit

Original comment by philg...@gmail.com on 16 Mar 2013 at 10:35

GoogleCodeExporter commented 9 years ago
I modified the Makefile and added '-m 64'. This seems to have fixed the problem.

cudamat:
        nvcc -O --ptxas-options=-v -m 64 --compiler-options '-fPIC' -o libcudamat.so --shared cudamat.cu cudamat_kernels.cu -lcublas

Original comment by philg...@gmail.com on 16 Mar 2013 at 10:57

GoogleCodeExporter commented 9 years ago
Thanks, I also tried it but the thing is, although compilation seems succeeded, 
running test_cudamat.py file results in a Segmentation fault: 11 error.

Original comment by phoenix....@gmail.com on 16 Mar 2013 at 11:16

GoogleCodeExporter commented 9 years ago
I should note that I installed python from 2.7.3 from here: 
http://www.python.org/download/
based on the recommendation of scipy that the default Apple install not be 
used. Not sure if that makes a difference.

I'm running Mac 10.8.2 on a i7 Macbook Pro with a GT 650M graphics chip.
I also have a recent version of nvcc installed.

nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2012 NVIDIA Corporation
Built on Fri_Sep_28_16:10:16_PDT_2012
Cuda compilation tools, release 5.0, V0.2.1221

I also used the following script to get numpy and scipy installed (again, not 
sure if it makes a difference.)
http://fonnesbeck.github.com/ScipySuperpack/

When after running 'make' in the cudamat directory, I then get the following 
results:

python test_cudamat.py
/Library/Python/2.7/site-packages/nose-1.2.1-py2.7.egg/nose/plugins/manager.py:3
95: RuntimeWarning: Unable to load plugin KnownFailure = 
matplotlib.testing.noseclasses:KnownFailure: pyparsing>=1.5.6,<2.0.0
  RuntimeWarning)
...........................................
----------------------------------------------------------------------
Ran 43 tests in 0.368s

OK

Original comment by philg...@gmail.com on 16 Mar 2013 at 11:53

GoogleCodeExporter commented 9 years ago
ok I still don't know what is going wrong but I re downloaded the library and 
it works. 

Original comment by phoenix....@gmail.com on 17 Mar 2013 at 12:13