1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
#! /usr/bin/make -f
export DH_VERBOSE=1
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
GF10_FLAGS:=$(if $(filter $(shell readlink /usr/bin/gfortran), gfortran-10), \
-fallow-invalid-boz -fallow-argument-mismatch, )
export MPICHLIB_CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
export MPICHLIB_CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
export MPICHLIB_CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS)
export MPICHLIB_FFLAGS=$(shell dpkg-buildflags --get FFLAGS) $(GF10_FLAGS)
export MPICHLIB_FCFLAGS=$(shell dpkg-buildflags --get FFLAGS) -cpp $(GF10_FLAGS)
export FFLAGS=$(shell dpkg-buildflags --get FFLAGS | sed -e 's/-g //') $(GF10_FLAGS)
export F77=f77
export TZ=UTC+0
FC:=$(shell basename $(shell readlink /etc/alternatives/f95))
export FC
# Keep old library naming scheme
export MPILIBNAME=mpich
NO_ROMIO_ARCH:= hurd-i386
NO_VERBS_ARCH:= hurd-i386 kfreebsd-amd64 kfreebsd-i386 s390x
NO_FABRIC_ARCH:= hurd-i386 kfreebsd-amd64 kfreebsd-i386 s390x
BUILTIN_ATOMICS_ARCH:= armhf riscv64 hppa
NO_REAL128_ARCH:= armel armhf mipsel hppa m68k sh5
# Pick one as default
NO_CH4_ARCH:= armel armhf i386 mipsel hppa m68k sh5 powerpc x32 mips64el s390x
UCX_ARCH:= amd64 ppc64el arm64
PMIX:= #--with-pmix=/usr/lib/$(DEB_HOST_MULTIARCH)/pmix2
ifneq (,$(findstring " $(DEB_HOST_ARCH)",$(NO_VERBS_ARCH)))
VERBS := --with-ibverbs
endif
ifneq (,$(findstring $(DEB_HOST_ARCH),$(BUILTIN_ATOMICS_ARCH)))
DISABLE_BUILTIN_ATOMICS:= --with-atomic-primitives=no
endif
ifneq (,$(findstring $(DEB_HOST_ARCH),$(NO_FABRIC_ARCH)))
FABRIC := --with-libfabric=/usr
endif
ifneq (,$(findstring $(DEB_HOST_ARCH),$(NO_REAL128_ARCH)))
MPICHLIB_FCFLAGS:=$(MPICHLIB_FCFLAGS) -DNO_REAL128
endif
DEVICE:= --with-device=ch3
UCX:=
#ifeq (,$(findstring $(DEB_HOST_ARCH),$(NO_CH4_ARCH)))
# DEVICE:= --with-device=ch4:ofi
#endif
#ifneq (,$(findstring $(DEB_HOST_ARCH),$(UCX_ARCH)))
# DEVICE:= --with-device=ch4:ucx
# UCX:= --with-ucx=/usr
#endif
extra_flags += \
$(VERBS) \
$(FABRIC) \
$(PMIX) \
$(UCX) \
$(DEVICE) \
$(DISABLE_BUILTIN_ATOMICS) \
--with-pm=hydra \
--with-slurm=/usr \
--with-hwloc-prefix=/usr \
--with-wrapper-dl-type=none \
--enable-shared \
--without-yaksa \
--prefix=/usr \
--enable-fortran=all \
--disable-rpath \
--disable-wrapper-rpath \
--sysconfdir=/etc/mpich \
--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
--includedir=/usr/include/$(DEB_HOST_MULTIARCH)/mpich \
--docdir=/usr/share/doc/mpich
# On sparc and sh4, OPA isn't available, so we need to fallback to
# emulation mode. There's a performance penalty, unfortunately.
ifneq (,$(findstring $(DEB_HOST_GNU_CPU),sparc sh4))
extra_flags += --with-atomic-primitives=no
endif
AUTOGENERATED := $(patsubst %.in,%,$(wildcard debian/*.in))
%: %.in
sed 's%@DEB_HOST_MULTIARCH@%$(DEB_HOST_MULTIARCH)%g' < $< > $@
%:
dh $@
override_dh_autoreconf:
./autogen.sh
#autoreconf -f -i src/mpl src/openpa src/mpi/romio src/pm/hydra \
# src/mpid/ch4/netmod/ucx/ucx src/mpid/ch4/netmod/ofi/libfabric
override_dh_auto_configure: $(AUTOGENERATED)
dh_auto_configure -- $(extra_flags) CPPFLAGS="" CFLAGS="" CXXFLAGS="" FFLAGS="$(FFLAGS)" FCFLAGS="$(FFLAGS)" BASH_SHELL=/bin/bash
( cd src/pm/hydra && ./configure --with-hwloc-prefix=/usr $(DEVICE) FFLAGS="$(FFLAGS)" --prefix=/usr )
override_dh_auto_build-indep:
dh_auto_build -i
# Disable rebuilding pdfs for the moment due to pdflatex problem
cd $(CURDIR)/doc/installguide; rm *.pdf; $(MAKE) install.pdf
cd $(CURDIR)/doc/logging; rm *.pdf; $(MAKE) logging.pdf
# cd $(CURDIR)/doc/smpd; rm *.pdf; $(MAKE) smpd_pmi.pdf
cd $(CURDIR)/doc/userguide; rm *.pdf; $(MAKE) user.pdf
override_dh_auto_install-arch:
dh_auto_install -a
$(MAKE) -C src/pm/hydra install DESTDIR=$(CURDIR)/debian/tmp
# Rename executables (ignore upstream symlinks)
for i in mpicc mpicxx mpifort; do \
(cd debian/tmp/usr/bin/ && mv $$i $$i.mpich); \
done
# Rename manpages
# TODO: manpages not shipped in beta ?
#for i in mpicc mpicxx mpiexec mpif77 mpifort; do \
# (cd debian/tmp/usr/share/man/man1/ && mv $$i.1 $$i.mpich.1);\
#done
# Fix incorrect paths in /usr/bin/mpi{cc,cxx,fort}.mpich
for fn in debian/tmp/usr/bin/mpicc.mpich debian/tmp/usr/bin/mpicxx.mpich \
debian/tmp/usr/bin/mpifort.mpich; do \
sed -i 's:$(CURDIR)/debian/tmp/::g' $$fn ;\
done
execute_after_dh_auto_clean:
$(RM) $(AUTOGENERATED)
override_dh_fixperms-arch:
# Hack. placed here to be run after dh_auto_install _after_ override
chrpath -d debian/*/usr/bin/mpivars debian/*/usr/bin/mpichversion
chrpath -d debian/*/usr/lib/*/lib*.so.*
-rm debian/*/usr/share/doc/mpich/examples/cpi.o
dh_fixperms -a
override_dh_installchangelogs:
dh_installchangelogs README
# Some tests are failing on hurd-i386.
# Disable them, to be investiated later
# disable_test_archs = hurd-i386
disable_test_archs =
# ifneq (,$(filter $(DEB_HOST_ARCH),$(disable_test_archs)))
override_dh_auto_test:
@echo "Don't fail on tests in experimental"
- dh_auto_test || true
# endif
|