Page 1 of 1

MAGMA 2.4 Compilation Errors...

Posted: Thu Aug 23, 2018 1:55 am
by jiapei100
1. How can I select my specific GPU architecture?
There is an option:

However, when I tried to build MAGMA2.4, arch sm_50 is chosen by default, but I'm sure my GPU is of sm_52 .

Code: Select all

-gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50

2. testing faile
There seems to NOWHERE for me to untick TEST.
MAGMA2.4 stops building with the following ERROR messages:

Code: Select all

[ 62%] Linking CXX executable sparse/testing/testing_csptrsv
/usr/bin/cmake -E cmake_link_script CMakeFiles/testing_csptrsv.dir/link.txt --verbose=1
/usr/bin/c++   -std=c++11 -fopenmp -Wall -Wno-unused-function -O3 -DNDEBUG  -rdynamic CMakeFiles/testing_csptrsv.dir/sparse/testing/testing_csptrsv.cpp.o  -o sparse/testing/testing_csptrsv -Wl,-rpath,/usr/lib/x86_64-linux-gnu/lapack:/usr/local/cuda/lib64 lib/libtester.a lib/liblapacktest.a lib/libmagma.a lib/libmagma_sparse.a lib/libmagma.a /usr/local/cuda/lib64/libcudart_static.a -lpthread -ldl -lrt /usr/lib/x86_64-linux-gnu/lapack/ /usr/local/cuda/lib64/ /usr/local/cuda/lib64/ /usr/local/cuda/lib64/libcublas_device.a /usr/local/cuda/lib64/ -lgfortran -lquadmath 
/usr/bin/x86_64-linux-gnu-ld: lib/libmagma.a(slaex0.cpp.o): undefined reference to symbol 'scopy_'
/usr/lib/x86_64-linux-gnu/ error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/testing_csptrsv.dir/build.make:109: recipe for target 'sparse/testing/testing_csptrsv' failed
make[2]: *** [sparse/testing/testing_csptrsv] Error 1
make[2]: Leaving directory '....../magma-2.4.0/build'
CMakeFiles/Makefile2:193: recipe for target 'CMakeFiles/testing_csptrsv.dir/all' failed
make[1]: *** [CMakeFiles/testing_csptrsv.dir/all] Error 2
make[1]: Leaving directory '....../magma-2.4.0/build'
Makefile:132: recipe for target 'all' failed
make: *** [all] Error 2

Can anybody give me a hand please?


Re: MAGMA 2.4 Compilation Errors...

Posted: Thu Aug 23, 2018 11:35 am
by mgates3
You can set GPU_TARGET=sm_52, but using Maxwell (sm_50) should be fine — there's not much difference between 5.0 and 5.2, and code compiled for 5.0 (or lower) will run on 5.2.

In your link line, I don't see a BLAS library, only the LAPACK and cuBLAS libraries. scopy_ is a BLAS function, so you will need a BLAS library, such OpenBLAS or Intel MKL (there's a free community version). I do not recommend the Netlib reference BLAS, which is a reference, not a high-performance implementation.

That said, you can avoid building test by compiling just the libraries, as mentioned in the README:

make lib
make sparse-lib


Re: MAGMA 2.4 Compilation Errors...

Posted: Thu Aug 23, 2018 12:24 pm
by mgates3
Oh, I didn't realize you're using CMake. In that case, you can run 'make magma' and 'make magma_sparse' to build just the libraries. CMake has a 'make help' to see available targets. Unfortunately in our case it generates an enormous amount of output (6555 lines!), but here is a subset of important targets:

Code: Select all

magma/build> ccmake ..
magma/build> make help > help.txt
magma/build> grep -v 'testing|\.[ois]' help.txt
The following are some of the valid targets for this Makefile:
... all (the default if no target is provided)
... clean
... depend
... list_install_components
... edit_cache
... install/local
... install/strip
... tester
... magma
... rebuild_cache
... lapacktest
... magma_sparse
... install
Hope that helps.