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
|
export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
ARCH_IGNORE_TEST_ERROR = ia64 x32
empty :=
space := $(empty)$(empty)
IGNORE_TEST_ERROR=/bin/false
ifneq (,$(findstring $(space)$(DEB_HOST_ARCH)$(space), $(space)$(ARCH_IGNORE_TEST_ERROR)$(space)))
IGNORE_TEST_ERROR=/bin/true
endif
export OMPI_MCA_plm_rsh_agent=/bin/false
export OMPI_MCA_rmaps_base_oversubscribe=1
export BUILDDIR = obj-$(DEB_HOST_GNU_TYPE)
%:
dh $@ --buildsystem=cmake --with fortran_mod
override_dh_clean:
dh_clean
rm -f make.inc FORTRAN/superlu_dist_config.fh SRC/superlu_dist_config.h
override_dh_auto_configure:
dh_auto_configure -- \
-DBUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH=ON \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DXSDK_ENABLE_Fortran=ON \
-DCMAKE_FORTRAN_COMPILER=mpifort \
-DMPIEXEC_PREFLAGS=--allow-run-as-root \
-DCMAKE_INSTALL_INCLUDEDIR=include/superlu-dist \
-Denable_complex16=ON \
-DTPL_ENABLE_INTERNAL_BLASLIB=OFF -DTPL_BLAS_LIBRARIES=/usr/lib/$(DEB_HOST_MULTIARCH)/libblas.so \
-DTPL_ENABLE_LAPACKLIB=ON -DTPL_LAPACK_LIBRARIES=/usr/lib/$(DEB_HOST_MULTIARCH)/liblapack.so \
-DTPL_ENABLE_PARMETISLIB=ON \
-DTPL_PARMETIS_LIBRARIES="-lparmetis -lmetis" \
-DTPL_PARMETIS_INCLUDE_DIRS="/usr/include/parmetis" \
-DTPL_ENABLE_COMBBLASLIB=ON \
-DTPL_COMBBLAS_LIBRARIES="-lCombBLAS -lGraphGenlib -lUsortlib" \
-DTPL_COMBBLAS_INCLUDE_DIRS=/usr/include/CombBLAS/ \
|| /bin/true
override_dh_auto_test:
export LD_LIBRARY_PATH=$(CURDIR)/$(BUILDDIR)/SRC:$${LD_LIBRARY_PATH}; \
OMP_NUM_THREADS=1 LD_LIBRARY_PATH=$${LD_LIBRARY_PATH} dh_auto_test --max-parallel=1 || $(IGNORE_TEST_ERROR)
override_dh_install:
dh_install
for testfile in $$( find debian/libsuperlu-dist-dev -name CTestTestfile.cmake ); do \
sed -e "s|$(CURDIR)|<<builddir>>/superlu-dist|g;" \
-i $$testfile; \
sed -r "s|(.*)\".*/(EXAMPLE/.*ua)|\1\"/usr/lib/$(DEB_HOST_MULTIARCH)/superlu-dist/tests/\2|" \
-i $$testfile; \
done
|