icl-utk-edu / lapackpp

LAPACK++ is a C++ wrapper around CPU and GPU LAPACK and LAPACK-like linear algebra libraries, developed as part of the SLATE project.
https://icl.utk.edu/slate/
BSD 3-Clause "New" or "Revised" License
50 stars 14 forks source link

CUDA Compile on Lassen (LLNL) #45

Closed ax3l closed 1 year ago

ax3l commented 1 year ago

I am compiling lapackpp on Lassen (LLNL) - essentially the same as Summit (OLCF) - on its new RHEL8 modules for CUDA.

CMake config:

CXXFLAGS="-DLAPACK_FORTRAN_ADD_" cmake -S ${HOME}/src/lapackpp -B ${build_dir}/lapackpp-lassen-build -Duse_cmake_find_lapack=ON -DCMAKE_CXX_STANDARD=17 -Dbuild_tests=OFF -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON -DCMAKE_INSTALL_PREFIX=${SW_DIR}/lapackpp-master -DLAPACK_LIBRARIES=/usr/lib64/liblapack.so

This fails with:

[ 99%] Building CXX object CMakeFiles/lapackpp.dir/src/stub/stub_geqrf.cc.o
gmake[2]: *** No rule to make target '/usr/lib64/libessl.so', needed by 'liblapackpp.so'.  Stop.
gmake[2]: *** Waiting for unfinished jobs....
[ 99%] Building CXX object CMakeFiles/lapackpp.dir/src/stub/stub_getrf.cc.o
In file included from /g/g90/huebl1/src/lapackpp/src/cuda/cuda_common.cc:10:
/g/g90/huebl1/src/lapackpp/include/lapack/device.hh:52:9: error: no matching constructor for initialization of 'blas::Queue'
      : blas::Queue( device )
        ^            ~~~~~~
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:141:5: note: candidate constructor not viable: no known conversion from 'int' to 'const blas::Queue' for 1st argument
    Queue( Queue const& ) = delete;
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:138:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    Queue();
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:139:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Queue( int device, int64_t batch_size );
    ^
[ 99%] Building CXX object CMakeFiles/lapackpp.dir/src/stub/stub_potrf.cc.o
1 error generated.
gmake[2]: *** [CMakeFiles/lapackpp.dir/build.make:5452: CMakeFiles/lapackpp.dir/src/cuda/cuda_common.cc.o] Error 1
In file included from /g/g90/huebl1/src/lapackpp/src/cuda/cuda_geqrf.cc:10:
/g/g90/huebl1/src/lapackpp/include/lapack/device.hh:52:9: error: no matching constructor for initialization of 'blas::Queue'
      : blas::Queue( device )
        ^            ~~~~~~
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:141:5: note: candidate constructor not viable: no known conversion from 'int' to 'const blas::Queue' for 1st argument
    Queue( Queue const& ) = delete;
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:138:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    Queue();
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:139:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Queue( int device, int64_t batch_size );
    ^
In file included from /g/g90/huebl1/src/lapackpp/src/cuda/cuda_getrf.cc:10:
/g/g90/huebl1/src/lapackpp/include/lapack/device.hh:52:9: error: no matching constructor for initialization of 'blas::Queue'
      : blas::Queue( device )
        ^            ~~~~~~
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:141:5: note: candidate constructor not viable: no known conversion from 'int' to 'const blas::Queue' for 1st argument
    Queue( Queue const& ) = delete;
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:138:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    Queue();
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:139:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Queue( int device, int64_t batch_size );
    ^
1 error generated.
gmake[2]: *** [CMakeFiles/lapackpp.dir/build.make:5466: CMakeFiles/lapackpp.dir/src/cuda/cuda_geqrf.cc.o] Error 1
1 error generated.
gmake[2]: *** [CMakeFiles/lapackpp.dir/build.make:5480: CMakeFiles/lapackpp.dir/src/cuda/cuda_getrf.cc.o] Error 1
In file included from /g/g90/huebl1/src/lapackpp/src/cuda/cuda_potrf.cc:10:
/g/g90/huebl1/src/lapackpp/include/lapack/device.hh:52:9: error: no matching constructor for initialization of 'blas::Queue'
      : blas::Queue( device )
        ^            ~~~~~~
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:141:5: note: candidate constructor not viable: no known conversion from 'int' to 'const blas::Queue' for 1st argument
    Queue( Queue const& ) = delete;
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:138:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    Queue();
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:139:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Queue( int device, int64_t batch_size );
    ^
/g/g90/huebl1/src/lapackpp/src/cuda/cuda_potrf.cc:163:11: error: no template named 'work_ensure_size' in 'lapack::Queue'; did you mean 'work_resize'?
    queue.work_ensure_size< char >( dev_work_size );  // syncs if needed
          ^~~~~~~~~~~~~~~~
          work_resize
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:975:13: note: 'work_resize' declared here
void Queue::work_resize( size_t lwork )
            ^
/g/g90/huebl1/src/lapackpp/src/cuda/cuda_potrf.cc:163:11: error: no template named 'work_ensure_size' in 'lapack::Queue'; did you mean 'work_resize'?
    queue.work_ensure_size< char >( dev_work_size );  // syncs if needed
          ^~~~~~~~~~~~~~~~
          work_resize
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:975:13: note: 'work_resize' declared here
void Queue::work_resize( size_t lwork )
            ^
/g/g90/huebl1/src/lapackpp/src/cuda/cuda_potrf.cc:163:34: error: expected '(' for function-style cast or type construction
    queue.work_ensure_size< char >( dev_work_size );  // syncs if needed
                            ~~~~ ^
/g/g90/huebl1/src/lapackpp/src/cuda/cuda_potrf.cc:163:11: error: no member named 'work_ensure_size' in 'lapack::Queue'
    queue.work_ensure_size< char >( dev_work_size );  // syncs if needed
    ~~~~~ ^
5 errors generated.
gmake[2]: *** [CMakeFiles/lapackpp.dir/build.make:5494: CMakeFiles/lapackpp.dir/src/cuda/cuda_potrf.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/lapackpp.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
[huebl1@lassen68:blaspp]$ cmake --build ${build_dir}/lapackpp-lassen-build 
Consolidate compiler generated dependencies of target lapackpp
[  0%] Building CXX object CMakeFiles/lapackpp.dir/src/cuda/cuda_common.cc.o
In file included from /g/g90/huebl1/src/lapackpp/src/cuda/cuda_common.cc:10:
/g/g90/huebl1/src/lapackpp/include/lapack/device.hh:52:9: error: no matching constructor for initialization of 'blas::Queue'
      : blas::Queue( device )
        ^            ~~~~~~
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:141:5: note: candidate constructor not viable: no known conversion from 'int' to 'const blas::Queue' for 1st argument
    Queue( Queue const& ) = delete;
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:138:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    Queue();
    ^
/g/g90/huebl1/sw/lassen/blaspp-master/include/blas/device.hh:139:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    Queue( int device, int64_t batch_size );
    ^
1 error generated.
gmake[2]: *** [CMakeFiles/lapackpp.dir/build.make:5452: CMakeFiles/lapackpp.dir/src/cuda/cuda_common.cc.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:84: CMakeFiles/lapackpp.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

for the latest master branch as of 62680a16a9aba2a426e3d089dd13e18bfd140c74 aka Version 2023.08.25

cc @mgates3

ax3l commented 1 year ago

blaspp version is Version 2023.08.25 aka f8f983d5b45a8f366aae41fbe9888b14cbae20f8

ax3l commented 1 year ago

Oh, my mistake - a path issue indeed used an old version of blas++