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

update for sundials 5.1 #421

Closed
wants to merge 20 commits into from
Closed

update for sundials 5.1 #421

wants to merge 20 commits into from

Conversation

jd-lara
Copy link
Contributor

@jd-lara jd-lara commented Jan 23, 2020

@ViralBShah This builder will likely fail because I haven't been able to run the wizard fully because of LLNL/sundials#23

@jd-lara
Copy link
Contributor Author

jd-lara commented Jan 23, 2020

It looks to me like the tests for LAPACK require finding libgfortran when linking with C linkers,
and GCC doesn't automatically add that search path. So rpath-link is needed but I am not sure how to pass it into the test.

@giordano
Copy link
Member

It looks to me like the tests for LAPACK require finding libgfortran when linking with C linkers,
and GCC doesn't automatically add that search path. So rpath-link is needed but I am not sure how to pass it into the test.

I can have a look in the next days, unless you figure out yourself. You can try for example to do

export CFLAGS="-Wl,-rpath-link,/opt/${target}/${target}/sys-root/lib64" 

before running cmake

@jd-lara
Copy link
Contributor Author

jd-lara commented Jan 23, 2020

@giordano thanks I added it but get the same result.

Appending Fortran release flags
-- Determining Fortran name-mangling scheme... FAILED
-- Looking for LAPACK libraries... OK
-- Checking if LAPACK works... FAILED
CMake Warning at config/SundialsCMakeMacros.cmake:83 (message):
  ------------------------------------------------------------------------

  WARNING: LAPACK not functional

  Blas/Lapack support will not be provided

  ------------------------------------------------------------------------

@giordano
Copy link
Member

I'm not at the computer to see what happens, I'll be able to get back to this in a couple of days

@ViralBShah
Copy link
Member

ViralBShah commented Jan 23, 2020

Are there other Fortran libs being called except blas and lapack? Perhaps those are getting name mangled too but should not be?

I am on my phone so unable to dive in on details, which I should be able to in a couple of hours.

@jd-lara
Copy link
Contributor Author

jd-lara commented Jan 23, 2020

@ViralBShah I am not sure but it seems reasonable. To confirm your hypothesis is possible to see that https://dev.azure.com/JuliaPackaging/Yggdrasil/_build/results?buildId=1121&view=logs&j=cff8108e-5e30-5123-99e4-8a9b379302a5&t=5baf66a3-28c5-5694-918f-b66b88316018&l=1722 the name mangling does work. Although LAPACK is still not functional.

I uploaded some extra output here LLNL/sundials#23 (comment) for your reference about the LapackTest that Sundials runs.

@jd-lara
Copy link
Contributor Author

jd-lara commented Jan 25, 2020

@giordano is there an easy way you guys test locally with the patches? I haven't found a way to run a local test and pass the patch files. I end up making them manually every time.

@giordano
Copy link
Member

is there an easy way you guys test locally with the patches? I haven't found a way to run a local test and pass the patch files. I end up making them manually every time.

Something like this: https://juliapackaging.github.io/BinaryBuilder.jl/dev/FAQ/#I-love-the-wizard,-but-now-I-want-to-break-free:-can-I-build-the-tarballs-without-it?-1?

@jd-lara
Copy link
Contributor Author

jd-lara commented Jan 25, 2020

is there an easy way you guys test locally with the patches? I haven't found a way to run a local test and pass the patch files. I end up making them manually every time.

Something like this: https://juliapackaging.github.io/BinaryBuilder.jl/dev/FAQ/#I-love-the-wizard,-but-now-I-want-to-break-free:-can-I-build-the-tarballs-without-it?-1?

This is exactly what I needed, thanks. I just haven't worked with BinaryBuilder that much.

@jd-lara
Copy link
Contributor Author

jd-lara commented Jan 25, 2020

@giordano I have run out of ideas so far to fix the compile in windows it seems that the problem is in Sundials itself

https://dev.azure.com/JuliaPackaging/Yggdrasil/_build/results?buildId=1180&view=logs&j=e9d720d7-4263-563a-1d0a-7e5c18a07b54&t=143671a3-b00f-58bd-0b2e-1674ee780dca&l=3647

@giordano
Copy link
Member

Yes, I also think this is an issue in Sundials

@giordano
Copy link
Member

For PowerPC it looks like libsundials_sunlinsollapackband and libsundials_sunlinsollapackdense are not built at all.

@jd-lara
Copy link
Contributor Author

jd-lara commented Jan 25, 2020

For PowerPC it looks like libsundials_sunlinsollapackband and libsundials_sunlinsollapackdense are not built at all.

It's because it doesn't find LAPACK, I need to look into why

@giordano
Copy link
Member

Change the last line to

build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v"5")

(or click the checkbox to allow maintainers to push to your branch 😉)

@jd-lara
Copy link
Contributor Author

jd-lara commented Jan 25, 2020

@giordano thanks for the fixes for PowerPC. I have been trying to replicate the windows error locally but I get stuck at the C compiler test with the error sorry - this program has been built without plugin support

I don't know if the fact that I am using docker in a Mac might be affecting the exact version of the toolchain that is used.

@giordano
Copy link
Member

I don't know if the fact that I am using docker in a Mac might be affecting the exact version of the toolchain that is used.

It shouldn't, the point of BinaryBuilder is to provide the same environment to everyone 😕

I can reproduce the Windows error locally but I'm mildly confident that this is an upstream error

@giordano
Copy link
Member

The macOS failure is a BinaryBuilder.jl bug, but a fix is coming in JuliaPackaging/BinaryBuilder.jl#630.

@giordano
Copy link
Member

One downside of doing something like

export CFLAGS="-lgfortran" 

is that probably all libraries will be linked to libgfortran, even if they don't need it, which I think is @ViralBShah's point in a comment he made above.

I need to play more with some of the CMake variables to see how to properly do this, yesterday I did some experiments which didn't work very well.

@ViralBShah
Copy link
Member

Closing this and opening a new PR - so that sundials v3 and v5 can be both built during the transition.

@ViralBShah ViralBShah closed this Feb 5, 2020
ViralBShah added a commit that referenced this pull request Feb 5, 2020
ViralBShah added a commit that referenced this pull request Feb 9, 2020
Creating a separate directory for Sundials 5.
This is basically the work of @jd-lara in #421
[Sundials@5] Work around missing macro definition
giordano pushed a commit that referenced this pull request Feb 9, 2020
This is basically the work of @jd-lara in #421

Co-authored-by: Jose Daniel Lara <jdlara@berkeley.edu>
ViralBShah added a commit that referenced this pull request Feb 9, 2020
* Creating a separate directory for Sundials 5.

This is basically the work of @jd-lara and @giordano in #421

Co-authored-by: Jose Daniel Lara <jdlara@berkeley.edu>

* [Sundials@5] Use gfortran & Co. only as lapack libraries

Co-authored-by: Jose Daniel Lara <jdlara@berkeley.edu>
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants