Sundials-3* support

25 posts / 0 new
Last post
sagitter
Offline
Joined: 2015-04-11
Sundials-3* support

Hi all.

'Sundials 3.0.0' does not longer provide 'cvodes/cvodes_dense.h'; 'assimulo' is failing with:
C compiler: gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp -fPIC
compile options: '-I/usr/lib64/python2.7/site-packages/numpy/core/include -Iassimulo -Iassimulo/lib -I/usr/include -I/usr/lib64/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c'
extra options: '-O2 -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -Wl,-z,relro -fPIC -Wl,-z,now -Wno-cpp'
gcc: assimulo/solvers/sundials.c
assimulo/solvers/sundials.c:548:10: fatal error: cvodes/cvodes_dense.h: No such file or directory
#include "cvodes/cvodes_dense.h"
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
assimulo/solvers/sundials.c:548:10: fatal error: cvodes/cvodes_dense.h: No such file or directory
#include "cvodes/cvodes_dense.h"
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

chria
Offline
Joined: 2009-07-29
Hi,   Thanks for the

Hi,

 

Thanks for the feedback! I've not yet looked at Sundials 3.0.0 and what updates needs to be done in order to support the new version. I'll see what I can do.

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
Hi chria. Excuse me if i

Hi chria.

Excuse me if i stress with this request but Assimulo is currently obsoleted since Sundials and its related software have been updated.

When do you guess Assimulo will be modified?

chria
Offline
Joined: 2009-07-29
Hi,   I'll try to look into

Hi,

 

I'll try to look into it during the holidays. Hopefully there won't be too much work to support it even though a lot of headers has been changed.

 

Best

/Christian

chria
Offline
Joined: 2009-07-29
Hi again,   I see that they

Hi again,

 

I see that they even released 3.1.0. Do you prefer this one instead of 3.0.0?

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
sundials 3.1.0
chria wrote:

Hi again,

 

I see that they even released 3.1.0. Do you prefer this one instead of 3.0.0?

 

Best

/Christian

 

Hi Christian.

Sundials 3.1.0 is a minor release i guess (https://computation.llnl.gov/projects/sundials/release-history), so it does not differ a lot by the 3.0.0 one.

However, i will update to sundials 3.1.0, too; it would great having Assimulo ready for it.

chria
Offline
Joined: 2009-07-29
Hi,   They didn't make it

Hi,

 

They didn't make it easy...

 

I've made the necessary changes in https://trac.jmodelica.org/assimulo/changeset/845 and from there on should support Sundials 3.1 (didn't test 3.0). If you would be able to test it on your end as well it would be much appreciated.

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
sundials 3.1.0
chria wrote:

Hi,

 

They didn't make it easy...

 

I've made the necessary changes in https://trac.jmodelica.org/assimulo/changeset/845 and from there on should support Sundials 3.1 (didn't test 3.0). If you would be able to test it on your end as well it would be much appreciated.

 

Best

/Christian

 

Of course.

sagitter
Offline
Joined: 2015-04-11
Compilation okay

Hi Christian.

Assimulo's commit 845 is compiled fine both with Sundials 3.0.0 and Sundials 3.1.0.

Full build log: https://kojipkgs.fedoraproject.org//work/tasks/5519/23845519/build.log

 

Just 2 questions:

  •  Why are displayed these messages?

Compiling assimulo/solvers/euler.pyx because it changed.
[1/1] Cythonizing assimulo/solvers/euler.pyx
assimulo/solvers/sundials.pyx: cannot find cimported module 'sundials_includes'
[1/1] Cythonizing assimulo/solvers/sundials.pyx
assimulo/solvers/kinsol.pyx: cannot find cimported module 'sundials_includes'
[1/1] Cythonizing assimulo/solvers/kinsol.pyx

  • I wish to compile Assimulo against OpenBLAS instead of Blas/Lapack; however, Assimulo searches and links always libblas/lapack even if i set --blas-name option with the argument openblas. How can i fix this behavior? Did you ever tested Assimulo with openBLAS?
chria
Offline
Joined: 2009-07-29
Hi,   Sounds good! Thanks for

Hi,

 

Sounds good! Thanks for testing.

Looking at the log I see that I should also update the behavior for detecting SuperLU and if Sundials has been compiled with support for SuperLU. I also have on my list to add the license to the install folder.

Regarding your other questions, are you asking about the sundials_includes? I'm actually not sure why it is displayed. It is found and is used. Regarding the blas name, you are correct in that it is not picked up correctly, I'll look into it. However, it will only impact the GLIMDA solver, not the others.

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
sundials_includes
chria wrote:

Regarding your other questions, are you asking about the sundials_includes?

Best

/Christian

 

Yes, i refer to them exactly.

chria
Offline
Joined: 2009-07-29
Ok, I don't believe they are

Ok, I don't believe they are anything to worry about.

 

I've made a few more changes regarding the setup script and a few other changes. If everything checks out I plan to release shortly a new version of Assimulo.

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
Testing commit 857
chria wrote:

I've made a few more changes regarding the setup script and a few other changes. If everything checks out I plan to release shortly a new version of Assimulo.

Openblas is not recognized yet. Also:

+ nosetests -v
This tests that exceptions are no caught when evaluating the RHS in ExpEuler. ... ok
solvers.test_euler.Test_Explicit_Euler.test_h ... ok
This tests the functionality of using the normal mode. ... ok
This tests the functionality of using one step mode. ... ok
This tests that the switches are actually turned when override. ... ok
solvers.test_euler.Test_Explicit_Euler.test_time_event ... ok
solvers.test_euler.Test_Implicit_Euler.test_h ... ok
This tests the functionality of using the normal mode. ... ok
solvers.test_euler.Test_Implicit_Euler.test_reset_statistics ... ok
This tests the functionality of using one step mode. ... ok
solvers.test_euler.Test_Implicit_Euler.test_stiff_problem ... ok
This tests that the switches are actually turned when override. ... ok
solvers.test_euler.Test_Implicit_Euler.test_time_event ... ok
Add attributes to a test function/method/class. ... ok
Tests the maximum stepsize of GLIMDA. ... ok
Tests the maximum order of GLIMDA. ... ok
Tests the maximum number of retries of GLIMDA. ... ok
Tests the maximum allowed steps of GLIMDA ... ok
Tests the minimum stepsize of GLIMDA. ... ok
Tests the minimum order of GLIMDA. ... ok
Tests the maximum allowed number of Newton iterations GLIMDA ... ok
Tests the order of GLIMDA. ... ok
Test a simulation of an explicit problem using GLIMDA. ... ** On entry to DGETRF2S parameter number 4 had an illegal value
** On entry to DTRSM parameter number 11 had an illegal value
** On entry to DTRSM parameter number 11 had an illegal value

chria
Offline
Joined: 2009-07-29
Hi,   Try now - when the

Hi,

 

Try now - when the blasname is set it should now be used. However, in the previous log output that you sent all tests passed. What changed?

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
Testing commit 858
chria wrote:

Hi,

 

However, in the previous log output that you sent all tests passed. What changed?

 

Best

/Christian

 

Failed tests come from commit #857; previous tests were ran from commit #845

 

chria wrote:

Hi,

 

Try now - when the blasname is set it should now be used.

 

Best

/Christian

It's linking both blas/lapack and openblas:

$ ldd -r glimda.so
    linux-vdso.so.1 (0x00007ffdd4170000)
    liblapack.so.3 => /lib64/liblapack.so.3 (0x00007f322e483000)
    libopenblas.so.0 => /lib64/libopenblas.so.0 (0x00007f322c0a4000)
    libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 (0x00007f322bc65000)
    libgfortran.so.4 => /lib64/libgfortran.so.4 (0x00007f322b889000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f322b534000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f322b31d000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f322af3a000)
    libblas.so.3 => /lib64/libblas.so.3 (0x00007f322ace4000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f322aac5000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f322a8c1000)
    libutil.so.1 => /lib64/libutil.so.1 (0x00007f322a6be000)
    libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007f322a47e000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f322ef3d000)

 

Full build log of assimulo commit #858 <----------

chria
Offline
Joined: 2009-07-29
Hi,   The linking with both

Hi,

 

The linking with both openblas and blas seems to not come from Assimulos setup script (we only point to the one specified). Is linking with either one coming externally (via globally CFLAGS or otherwise)?

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
globally flag

There isn't any globally flag that forces 'blas'.

It looks like assimulo selects any libraries named with "openblas": (line #15) of this log.

Those which end with "64", like -lopenblaso64, are 64bit integer libraries.

 

chria
Offline
Joined: 2009-07-29
Hi,   I cannot open the log,

Hi,

 

I cannot open the log, can you update the link?

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
New build log

New log: https://paste.fedoraproject.org/paste/b6-cB~HltGPfQiEWKl-qog

See lines #973 and above please.

chria
Offline
Joined: 2009-07-29
Hi,   I believe I found the

Hi,

 

I believe I found the issue. When SuperLU is specified we also check if there is other libraries that SuperLU is dependent on and link them as well. Now how we do this is not ideal, currently we just look for libraries that are available in the library directory for where SuperLU was found and use all of them. I'll update the behaviour so that if Blas is specified we do not link those extra libraries.

 

Best

/Christian

chria
Offline
Joined: 2009-07-29
Hi,   It should hopefully be

Hi,

 

It should hopefully be fixed now.

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
linker error

Hi Christian.

 

There is a linker error unfortunately: log (line#1082)

Too many and useless links also: lines #997, #982

chria
Offline
Joined: 2009-07-29
Hi,   Yes I see that there

Hi,

 

Yes I see that there are extra libraries. However, the linker error I cannot trace back to changes that I've made. On our test server the following link command is triggered:

/usr/bin/gfortran -Wall -Wall -shared build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/assimulo/thirdparty/hairer/dopri5module.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/fortranobject.o build/temp.linux-x86_64-2.7/assimulo/thirdparty/hairer/dopri5.o build/temp.linux-x86_64-2.7/build/src.linux-x86_64-2.7/assimulo/thirdparty/hairer/dopri5-f2pywrappers.o -lgfortran -o build/lib.linux-x86_64-2.7/assimulo/lib/dopri5.so

 

Which runs successfully, can it be something on your end?

 

Best

/Christian

sagitter
Offline
Joined: 2015-04-11
unnecessary lapack link

I have clean all required dependecies for packaging and set again the linker flags; now, it does not fail. However, assimulo still searches lapack library when i compile Assimulo against openBLAS; this should not happen.

--lapack-home option is required to activate GLIMDA solver compilation but it should not impose -llapack together -lopenblas.

sagitter
Offline
Joined: 2015-04-11
Many names of header file

Many names of header file have been changed.

Login or register to post comments