The programs in the testing directory seem to work, the usual -I... , ldconfig -v, -L... ... done (Of course be more specific... but I feel I am missing something really elementary).
However I try, I am still getting:
program.f:(.text+0x4243): undefined reference to `magmaf_zheevd_'
Thanks in advance,
gfortran -o program program.f -lmagma ...
You can also check the contents of your MAGMA library using nm to see if the function is there:
Code: Select all
romulus ~/magma-trunk> nm lib/libmagma.a | grep magmaf_zheevd 00000000000021a0 T magmaf_zheevd_ 00000000000004a0 T magmaf_zheevd_gpu_ 0000000000001410 T magmaf_zheevd_m_ 00000000000020a0 T magmaf_zheevdx_ 0000000000001fa0 T magmaf_zheevdx_2stage_ 0000000000001060 T magmaf_zheevdx_2stage_m_ 0000000000000370 T magmaf_zheevdx_gpu_ 00000000000012a0 T magmaf_zheevdx_m_
It is really not there!You can also check the contents of your MAGMA library using nm to see if the function is there:
nm ./libclmagma.a does not show it, although all the files in the "control" directory were apparently compiled, archived
into and indexed in libclmagma.a
Here it is:Your make.inc file would be helpful.
Code: Select all
# -- MAGMA (version 1.1.0-beta2) -- GPU_TARGET = AMD CC = g++ FORT = gfortran ARCH = ar ARCHFLAGS = cr RANLIB = ranlib OPTS = -fPIC -O3 -DADD_ -Wall FOPTS = -fPIC -O3 -DADD_ -Wall -x f95-cpp-input F77OPTS = -fPIC -O3 -DADD_ -Wall LDOPTS = -fPIC ACMLDIR = /opt/acml5.3.1 clBLAS = /opt/clAmdBlas-1.10.321 #ADDED BY JAN KUCERA AMDLIBMDIR = /opt/amdlibm3.1 # I have my own libcblas_acml added in the # $(ACMLDIR)/gfortran64/lib and $(ACMLDIR)/fortran64_mp/lib LIB = -lacml_mp -lamdlibm -lcblas_acml LIB += -lclAmdBlas -lOpenCL LIBDIR = -L$(ACMLDIR)/gfortran64/lib \ -L$(ACMLDIR)/gfortran64_mp/lib \ -L$(AMDLIBMDIR)/lib \ -L$(clBLAS)/lib64 INC = -I$(clBLAS)/include
debian "experimental" packages. All my libraries (including the CBLAS ... named cblas_acml and put in the
same directory as the corresponding acml library... do you want my Makefile for CBLAS as well?)
are also shared. All are made available through ldconfig with a corresponding file in ld.so.conf.d directory.
I do set the variable GPU_FORCE_64BIT_PTR=1 to make at least 2GB of the 6GB of my 7970 HD
available for computing.
Thanks again... Jan
Thanks for all your help. I knew I missed something elementary...mgates3 wrote:I updated the Fortran wrappers, but ran into a problem. There's a cl_command_queue that gets passed into every function...
So at the moment it probably means to rewrite the old code in C (with the OpenCL API)...? I may try if all else fails... but there is so much useful code written in fortran that it would make sense to put some effort into this...
I realized there is a FortranCL project (at the moment only in alpha stage) which should enable running Fortran (f90) code
on a GPU. I looked at the sources and it seems the cl_command_queue is already implemented.
So I shall start by rewriting the old f77 code into f90 and trying where I can get with clmagma compiled using FortranCL