Skip to content

Commit

Permalink
Package 'cdo': get rid of unnecessary dependency on MPI C++ library. (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
skosukhin authored and junghans committed Dec 17, 2017
1 parent 2a63909 commit 576ef5e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions var/spack/repos/builtin/packages/cdo/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class Cdo(AutotoolsPackage):
url = 'https://code.mpimet.mpg.de/attachments/download/12760/cdo-1.7.2.tar.gz'
list_url = 'https://code.mpimet.mpg.de/projects/cdo/files'

maintainers = ['skosukhin']

version('1.9.1', 'e60a89f268ba24cee5c461f2c217829e')
version('1.9.0', '2d88561b3b4a880df0422a62e5027e40')
version('1.8.2', '6a2e2f99b7c67ee9a512c40a8d4a7121')
Expand Down Expand Up @@ -133,8 +135,13 @@ def configure_args(self):

config_args += self.enable_or_disable('openmp')

# Workaround for a problem in CDO
# Starting version 1.9.0 CDO is a C++ program but it uses the C
# interface of HDF5 without the parallel features. To avoid
# unnecessary dependencies on mpi's cxx library, we need to set the
# following flags. This works for OpenMPI, MPICH, MVAPICH, Intel MPI,
# IBM Spectrum MPI, bullx MPI, and Cray MPI.
if self.spec.satisfies('@1.9:+hdf5^hdf5+mpi'):
config_args.append('CXX=' + self.spec['mpi'].mpicxx)
config_args.append(
'CPPFLAGS=-DOMPI_SKIP_MPICXX -DMPICH_SKIP_MPICXX')

return config_args

0 comments on commit 576ef5e

Please sign in to comment.