BallisticLA / RandBLAS

A header-only C++ library for sketching in randomized linear algebra
https://randblas.readthedocs.io/en/stable/
Other
75 stars 6 forks source link

compiler error/missing header #8

Closed burlen closed 2 years ago

burlen commented 2 years ago

Looks like a missing header, google suggests this is defined in an NVIDIA library

smic:/work/rblas/RandBLAS/build$make -j install
[ 14%] Building CXX object src/CMakeFiles/RandBLAS.dir/sjlts.cc.o
[ 28%] Building CXX object src/CMakeFiles/RandBLAS.dir/util.cc.o
[ 42%] Building CXX object src/CMakeFiles/RandBLAS.dir/dense_op.cc.o
In file included from /work/rblas/RandBLAS/include/RandBLAS/dense_op.hh:19,
                 from /work/rblas/RandBLAS/src/dense_op.cc:1:
/work/rblas/random123-install/include/Random123/boxmuller.hpp: In function ‘r123::float2 r123::boxmuller(uint32_t, uint32_t)’:
/work/rblas/random123-install/include/Random123/boxmuller.hpp:116:5: error: ‘sincospif’ was not declared in this scope; did you mean ‘sincosf’?
  116 |     sincospif(uneg11<float>(u0), &f.x, &f.y);
      |     ^~~~~~~~~
      |     sincosf
/work/rblas/random123-install/include/Random123/boxmuller.hpp: In function ‘r123::double2 r123::boxmuller(uint64_t, uint64_t)’:
/work/rblas/random123-install/include/Random123/boxmuller.hpp:131:5: error: ‘sincospi’ was not declared in this scope; did you mean ‘sincosl’?
  131 |     sincospi(uneg11<double>(u0), &f.x, &f.y);
      |     ^~~~~~~~
      |     sincosl
make[2]: *** [src/CMakeFiles/RandBLAS.dir/build.make:104: src/CMakeFiles/RandBLAS.dir/dense_op.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:116: src/CMakeFiles/RandBLAS.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
rileyjmurray commented 2 years ago

I think this is an issue in Random123. @PTNobel and I have run into it separately. Here's my note-to-self:

Riley note! I tried installing RandBLAS on my workstation. My workstation has CUDA and somehow Random123 was trying to use it (or not use it?) in some way that was leading to messages like “error: ‘sincospif’ was not declared in this scope”. The solution was to look at a compiler directive within boxmuller.hpp and find that some functions probably weren’t be defined. I commented-out the compiler directive so the functions would be defined. Then, TA-DA! It works.

Sorry for not sharing this on a common channel.

PTNobel commented 2 years ago

We could file an issue against random123 and see if they can fix it; and if they don't it might make sense to fork it?