Gentoo ebuild via CMAKE failing on testing phase

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)

Gentoo ebuild via CMAKE failing on testing phase

Postby archenroot » Wed Jan 11, 2017 11:07 am

Hi guys,

I work on Gentoo ebuild for latest 2.2.0 version. To be honest, this itself is not 1 hour ebuild creation :-).

The latest available version in STABLE tree is 1.4.0, here is link to 1.4.1 marked as unstable https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-libs/magma/magma-1.4.1.ebuild

When I saw the CMakeLists.txt I wanted to rebuild the ebuild file in CMAKE way and simplify lots of things, however in the moment I am facing:
Code: Select all
g++  -DHAVE_CUBLAS -DMIN_CUDA_ARCH=200 -I"/opt/cuda/include" -DADD_ -DCUBLAS_GFORTRAN -I./include -I./testing -c -o testing/testing_zpotrf_gpu.o testing/testing_zpotrf_gpu.cpp
testing/testing_parse_opts.cpp: In function ‘int main(int, char**)’:
testing/testing_parse_opts.cpp:48:15: error: ‘iter’ does not name a type
     for( auto iter = opts.svd_work.begin(); iter < opts.svd_work.end(); ++iter ) {
               ^
testing/testing_parse_opts.cpp:48:45: error: expected ‘;’ before ‘iter’
     for( auto iter = opts.svd_work.begin(); iter < opts.svd_work.end(); ++iter ) {
                                             ^
testing/testing_parse_opts.cpp:48:45: error: ‘iter’ was not declared in this scope
testing/testing_parse_opts.cpp:51:15: error: ‘iter’ does not name a type
     for( auto iter = opts.jobu.begin(); iter < opts.jobu.end(); ++iter ) {
               ^
testing/testing_parse_opts.cpp:51:41: error: expected ‘;’ before ‘iter’
     for( auto iter = opts.jobu.begin(); iter < opts.jobu.end(); ++iter ) {
                                         ^
testing/testing_parse_opts.cpp:51:41: error: ‘iter’ was not declared in this scope
testing/testing_parse_opts.cpp:54:15: error: ‘iter’ does not name a type
     for( auto iter = opts.jobv.begin(); iter < opts.jobv.end(); ++iter ) {
               ^
testing/testing_parse_opts.cpp:54:41: error: expected ‘;’ before ‘iter’
     for( auto iter = opts.jobv.begin(); iter < opts.jobv.end(); ++iter ) {
                                         ^
testing/testing_parse_opts.cpp:54:41: error: ‘iter’ was not declared in this scope
Makefile:566: recipe for target 'testing/testing_parse_opts.o' failed
make: *** [testing/testing_parse_opts.o] Error 1
make: *** Waiting for unfinished jobs....
 * ERROR: sci-libs/magma-2.2.0::archenroot failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sci-libs/magma-2.2.0::archenroot'`,
 * the complete build log and the output of `emerge -pqv '=sci-libs/magma-2.2.0::archenroot'`.
 * The complete build log is located at '/tmp/portage/sci-libs/magma-2.2.0/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/sci-libs/magma-2.2.0/temp/environment'.
 * Working directory: '/tmp/portage/sci-libs/magma-2.2.0/work/magma-2.2.0'
 * S: '/tmp/portage/sci-libs/magma-2.2.0/work/magma-2.2.0'


Any idea about how ti skip testing, or fix the error? I tried to compile on all GCC I have available:
[1] x86_64-pc-linux-gnu-4.8.5
[2] x86_64-pc-linux-gnu-4.9.4 *
[3] x86_64-pc-linux-gnu-5.4.0
[4] x86_64-pc-linux-gnu-6.2.0

The whole aim is to build CUDA binding for Torch, where CUTORCH projects uses MAGMA as dependency. The aim is to get full GPU support.

Thanks a lot for any hints.

Ladislav
archenroot
 
Posts: 3
Joined: Wed Jan 11, 2017 9:50 am

Re: Gentoo ebuild via CMAKE failing on testing phase

Postby mgates3 » Thu Jan 12, 2017 3:51 pm

It needs the -std=c++11 flag to allow "auto" keyword. The CMakeLists.txt checks for that, so I don't know why it wouldn't be set.

Code: Select all
make magma
make magma_sparse

should compile the two libraries.

It appears that
Code: Select all
make install

compiles the testers, though it only installs the libraries and headers. I'm not familiar enough with CMake to know why that is or how to change that behavior.
mgates3
 
Posts: 750
Joined: Fri Jan 06, 2012 2:13 pm

Re: Gentoo ebuild via CMAKE failing on testing phase

Postby archenroot » Fri Jan 13, 2017 4:53 am

I was finally able to resolve this issue, by updating also the ATLAS ebuild:
https://github.com/archenroot/gentoo-overlay/blob/master/sci-libs/atlas/atlas-3.10.3.ebuild

Once done I also had to switch from my derfault GCC 6.2 to 5.*, as current magma source code is not compileable with GCC 6.

And now the issue dissapeared, the ebuild for Gentoo is available here:
https://github.com/archenroot/gentoo-overlay/blob/master/sci-libs/magma/magma-2.2.0.ebuild

I will be later this year merging this into Gentoo Science overlay once I stabilizie full Torch and TensorFlow package stack (it is dozen of ebuilds to be done) for neural network processing.

Thanks a lot for quick answer!

Ladislav
archenroot
 
Posts: 3
Joined: Wed Jan 11, 2017 9:50 am


Return to User discussion

Who is online

Users browsing this forum: No registered users and 4 guests