Add a New Comment (Rich Markup)
Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old
( Jump to the original submission )
Carlo: I wanted to use the OCTAVE_CHECK_LIB macro and thought it was OK to just check for suitesparse/klu.h and I didn't fully understand the dependency issues that OCTAVE_CHECK_LIB can't handled (one header file that requires another to be included first). In any case, I think it is all fixed now.
@cdf Nothing was removed, this is in addition to what was there previously.
When you first committed this change, it was only on the test for the SUNKLU function. Now there is also a test for whether the sunlinsol_klu.h header file can be included, without a test program, and that needed the additional logic also.
I would appreciate any feedback you have on bug #55937 to make sure I understand these tests properly before I go hacking this all up again.
still I am a bit curious, why was the check for klu in multiple locations first removed and then reintroduced?
OK, sorry ... I see now that
http://hg.savannah.gnu.org/hgweb/octave/rev/58e300954518
brought back the check for additional locations, I should have read all the discussion before posting.
Hi,
Actually klu.h is not necessarily in suitesparse/klu.h at least it is not so in my system.
http://hg.savannah.gnu.org/hgweb/octave/rev/a1acd11bad19
used to have
+ #if defined (HAVE_KLU_H) + #include <klu.h> + #endif + #if defined (HAVE_KLU_KLU_H) + #include <klu/klu.h> + #endif + #if defined (HAVE_SUITESPARSE_KLU_H) + #include <suitesparse/klu.h> + #endif + #if defined (HAVE_UFPARSE_KLU_H) + #include <ufsparse/klu.h> + #endif
so, why does
http://hg.savannah.gnu.org/hgweb/octave/rev/cfa2a65c9fdc
only check for suitesparse/klu.h ?
Thanks, this works for me now. Hopefully I'll get some time to work on bug #55937 and not break all of this again.
I pushed this additional change:
Yeah, it's probably OK to not look for ufsparse/klu.h so if you want to remove that from the configure checks and sources, go ahead.
Side note: should we stop checking for 'ufsparse' these days?
I can retest this a little bit later today.
I think this needs more include variants of klu.h, though. See how klu.h is included in '__ode15__.cc', I think we need to mirror those same possibilities in configure.
https://hg.savannah.gnu.org/hgweb/octave/file/cfa2a65c9fdc/libinterp/dldfcn/__ode15__.cc#l64
I pushed the following changeset:
It seems to work for me with Sundials 4.1.0 without having to add -I/usr/include/suitesparse to CPPFLAGS. Building with Sundials 3.x also works, but I think the -I flag is still needed for that version.
I have finally gotten time to build and install my own copy of sundials 4.1. When running configure with CPPFLAGS and LDFLAGS pointing to this copy of sundials, configure finds it, but does not automatically detect that the library was built with KLU support. It definitely is, the only problem still seems to be the link to the klu.h header file.
Excerpt from config.log
configure:70899: checking sunlinsol/sunlinsol_klu.h usability configure:70899: gcc -c -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -pthread -fopenmp -D_FORTIFY_SOURCE=2 -I/home/mike/sd/include conftest.c >&5 In file included from conftest.c:604: /home/mike/sd/include/sunlinsol/sunlinsol_klu.h:34:10: fatal error: klu.h: No such file or directory #include <klu.h> ^~~~~~~
But sundials 4 was adapted to allow the application to include klu.h in its own way and not depend on the path being exactly klu.h. So configure needs to test for the header file this way for the feature tests to pass.
If I fudge the configure feature test results by passing the following five cache variables that I know should be passing on my system
ac_cv_func_SUNKLU=yes ac_cv_func_SUNLinSol_KLU=yes ac_cv_header_sunlinsol_sunlinsol_klu_h=yes octave_cv_lib_sundials_sunlinsolklu=yes octave_cv_sundials_sunlinsol_klu=yes
then configure passes with all sundials features enabled for the v4 API, and 'make' succeeds and all tests pass, no features disabled.
The point here is to avoid requiring the user to pass '-I/usr/include/suitesparse' when building Octave with current versions of sundials, configure needs to include klu.h under different alternative names in the sundials tests just like it does in the '__ode15__.cc' source file.
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Only project members can vote.
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 4 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.10