Conversation
|
|
||
| variant('cxx', default=True, description='Enable C++ support') | ||
| variant('fortran', default=True, description='Enable Fortran support') | ||
| variant('unsupported', default=False, |
There was a problem hiding this comment.
I am not in favor of this. This variant does NOT change package behavior anyhow, as discussed in the issue u linked
There was a problem hiding this comment.
To clarify: If I understand correctly, say with default settings, hdf5~unsupported and hdf5+unsupported are exactly the same builds. No functional difference. Thus it shall not be a variant and was removed.
There was a problem hiding this comment.
I don't insist on this but why are there 'conflicts' statements in the current script and how can I tell spack to ignore them? For example, if I want to enable the cxx interface and have the thread safety. The developers of hdf5 allow for that. Of course, I have to take the responsibility explicitly (--enable-unsupported) in that case. The 'unsupported' variant is for the same reason: to allow package developers (and users) to specify that they need/want an unsupported combination of features and they know what they are doing. Otherwise, they get a notification from the 'conflicts' statement.
There was a problem hiding this comment.
Then just remove the conflicts statements. Probably they should have been removed earlier together with unsupported.
One way or another, variants are meant to change the package, which is not the case here. Similarly “run-tests” is not a variant, instead we have —run-tests option of install command
There was a problem hiding this comment.
@skosukhin For what is worth, my interpretation at the time I did this was:
+cxx+mpiis claimed to be unsupported -> there's no promise on its behavior+cxx+threadsafeis claimed to be not compatible -> it's known to be broken
There was a problem hiding this comment.
+cxx+mpi is claimed to be unsupported -> there's no promise on its behavior
that we can probably allow, but maybe print a warning to the user during installation.
+cxx+threadsafe is claimed to be not compatible -> it's known to be broken
then this shall stay as a conflict.
There was a problem hiding this comment.
+cxx+threadsafe is claimed to be not compatible -> it's known to be broken
@alalazo , does this mean that the 'threadsafe' feature doesn't work even via low-level interface (when +cxx) or only via cxx interface?
There was a problem hiding this comment.
@skosukhin I would expect only through the cxx interface (and I hope the low-level is compiled the same regardless of cxx). Don't take my word for it, though - never peeked the code inside hdf5, and the docs are not 100% clear.
| variant('unsupported', default=False, | ||
| description='Allow unsupported combinations of configure options') | ||
| variant('hl', default=False, description='Enable the high-level library') | ||
| variant('cxx', default=False, description='Enable C++ support') |
There was a problem hiding this comment.
given the reply of @alalazo , let's add an in-code comment above along the lines
# +cxx+mpi is not explicitly supported, one can build HDF5 that way but there's no promise on its behavior
There was a problem hiding this comment.
As far as I understand, we have to introduce unnecessary constraints (~cxx) in the depends_on statement to enable thread safety (+threadsafe) even if we don't really care if the cxx interface is enabled or not. It might cause a conflict if there are two packages in a dependency tree one requiring +cxx, and another one requiring thread safety.
There was a problem hiding this comment.
we have to introduce unnecessary constraints
If I understand you right, conflicts('+threadsafe', when='+cxx') is perfectly valid one and shall remain there assuming that
+cxx+threadsafe is claimed to be not compatible -> it's known to be broken
is indeed the case. We only remove it if proven otherwise. So i would not call it "unnecessary".
if there are two packages in a dependency tree one requiring +cxx, and another one requiring thread safety.
you can't do anything about that. They simply require incompatible variants. This shall be resolved upstream (hdf5).
There was a problem hiding this comment.
They simply require incompatible variants.
One of the packages uses low-level C-API in multiple threads, another one uses CXX interface in a single thread. As far as I understand, both can get what they need from the same installation of the library if it's configured with +cxx+threadsafe.
There was a problem hiding this comment.
both can get what they need from the same installation of the library if it's configured with +cxx+threadsafe.
then, feel free to add this comment and comment out (instead of removing) the conflict statement so that no one tries to re-add it later.
| description='Allow unsupported combinations of configure options') | ||
| variant('hl', default=False, description='Enable the high-level library') | ||
| variant('cxx', default=False, description='Enable C++ support') | ||
| variant('fortran', default=False, description='Enable Fortran support') |
|
Since Spack is Supercomputer package manager, we try to keep all MPI on by default |
In Spack we can easily tell what we need: packages that need hdf5+mpi have depends_on('hdf5+mpi') statement anyway. The problem is that Spack does not allow us to specify what we don't need: with depends_on('hdf5~mpi') we actually say that we need hdf5 without mpi support. So, how do we tell that we don't care=don't need? And if we don't need smth than why do we want to compile it? I understand when applications are compiled with extra dependencies because there might be a well-established set of features that users expect. But why do we need to have extra dependencies by default for libraries? |
| variant('cxx', default=True, description='Enable C++ support') | ||
| variant('fortran', default=True, description='Enable Fortran support') | ||
| variant('hl', default=False, description='Enable the high-level library') | ||
| variant('cxx', default=False, description='Enable C++ support') |
There was a problem hiding this comment.
Changing the old default?
|
|
The problem is that if we build with MPI support by default and we don't need MPI and don't want to compile it, we have to disable 'mpi' variant for all the dependencies: |
|
I disagree in the assessment that it's a problem with rationale above #5790 (comment) |
|
I also recall that there were some issues with concretizer if you don't set |
So much work done to make Spack user-friendly and it's not a problem? So much work done to make Spack work even on MacOS (and other desktop environments) and the rationale remains? So many pieces of software that depend on libraries but don't require their MPI features but we still have to compile MPI libraries by default? Well, fine. |
the point is that you can still get to what you want, just use |
The issue arises whenever you have packages
Spack is a Supercomputing PACKage manager after all, so we (I) decided to make the default See #2590 for the PR where this policy was introduced. It (hopefully) has a good summary of what the problem is and how far-reaching it is. |
An update for HDF5:
unsupportedvariant from HDF5. #520) to allow unsupported combinations only when it's specified explicitly;I would also make ~mpi by default because every time we want to install something that needs just NetCDF we have to write: install A+netcdf ^netcdf~mpi ^hdf5~mpi to avoid compilation of MPI library. But I don't know which case is more often.
There will be a discussion probably.