Open mauimuc opened 3 years ago
I'm investigating now; thanks for providing the docker commands (isn't docker great?). I'll follow up shortly.
Taking a quick look at your steps, what happens if you add the option -DCMAKE_C_COMPILER=mpicc
to your cmake
command? Using the default compiler, gcc
, would explain several things you are observing. I'll try to replicate your issue on my end and also this fix to see if that addresses it, in the meantime.
I was able to resolve this, but not in the way (precisely) that I hypothesized above. I will need to make some changes in how libhdf5 is detected/handled by our cmake subsystem. In the meantime, create a symbolic link thusly:
$ ln -s /usr/lib/x86_64-linux-gnu/libhdf5_openmpi.so /usr/lib/x86_64-linux-gnu/libhdf5.so
If you do this and then run the cmake
command (from the build/
directory):
$ cmake .. -DCMAKE_C_COMPILER=mpicc.openmpi
you should see that netCDF has been configured to build with parallel support.
Works like charm. Thanks a million!
Fantastic, glad to hear it. Leaving this open so that I can reference it with a fix.
My actual goal is to build NetCDF fortran but I don't get so far.
I am using a clean docker container to started off from
Install dependencies; In particular the hdf5 parallel build
Grab NetCDF-c v4.7.4
I decided to use
cmake
because the configure script can't findhdf5.h
(although include and library paths are specified correct).-DBUILD_PARALLEL=ON
doesn't seem to have any effect. In any case it saysIf I am trying to build it anyways it cant find
mpi.h
and errors out. Specifying the include dir inCFLAGS
,CPPFLAGS
orCMAKE_CPP_FLAGS
does not help. Any suggestions how to build with NC-4 parallel support it?