Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linear algebra opcode build fails with gmm > 5.1 #920

Closed
dvzrv opened this issue Jan 26, 2018 · 26 comments
Closed

linear algebra opcode build fails with gmm > 5.1 #920

dvzrv opened this issue Jan 26, 2018 · 26 comments
Labels
development Issues relating to git, building, project layout etc linux

Comments

@dvzrv
Copy link
Contributor

dvzrv commented Jan 26, 2018

The build fails with gmm 5.2 (I think it works with gmm 5.1):

[ 17%] Building C object Opcodes/hdf5/CMakeFiles/hdf5ops.dir/HDF5IO.c.o
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp: In member function ‘int la_i_lu_factor_mr_t::init(CSOUND*)’:
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:3898:45: error: no matching function for call to ‘lu_factor(gmm::dense_matrix<double>&, std::vector<long unsigned int>&)’
     *isize = gmm::lu_factor(lhs->mr, pivot__);
                                             ^
In file included from /usr/include/gmm/gmm_lapack_interface.h:42:0,
                 from /usr/include/gmm/gmm_kernel.h:52,
                 from /usr/include/gmm/gmm.h:40,
                 from /build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:371:
/usr/include/gmm/gmm_dense_lu.h:129:13: note: candidate: template<class DenseMatrix> gmm::size_type gmm::lu_factor(DenseMatrix&, gmm::lapack_ipvt&)
   size_type lu_factor(DenseMatrix& A, lapack_ipvt& ipvt) {
             ^~~~~~~~~
/usr/include/gmm/gmm_dense_lu.h:129:13: note:   template argument deduction/substitution failed:
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:3898:38: note:   cannot convert ‘((la_i_lu_factor_mr_t*)this)->la_i_lu_factor_mr_t::pivot__’ (type ‘std::vector<long unsigned int>’) to type ‘gmm::lapack_ipvt&’
     *isize = gmm::lu_factor(lhs->mr, pivot__);
                                      ^~~~~~~
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp: In member function ‘int la_k_lu_factor_mr_t::kontrol(CSOUND*)’:
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:3930:45: error: no matching function for call to ‘lu_factor(gmm::dense_matrix<double>&, std::vector<long unsigned int>&)’
     *ksize = gmm::lu_factor(lhs->mr, pivot__);
                                             ^
In file included from /usr/include/gmm/gmm_lapack_interface.h:42:0,
                 from /usr/include/gmm/gmm_kernel.h:52,
                 from /usr/include/gmm/gmm.h:40,
                 from /build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:371:
/usr/include/gmm/gmm_dense_lu.h:129:13: note: candidate: template<class DenseMatrix> gmm::size_type gmm::lu_factor(DenseMatrix&, gmm::lapack_ipvt&)
   size_type lu_factor(DenseMatrix& A, lapack_ipvt& ipvt) {
             ^~~~~~~~~
/usr/include/gmm/gmm_dense_lu.h:129:13: note:   template argument deduction/substitution failed:
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:3930:38: note:   cannot convert ‘((la_k_lu_factor_mr_t*)this)->la_k_lu_factor_mr_t::pivot__’ (type ‘std::vector<long unsigned int>’) to type ‘gmm::lapack_ipvt&’
     *ksize = gmm::lu_factor(lhs->mr, pivot__);
                                      ^~~~~~~
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp: In member function ‘int la_i_lu_factor_mc_t::init(CSOUND*)’:
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:3958:45: error: no matching function for call to ‘lu_factor(gmm::dense_matrix<std::complex<double> >&, std::vector<long unsigned int>&)’
     *isize = gmm::lu_factor(lhs->mc, pivot__);
                                             ^
In file included from /usr/include/gmm/gmm_lapack_interface.h:42:0,
                 from /usr/include/gmm/gmm_kernel.h:52,
                 from /usr/include/gmm/gmm.h:40,
                 from /build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:371:
/usr/include/gmm/gmm_dense_lu.h:129:13: note: candidate: template<class DenseMatrix> gmm::size_type gmm::lu_factor(DenseMatrix&, gmm::lapack_ipvt&)
   size_type lu_factor(DenseMatrix& A, lapack_ipvt& ipvt) {
             ^~~~~~~~~
/usr/include/gmm/gmm_dense_lu.h:129:13: note:   template argument deduction/substitution failed:
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:3958:38: note:   cannot convert ‘((la_i_lu_factor_mc_t*)this)->la_i_lu_factor_mc_t::pivot__’ (type ‘std::vector<long unsigned int>’) to type ‘gmm::lapack_ipvt&’
     *isize = gmm::lu_factor(lhs->mc, pivot__);
                                      ^~~~~~~
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp: In member function ‘int la_k_lu_factor_mc_t::kontrol(CSOUND*)’:
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:3990:45: error: no matching function for call to ‘lu_factor(gmm::dense_matrix<std::complex<double> >&, std::vector<long unsigned int>&)’
     *ksize = gmm::lu_factor(lhs->mc, pivot__);
                                             ^
In file included from /usr/include/gmm/gmm_lapack_interface.h:42:0,
                 from /usr/include/gmm/gmm_kernel.h:52,
                 from /usr/include/gmm/gmm.h:40,
                 from /build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:371:
/usr/include/gmm/gmm_dense_lu.h:129:13: note: candidate: template<class DenseMatrix> gmm::size_type gmm::lu_factor(DenseMatrix&, gmm::lapack_ipvt&)
   size_type lu_factor(DenseMatrix& A, lapack_ipvt& ipvt) {
             ^~~~~~~~~
/usr/include/gmm/gmm_dense_lu.h:129:13: note:   template argument deduction/substitution failed:
/build/csound/src/csound-6.10.0/Opcodes/linear_algebra.cpp:3990:38: note:   cannot convert ‘((la_k_lu_factor_mc_t*)this)->la_k_lu_factor_mc_t::pivot__’ (type ‘std::vector<long unsigned int>’) to type ‘gmm::lapack_ipvt&’
     *ksize = gmm::lu_factor(lhs->mc, pivot__);
                                      ^~~~~~~

@vlazzarini
Copy link
Member

yes, I noticed that on OSX too. I’ve turned the linear opcode build off, but I guess it needs attention.

@dvzrv
Copy link
Contributor Author

dvzrv commented Jan 26, 2018

I guess I'll do the same for Arch in the meantime then.
Still trying to wrap my head around the python opcode...

@vlazzarini
Copy link
Member

I think I had 5.3 (whatever is the latest from the gmm site). I just de-installed it.

@vlazzarini
Copy link
Member

Ok, turning this OFF by default until it gets fixed. Otherwise the build is broken by default in some platforms.

@gogins
Copy link
Contributor

gogins commented Jan 26, 2018 via email

@dvzrv
Copy link
Contributor Author

dvzrv commented Jan 26, 2018

@gogins can it then be somehow included in the repository?
Arch can not move backwards ;-)

@vlazzarini
Copy link
Member

Not changing this to default to ON, since it breaks builds.

@kunstmusik
Copy link
Member

Looks like the CMake configuration needs to detect gmm version and only enable the target if 5.1 is available. Seem appropriate to disable for the time being until the version detection is introduced, since having broken builds is no good for anyone.

@fsateler
Copy link
Contributor

wasn't this fixed with #839 ?

@kunstmusik
Copy link
Member

@fsateler I don't think it does. The one bug you mentioned in #839 has to do with ostream, but the error messages here has to do with other functions.

@gogins gogins removed their assignment Jul 2, 2018
@jpffitch
Copy link
Contributor

jpffitch commented Aug 6, 2018

Status of this issue looks unresolved and confused

@gogins
Copy link
Contributor

gogins commented Aug 6, 2018 via email

@jpffitch
Copy link
Contributor

jpffitch commented Aug 6, 2018 via email

@jpffitch
Copy link
Contributor

jpffitch commented Sep 3, 2018

was this fixed in

commit 34db044
Author: gogins michael.gogins@gmail.com
Date: Wed Aug 29 14:22:54 2018 -0400

Handle different versions of GMM++.

?

@dvzrv
Copy link
Contributor Author

dvzrv commented Oct 2, 2018

@gogins did you achieve to build with 5.3? can't try right now, as upstream seems borked.

@gogins
Copy link
Contributor

gogins commented Oct 2, 2018 via email

@dvzrv
Copy link
Contributor Author

dvzrv commented Nov 2, 2018

Yes, but CMake must define GMM_VERSION as gmm itself doesn't.

@gogins In what context? csounds cmake setup? If so, it doesn't and your pull request also doesn't add that functionality. How exactly is this supposed to work? :)

@dvzrv
Copy link
Contributor Author

dvzrv commented Jul 13, 2019

To follow up on the issue, I'm also unable to build with gmm 5.3 (below the whole build log):

make -f Opcodes/CMakeFiles/linear_algebra.dir/build.make Opcodes/CMakeFiles/linear_algebra.dir/build
make[2]: Entering directory '/build/csound/src/csound-6.13.0/build'
[ 69%] Building CXX object Opcodes/CMakeFiles/linear_algebra.dir/linear_algebra.cpp.o
cd /build/csound/src/csound-6.13.0/build/Opcodes && /usr/bin/c++  -DCS_DEFAULT_PLUGINDIR=\"/usr/lib/csound/plugins64-6.0\" -DHAVE_EXECINFO -DHAVE_SOCKETS -DHAVE_STRTOD_L -DHAVE_STRTOK_R -DLINUX -DNO_FLTK_THREADS -DPIPES -DUSE_LRINT -D_CSOUND_RELEASE_ -D_GNU_SOURCE -Dlinear_algebra_EXPORTS -I/build/csound/src/csound-6.13.0/./H -I/build/csound/src/csound-6.13.0/./include -I/build/csound/src/csound-6.13.0/./Engine -I/build/csound/src/csound-6.13.0/./util -I/build/csound/src/csound-6.13.0/. -I/build/csound/src/csound-6.13.0/build -I/build/csound/src/csound-6.13.0/build/include -I/usr/include/gmm  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -std=c++11 -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -DBETA -fvisibility=hidden -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -fPIC   -o CMakeFiles/linear_algebra.dir/linear_algebra.cpp.o -c /build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp: In member function ‘int la_i_lu_factor_mr_t::init(CSOUND*)’:
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:3504:45: error: no matching function for call to ‘lu_factor(gmm::dense_matrix<double>&, std::vector<long unsigned int>&)’
 3504 |     *isize = gmm::lu_factor(lhs->mr, pivot__);
      |                                             ^
In file included from /usr/include/gmm/gmm_lapack_interface.h:42,
                 from /usr/include/gmm/gmm_kernel.h:52,
                 from /usr/include/gmm/gmm.h:40,
                 from /build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:370:
/usr/include/gmm/gmm_dense_lu.h:129:13: note: candidate: ‘template<class DenseMatrix> gmm::size_type gmm::lu_factor(DenseMatrix&, gmm::lapack_ipvt&)’
  129 |   size_type lu_factor(DenseMatrix& A, lapack_ipvt& ipvt) {
      |             ^~~~~~~~~
/usr/include/gmm/gmm_dense_lu.h:129:13: note:   template argument deduction/substitution failed:
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:3504:38: note:   cannot convert ‘((la_i_lu_factor_mr_t*)this)->la_i_lu_factor_mr_t::pivot__’ (type ‘std::vector<long unsigned int>’) to type ‘gmm::lapack_ipvt&’
 3504 |     *isize = gmm::lu_factor(lhs->mr, pivot__);
      |                                      ^~~~~~~
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp: In member function ‘int la_k_lu_factor_mr_t::kontrol(CSOUND*)’:
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:3541:45: error: no matching function for call to ‘lu_factor(gmm::dense_matrix<double>&, std::vector<long unsigned int>&)’
 3541 |     *ksize = gmm::lu_factor(lhs->mr, pivot__);
      |                                             ^
In file included from /usr/include/gmm/gmm_lapack_interface.h:42,
                 from /usr/include/gmm/gmm_kernel.h:52,
                 from /usr/include/gmm/gmm.h:40,
                 from /build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:370:
/usr/include/gmm/gmm_dense_lu.h:129:13: note: candidate: ‘template<class DenseMatrix> gmm::size_type gmm::lu_factor(DenseMatrix&, gmm::lapack_ipvt&)’
  129 |   size_type lu_factor(DenseMatrix& A, lapack_ipvt& ipvt) {
      |             ^~~~~~~~~
/usr/include/gmm/gmm_dense_lu.h:129:13: note:   template argument deduction/substitution failed:
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:3541:38: note:   cannot convert ‘((la_k_lu_factor_mr_t*)this)->la_k_lu_factor_mr_t::pivot__’ (type ‘std::vector<long unsigned int>’) to type ‘gmm::lapack_ipvt&’
 3541 |     *ksize = gmm::lu_factor(lhs->mr, pivot__);
      |                                      ^~~~~~~
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp: In member function ‘int la_i_lu_factor_mc_t::init(CSOUND*)’:
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:3575:45: error: no matching function for call to ‘lu_factor(gmm::dense_matrix<std::complex<double> >&, std::vector<long unsigned int>&)’
 3575 |     *isize = gmm::lu_factor(lhs->mc, pivot__);
      |                                             ^
In file included from /usr/include/gmm/gmm_lapack_interface.h:42,
                 from /usr/include/gmm/gmm_kernel.h:52,
                 from /usr/include/gmm/gmm.h:40,
                 from /build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:370:
/usr/include/gmm/gmm_dense_lu.h:129:13: note: candidate: ‘template<class DenseMatrix> gmm::size_type gmm::lu_factor(DenseMatrix&, gmm::lapack_ipvt&)’
  129 |   size_type lu_factor(DenseMatrix& A, lapack_ipvt& ipvt) {
      |             ^~~~~~~~~
/usr/include/gmm/gmm_dense_lu.h:129:13: note:   template argument deduction/substitution failed:
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:3575:38: note:   cannot convert ‘((la_i_lu_factor_mc_t*)this)->la_i_lu_factor_mc_t::pivot__’ (type ‘std::vector<long unsigned int>’) to type ‘gmm::lapack_ipvt&’
 3575 |     *isize = gmm::lu_factor(lhs->mc, pivot__);
      |                                      ^~~~~~~
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp: In member function ‘int la_k_lu_factor_mc_t::kontrol(CSOUND*)’:
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:3612:45: error: no matching function for call to ‘lu_factor(gmm::dense_matrix<std::complex<double> >&, std::vector<long unsigned int>&)’
 3612 |     *ksize = gmm::lu_factor(lhs->mc, pivot__);
      |                                             ^
In file included from /usr/include/gmm/gmm_lapack_interface.h:42,
                 from /usr/include/gmm/gmm_kernel.h:52,
                 from /usr/include/gmm/gmm.h:40,
                 from /build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:370:
/usr/include/gmm/gmm_dense_lu.h:129:13: note: candidate: ‘template<class DenseMatrix> gmm::size_type gmm::lu_factor(DenseMatrix&, gmm::lapack_ipvt&)’
  129 |   size_type lu_factor(DenseMatrix& A, lapack_ipvt& ipvt) {
      |             ^~~~~~~~~
/usr/include/gmm/gmm_dense_lu.h:129:13: note:   template argument deduction/substitution failed:
/build/csound/src/csound-6.13.0/Opcodes/linear_algebra.cpp:3612:38: note:   cannot convert ‘((la_k_lu_factor_mc_t*)this)->la_k_lu_factor_mc_t::pivot__’ (type ‘std::vector<long unsigned int>’) to type ‘gmm::lapack_ipvt&’
 3612 |     *ksize = gmm::lu_factor(lhs->mc, pivot__);
      |                                      ^~~~~~~
make[2]: *** [Opcodes/CMakeFiles/linear_algebra.dir/build.make:63: Opcodes/CMakeFiles/linear_algebra.dir/linear_algebra.cpp.o] Error 1
make[2]: Leaving directory '/build/csound/src/csound-6.13.0/build'
make[1]: *** [CMakeFiles/Makefile2:1332: Opcodes/CMakeFiles/linear_algebra.dir/all] Error 2
make[1]: Leaving directory '/build/csound/src/csound-6.13.0/build'
make: *** [Makefile:163: all] Error 2

csound-6.13.0-build.txt

@dvzrv dvzrv changed the title Build fail with gmm 5.2 Build fail with gmm > 5.1 Jul 13, 2019
@dvzrv dvzrv changed the title Build fail with gmm > 5.1 linear algebra opcode build fails with gmm > 5.1 Jul 13, 2019
@jpffitch
Copy link
Contributor

jpffitch commented Jul 13, 2019 via email

@nwhetsell
Copy link
Contributor

For what it’s worth, I’ve been able to build linear algebra opcodes using the version of Gmm++ included with GetFEM++ 5.3. Downloading all of GetFEM++ from

https://download.savannah.gnu.org/releases/getfem/stable/getfem-5.3.tar.gz

and using Gmm++ in src/gmm within that tarball works. Downloading only Gmm++ from

https://download.savannah.gnu.org/releases/getfem/stable/gmm-5.3.tar.gz

and using Gmm++ in include/gmm within that tarball doesn’t work. The linear algebra opcodes have been included in Homebrew’s Csound package since Sep 2019 (which means they build on macOS High Sierra, Mojave, and Catalina).

@vlazzarini
Copy link
Member

done by @jpffitch so closing

@dvzrv
Copy link
Contributor Author

dvzrv commented Aug 14, 2020

@jpffitch what exactly was done by @jpffitch? Can you please be more specific?

Meanwhile, 6.15.0 still does not build with gmm (now at 5.4) for the same reasons as before (so it would be great to keep this issue open until it is solved):
csound-6.15.0-build.log

I see that the templated function lu_factor() as defined in the gmm namespace in /usr/include/gmm/gmm_dense_lu.h expects completely different types.

I am using the headers-only package gmm. Am I supposed to use getfem?

@vlazzarini vlazzarini reopened this Aug 14, 2020
@vlazzarini
Copy link
Member

Ok, I'm reopening. The best thing would be to move these out of the main Csound repo really. I find that these plugins with dependencies get added to Csound and then cause a lot of maintenance trouble. It's time this gets moved to the plugins repo.

@jpffitch
Copy link
Contributor

As I read the code it iso compile with either the old gmm or the new, depending on whether GMM_VERSION is defined. being define is new version, nit defined is the old.

iam nor sure what I can do to help. I cannot find any version og gmm but I did have the old one at at one time -- may be on another computer or he backups.

Currently all I hve is a report that it does not work. Not sure how to proceed.

@vlazzarini vlazzarini added development Issues relating to git, building, project layout etc linux and removed bug labels Apr 14, 2021
@vlazzarini
Copy link
Member

It's been a while. Is it going to be sorted? Or else we should close this.

@kunstmusik
Copy link
Member

Closing as out-of-date. The linear_algebra plugins were moved the plugin repository (https://github.com/csound/plugins) and any further issues should be filed there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Issues relating to git, building, project layout etc linux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants