netcdf-cxx4: use mpi compile wrapper if needed.#17051
netcdf-cxx4: use mpi compile wrapper if needed.#17051tkameyama wants to merge 5 commits intospack:developfrom
Conversation
|
@WardF @skosukhin can you review this PR? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| def configure_args(self): | ||
| config_args = [] | ||
|
|
||
| if self.spec.satisfies('^mpi'): |
There was a problem hiding this comment.
I would specify the condition like this (like in #16719):
netcdf_c_spec = self.spec['netcdf-c']
if '+mpi' in netcdf_c_spec or '+parallel-netcdf' in netcdf_c_spec:However, the current solution is also fine in my opinion.
There was a problem hiding this comment.
When netcdf-c is updated (For example new variant is added and the variant is needed MPI),
#16719 solution is needed to change netcdf-cxx.
But thi PR is not needed to change.
There was a problem hiding this comment.
The fact that mpi is somewhere in the dependency tree does not necesserily mean that we need to use MPI wrappers. For example, in theory (not in Spack yet), it is possible to build netcdf-c~mpi ^hdf5+mpi and I am not sure that we need to compile netcdf-cxx with mpi wrappers in this case.
There was a problem hiding this comment.
I see.
I Changed to look at variant of netcdf-c.
|
@tkameyama thank you. A few more comments:
Of course, it's fine if you say no to any of this. I just thought that since you seem to be interested in the package, you might want to fix some other issues as well. |
Add patch to append libnetcdf to LIBS.
4ff111c to
5f00b16
Compare
I faild to compile plugins/H5Zbzip2.c.
I think it's better to solve this problem by adding -lnetcdf to LIBS in the configure script.
Maybe we still need it. |
I understand this problem. Nomally, If we want too use libnetcdf, we use AC_SEARCH_LIBS in configure.ac. But currently when nc-config is found, configure.ac skip AC_SEARCH_LIBS, and LIBS variable is not updated. libnetcdf_so.4.3.1.patch append output of |
|
@skosukhin @tkameyama Is this something we still want or can we close the PR? |
|
Closing this PR as stale, but feel free to reopen if you want to continue working on it. |
If netcdf-c was compiled with MPI, netcdf-cxx4 is compiled with mpicc and mpicxx.