Page 1 of 1


PostPosted: Fri Nov 19, 2010 9:36 pm
by gusgw
Hi, new CULA user here. Using a Tesla C1060 with latest drivers, CUDA 3.2 and latest CULA on ubuntu, primarily writing in Fortran.

I've got a small test program running fine, but when I try to implement CULA into an existing code of mine, I get the error during compilation:

ifort -o FitIsoMag.x ISOMAGMOD.f90 fpsetup.f90 FitIsoMag.f90 -openmp -O3 -I/usr/local/cula/include -L/usr/local/cula/lib64 -lcula -lcula_fortran -lcublas -lcudart -mkl

FitIsoMag.f90(152): error #6404: This name does not have a type, and must have an explicit type. [CULA_INITIALIZE]
INITSTAT = cula_initialize()
compilation aborted for FitIsoMag.f90 (code 1)
make: *** [build64] Error 1

and with portland group compiler:

pgfortran -o FitIsoMag.x fpsetup.f90 ISOMAGMOD.f90 FitIsoMag.f90 -mp -O3 -I/usr/local/cula/include -L/usr/local/cula/lib64 -lcula -lcula_fortran -lcublas -lcudart -lcula_pgfortran -lgomp -Lopt/pgi/linux86-64/2010/lib/ -llapack -lblas

PGF90-S-0038-Symbol, cula_initialize, has not been explicitly declared (FitIsoMag.f90)
0 inform, 0 warnings, 1 severes, 0 fatal for funk
make: *** [build64] Error 2

I have the lines:

INITSTAT = cula_initialize()
call check_status(INITSTAT)

in the main program, before any calls to cula functions...

Any ideas why this is happening??

Re: cula_initialize

PostPosted: Fri Nov 19, 2010 10:20 pm
by gusgw

Fairly sure I sorted this out for myself. Stupid.

Re: cula_initialize

PostPosted: Mon Nov 22, 2010 10:00 am
by john
On PG Fortran, omit -lcula_fortan. -lcula_pgfortran is sufficient. See for details.