fix : trilinos and dependencies#414
Conversation
|
NetCDF:
OpenSSL:
|
|
NetCDF : you're absolutely right, it's OpenSSL : people may still have it mirrored (and I guess they won't be happy if I remove a version without notice) |
|
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: 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 |
|
@adamjstewart I'll make the changes asap, Thanks for reviewing this. |
openssl : smarter URL computation
|
Any chance we could factor the OpenSSL stuff out of this and continue the discussion from #416 in a separate PR? |
|
@tgamblin : done |
|
Thanks! |
fix : trilinos and dependencies
| 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 |
There was a problem hiding this comment.
@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?
There was a problem hiding this comment.
i asked myself exactly the same question here https://github.com/LLNL/spack/blob/develop/var/spack/repos/builtin/packages/dealii/package.py#L42 . I agree with @eschnett that ~cxx should either be commented or removed.
There was a problem hiding this comment.
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 compatibleThere was a problem hiding this comment.
# 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
There was a problem hiding this comment.
Fair enough. It's probably safe to remove that restriction then. I can submit a PR if you want, unless you want the honors.
There was a problem hiding this comment.
@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.
Modifications :
mpivariant to netcdf (default=True, triggers--enable-parallel)Known issues :
numpy. Currently one needs to activate it before installing trilinos :Should be related to #385
@adamjstewart : please tell me if the modifications in netcdf are fine with you