culaCgesv - undefined symbol: cublasCtrsm

Support for issues specific to the Linux operating systems.

culaCgesv - undefined symbol: cublasCtrsm

Postby jrelles » Tue Dec 01, 2009 1:46 pm

When running the gesv example, I get the following output.
-------------------
SGESV
-------------------
Allocating Matrices
Initializing CULA
Calling culaSgesv
Verifying Result
Shutting down CULA

-------------------
CGESV
-------------------
Allocating Matrices
Initializing CULA
Calling culaCgesv
./gesv: symbol lookup error: /usr/local/cula/lib64/libcula.so: undefined symbol: cublasCtrsm


I am running CUDA 2.3 with 190.18 drivers on ubuntu 9.04
and CULA 1.1 Basic (Final)
Everything else seems to work just fine.

Any ideas what might be causing this error?
jrelles
 
Posts: 2
Joined: Wed Sep 02, 2009 10:45 pm

Re: culaCgesv - undefined symbol: cublasCtrsm

Postby dan » Tue Dec 01, 2009 1:54 pm

Hi jrelles,

Can you run ldd on /usr/local/cula/lib64/libcula.so and report its output?

Dan
dan
Administrator
 
Posts: 61
Joined: Thu Jul 23, 2009 2:29 pm

Re:culaCgesv - undefined symbol: cublasCtrsm

Postby Boxed Cylon » Tue Dec 01, 2009 2:40 pm

I ran into a similar problem that went away when I upgraded to the CUDA 3.0 beta. I think the new CULA is expecting the 3.0 features to be available. My 2 cents...
Boxed Cylon
 
Posts: 48
Joined: Fri Oct 16, 2009 8:57 pm

Re:culaCgesv - undefined symbol: cublasCtrsm

Postby john » Tue Dec 01, 2009 2:47 pm

The real answer to that is a little more nuanced. CULA is built against CUDA 2.3 and only utilizes the 2.3 features. However, we have exclusive access to a special CUBLAS with the 3.0 functionality (ie ctrsm) that is built against CUDA 2.3 This is why you notice that our lib/bin directories contain CUBLAS files - we are shipping this special build from Nvidia.

The reason Dan is asking for LDD output is to make sure your executable isn't using the standard 2.3 CUBLAS. It's important that you use the CUBLAS we ship, since it is nonstandard.

The solution on Linux is simple - make sure /usr/local/cula/lib[64] appears in your LD_LIBRARY_PATH before /usr/local/cuda/lib[64].
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re:culaCgesv - undefined symbol: cublasCtrsm

Postby jrelles » Tue Dec 01, 2009 4:26 pm

I ran the ldd /usr/local/cula/lib64/libcula.so and confirmed what was suspected. I edited my /etc/ld.so.conf file so that the CULA library dir was before my CUDA library dir. Then I did a quick 'sudo ldconfig' and problem solved.

Thank you for the quick response,
Jacob
jrelles
 
Posts: 2
Joined: Wed Sep 02, 2009 10:45 pm

Re:culaCgesv - undefined symbol: cublasCtrsm

Postby john » Tue Dec 01, 2009 4:30 pm

Okay, great! This is probably the most common pitfall we've encountered. The good news is that CUDA 3.0 will have the modified CUBLAS version included and at that time we will no longer need to distribute the special 2.3 CUBLAS build. We can't move to 3.0 until the final version is released, but at least we know this problem will vanish in a few months' time. Thanks for your patience.

John
john
Administrator
 
Posts: 587
Joined: Thu Jul 23, 2009 2:31 pm

Re:culaCgesv - undefined symbol: cublasCtrsm

Postby bojan » Tue Jan 19, 2010 3:15 am

Hello!

I have a similar problem with mex function under Matlab. The mex function compiles OK, but returns the following error when I try to run it:

??? Invalid MEX-file '/home/matuser/cula_ex/gchols.mexglx':
/home/matuser/cula_ex/gchols.mexglx: undefined symbol: culaSpotrf.

The mex function is a small example where I first call culaInitialize(), then culaSpotrf() and finally culaShutdown().

The interesting thing is that when I comment out the culaSpotrf() the mex function returns no error.

I am using MatlabR2009b, CUDA 2.3, CUDA driver 2.3 (190.18) and CULA 1.1b. I have also checked that Matlab environment contains all the right library paths as was suggested above.

The ldd command returns:

ldd gchols.mexglx | head
linux-gate.so.1 => (0xffffe000)
libcula.so => /usr/local/cula/lib/libcula.so (0xb6b35000)
libcublas.so.2 => /usr/local/cula/lib/libcublas.so.2 (0xb57bb000)
libcudart.so.2 => /usr/local/cula/lib/libcudart.so.2 (0xb5775000)
libmx.so => /opt/MatlabR2009b/bin/glnx86/libmx.so (0xb56df000)
libmex.so => /opt/MatlabR2009b/bin/glnx86/libmex.so (0xb56d1000)
libmat.so => /opt/MatlabR2009b/bin/glnx86/libmat.so (0xb56a9000)
...

Thanks

Bojan
bojan
CULA Academic
 
Posts: 2
Joined: Mon Jan 11, 2010 2:16 pm

Re:culaCgesv - undefined symbol: cublasCtrsm

Postby kyle » Tue Jan 19, 2010 6:44 am

Hi Bojan,

Are you sure you are linking against the "CULA Premium" shared object file and not an older "CULA Basic"? This would be my first guess since you can call initialize and shutdown just fine.

Other common problems in linking have been seen with 32/64-bit mismatches, so be sure to double check that as well.

-Kyle
kyle
Administrator
 
Posts: 301
Joined: Fri Jun 12, 2009 7:47 pm

Re:culaCgesv - undefined symbol: cublasCtrsm

Postby bojan » Tue Jan 19, 2010 6:45 am

I just found the solution.

The problem was caused by the Jacket package, which is also installed on our system. Jacket comes with its own Basic version of CULA, which does not include culaSpotrf function. That is why the mex function returned with undefined symbol for culaSpotrf, while the culaInitialize and cudaShutdown worked.


Bojan
bojan
CULA Academic
 
Posts: 2
Joined: Mon Jan 11, 2010 2:16 pm

Re:culaCgesv - undefined symbol: cublasCtrsm

Postby kyle » Tue Jan 19, 2010 7:14 am

Great, glad to hear you fixed the problem!
kyle
Administrator
 
Posts: 301
Joined: Fri Jun 12, 2009 7:47 pm


Return to Linux Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron