Parallel and C++ options are mutually exclusive?


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?


Hi, Yuri!

Are you the maintainer of HDF5 port for FreeBSD [1]?
If so, I just want to say thank you :clap: for maintaining the port.

I don’t know the answer to your question but
is there a FreeBSD port example that is mutually exclusive?
E.g. science/pkg-c++ , science/pkg-parallel

I’m curious how FreeBSD manages packages when the two options are mutually exclusive.



No, I am not a maintainer of the hdf5 port.

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.


I think FreeBSD should follow what OpenBSD does. Don’t use PARALLEL.


I don’t understand what are you suggesting.


My suggestion is simple.
Remove all (or comment out) lines related to PARALLEL in Makefile of FreeBSD HDF5 port.

   # PARALLEL_USES=		localbase:ldflags mpi:mpich


You probably mean to always enable it.
Then this option should simply be made default. No need to remove it.
I am going to suggest such change.


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”


No, always disable it.


The Damask project expects hdf5 with PARALLEL option ON.


Thanks for sharing the link.
It’s good to know DADF5.
Can your team move alway from MPI to Dask?

BTW, DAMASK rhymes well with DASK. :slight_smile:


@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 think –enable-unsupported should be gone first before we ask FreeBSD users to try something unsupported.


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?