Skip to content

fix : trilinos and dependencies#414

Merged
tgamblin merged 6 commits intospack:developfrom
epfl-scitas:issues/trilinos_385
Feb 3, 2016
Merged

fix : trilinos and dependencies#414
tgamblin merged 6 commits intospack:developfrom
epfl-scitas:issues/trilinos_385

Conversation

@alalazo
Copy link
Copy Markdown
Member

@alalazo alalazo commented Jan 29, 2016

Modifications :

  • updated trilinos to meet changes in dependencies
  • added mpi variant to netcdf (default=True, triggers --enable-parallel)
  • updated openssl version (older ones cannot be retrieved anymore from the url) see updated openssl version #416
  • added smarter logic in the computation of openssl URL

Known issues :

  • trilinos requires numpy. Currently one needs to activate it before installing trilinos :
spack install py-numpy
spack activate numpy
spack install  trilinos ^ netlib-lapack+shared ^ netlib-blas+fpic
  • build is not working for GCC >= 5.0 (C++11 incompatibilities in some packages)

Should be related to #385

@adamjstewart : please tell me if the modifications in netcdf are fine with you

@adamjstewart
Copy link
Copy Markdown
Member

NetCDF:

  • I don't think there is an --enable-parallel option. There are only --enable-parallel4, --enable-pnetcdf, and --enable-parallel-tests options.

OpenSSL:

  • Why keep the old versions lying around? Checksums are useless if we'll never be able to download them again.

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Jan 29, 2016

@adamjstewart

NetCDF : you're absolutely right, it's --enable-parallel4

OpenSSL : people may still have it mirrored (and I guess they won't be happy if I remove a version without notice)

@adamjstewart
Copy link
Copy Markdown
Member

I haven't tried building NetCDF in parallel yet, but I can confirm that I was able to reinstall the serial version just fine.

I have an idea for OpenSSL. All of the older versions are still available, they just moved them to a different location. For example:
http://www.openssl.org/source/openssl-1.0.1h.tar.gz
was moved to:
http://www.openssl.org/source/old/1.0.1/openssl-1.0.1h.tar.gz
What we could do is add a url_for_version function that always points to the source/old location. Then, for the most recent version that is at the source location, we could specify the url within the version function. The OpenSSL package will still break every time a new release comes out, since it will have moved to the source/old location, but you will be able to download older versions. A more stable solution would be to never include the most recent release and always pull from source/old. Personally, I would prefer this. I wish there was a way to use a try-except statement so we could first try the source location and then the source/old location.

You're welcome to make these modifications as part of this pull request. If you prefer, I'm willing to make the changes myself and file a separate pull request after this one is merged. Either way, this pull request gets my stamp of approval. Just make sure to switch --enable-parallel to --enable-parallel4.

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Jan 30, 2016

@adamjstewart I'll make the changes asap, Thanks for reviewing this.

openssl : smarter URL computation
@tgamblin
Copy link
Copy Markdown
Member

tgamblin commented Feb 1, 2016

Any chance we could factor the OpenSSL stuff out of this and continue the discussion from #416 in a separate PR?

@alalazo
Copy link
Copy Markdown
Member Author

alalazo commented Feb 1, 2016

@tgamblin : done

@alalazo alalazo mentioned this pull request Feb 3, 2016
2 tasks
@tgamblin
Copy link
Copy Markdown
Member

tgamblin commented Feb 3, 2016

Thanks!

tgamblin added a commit that referenced this pull request Feb 3, 2016
@tgamblin tgamblin merged commit 72ca311 into spack:develop Feb 3, 2016
@alalazo alalazo deleted the issues/trilinos_385 branch February 3, 2016 18:44
depends_on("curl") # required for DAP support
depends_on("hdf", when='+hdf4')
depends_on("hdf5") # required for NetCDF-4 support
depends_on("hdf5+mpi~cxx", when='+mpi') # required for NetCDF-4 support
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alalazo Is it necessary to disable C++ support for HDF5 when building NetCDF 4? To my knowledge, the C++ and the C headers don't conflict, so it shouldn't matter whether C++ support in HDF5 has been enabled.

It seems this is currently causing a rat's tail of problems, amplified by an issue in Spack, that make it impossible to express the HDF5 version constraint (< 1.10) here. It seems (but I haven't tested this yet) that, without the ~cxx specifier, the respective work-around in the HDF5 package could be avoided.

If the ~cxx is indeed necessary here, could you then add a comment explaining why?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has nothing to do with NetCDF-4. If you take a look at #400, you'll see that I added this comment to explain that HDF5 and zlib are required if you want NetCDF-4 support. From ./configure -h for NetCDF 4.4.0:

  --disable-netcdf-4      do not build with netcdf-4 (else HDF5 and zlib required)

So HDF5 and zlib are really only dependencies if you want netcdf-4, which we do.

If you check the comments in the HDF5 package, you'll see the reason for ~cxx:

The HDF5 configure script warns if cxx and mpi are enabled together. There doesn't seem to be a real reason for this, except that parts of the MPI interface are not accessible via the C++ interface. Since they are still accessible via the C interface, this is not actually a problem.

So it sounds like you should be able to remove the ~cxx if you want to. But yeah, it's best to comment it better. How about something like:

depends_on('m4')
depends_on('hdf', when='+hdf4')

# Required for DAP support
depends_on('curl')

# Required for NetCDF-4 support
depends_on('zlib')
depends_on('hdf5~mpi', when='~mpi')
depends_on('hdf5+mpi~cxx', when='+mpi') # mpi and cxx aren't compatible

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 # mpi and cxx aren't compatible

that is certainly not the case.

I think what that comment in HDF5 is meant to say is that c++ interface of MPI is not as complete as c, but nobody restricts the programmer to use c++ interface in c++ code.
You can call MPI's c function like MPI_Allreduce from a program compiled with c++ with different standards like c++11 or c++14. It is done all the time in the deal.ii library which is a c++ library, see for example https://github.com/dealii/dealii/blob/master/include/deal.II/base/mpi.h#L524

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. It's probably safe to remove that restriction then. I can submit a PR if you want, unless you want the honors.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄 please, go ahead.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eschnett I placed the dependency on hdf5+mpi~cxx before the general consensus was to use --enable-unsupported by default. I think it is safe to remove it now.

matz-e pushed a commit to matz-e/spack that referenced this pull request Apr 27, 2020
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.

5 participants