There are FreeBSD ports that depend on the C++ option.
Now I need to add another port that depends on the Parallel option.
If they aren’t compatible, how can both programs be run at the same time?
Is there any way to make these two options not mutually exclusive?
It is very difficult to find ports that depend on c++ and parallel because these options are embedded in the hdf5 port.
I’m curious how FreeBSD manages packages when the two options are mutually exclusive.
This is a very undesirable situation. It isn’t handled gracefully. The PARALLEL port option is currently non-default, and it looks like nobody is using it. If some port would need to use the c++ and some other ports would need to use the parallel option - hdf5 should be modified and these options should be made compatible, Otherwise some ports can’t exist.
The port maintainer could build with --enable-unsupported (or ALLOW_UNSUPPORTED in CMake). It’s marked as “unsupported”, but that’s mainly because we don’t test parallel HDF5 with those wrappers. A serial program built with parallel HDF5 should be fine.
I’ve been thinking about removing this restriction, but I haven’t had time to address the documentation tasks that would be required.
When both CXX and PARALLEL options are enabled the build fails:
In file included from /disk-samsung/freebsd-ports/science/hdf5/work/CMake-hdf5-1.12.2/hdf5-1.12.2/hl/c++/src/H5PacketTable.cpp:23:
In file included from /disk-samsung/freebsd-ports/science/hdf5/work/CMake-hdf5-1.12.2/hdf5-1.12.2/hl/src/H5HLprivate2.h:24:
/disk-samsung/freebsd-ports/science/hdf5/work/CMake-hdf5-1.12.2/hdf5-1.12.2/src/H5private.h:532:2: error: “no suitable MPI type for size_t” #error “no suitable MPI type for size_t”
^
@yuri - Can you provide more context about your error? Are you building with the Autotools or CMake? C++ should work with parallel enabled if you build with --enable-unsupported. If that’s broken on FreeBSD, we’ll have to fix things.
I build the FreeBSD port that builds with cmake.
In the port I tried to enable both CXX and PARALLEL options at the same time, and got this error. ALLOW_UNSUPPORTED=ON is used.
They build fine separately. But they fail together with the above message.
I tried the C++ w/ parallel combination under CMake (on Linux - I don’t have access to a FreeBSD install) and it works for both HDF5 1.12.2 and 1.13.3. What C/C++ compiler and MPI library are you using?
When CXX, FORTRAN and PARALLEL are all enabled, the compilation fails:
In file included from /usr/ports/science/hdf5/work/CMake-hdf5-1.12.2/hdf5-1.12.2/hl/c++/src/H5PacketTable.cpp:23:
In file included from /usr/ports/science/hdf5/work/CMake-hdf5-1.12.2/hdf5-1.12.2/hl/src/H5HLprivate2.h:24:
/usr/ports/science/hdf5/work/CMake-hdf5-1.12.2/hdf5-1.12.2/src/H5private.h:532:2: error: "no suitable MPI type for size_t"
#error "no suitable MPI type for size_t"
^