build 2.77 KB
Newer Older
gsell's avatar
gsell committed
1
#!/usr/bin/env modbuild
gsell's avatar
gsell committed
2 3 4

declare -rx AR=ar

gsell's avatar
gsell committed
5
pbuild::configure() {
gsell's avatar
gsell committed
6 7
	BLAS_PREFIX=$OPENBLAS_PREFIX
	LAPACK_PREFIX=$OPENBLAS_PREFIX
gsell's avatar
gsell committed
8 9 10 11 12 13 14 15 16

	PARMETIS_INCLUDE_DIRS=$PARMETIS_PREFIX/include
	PARMETIS_LIBRARIES=$PARMETIS_PREFIX/lib/libparmetis.a

	METIS_INCLUDE_DIRS=$PARMETIS_PREFIX/include/metis
	METIS_LIBRARIES=$PARMETIS_PREFIX/lib/libmetis.a

	BLAS_INCLUDE_DIRS="$BLAS_PREFIX/include"
	BLAS_LIBRARY_DIRS="$BLAS_PREFIX/lib"
17
	BLAS_LIBRARY_NAMES="openblas"
gsell's avatar
gsell committed
18 19 20

	LAPACK_INCLUDE_DIRS="$LAPACK_PREFIX/include"
	LAPACK_LIBRARY_DIRS="$LAPACK_PREFIX/lib"
gsell's avatar
gsell committed
21
	LAPACK_LIBRARY_NAMES="openblas"
gsell's avatar
gsell committed
22 23 24 25

	cmake \
           --prefix=$PREFIX \
           -DCMAKE_INSTALL_PREFIX:PATH=$PREFIX \
gsell's avatar
gsell committed
26
           -DCMAKE_CXX_FLAGS:STRING="-DMPICH_IGNORE_CXX_SEEK -fPIC" \
gsell's avatar
gsell committed
27
           -DCMAKE_C_FLAGS:STRING="-DMPICH_IGNORE_CXX_SEEK -fPIC" \
gsell's avatar
gsell committed
28
	   -D CMAKE_CXX_STANDARD:STRING="11" \
gsell's avatar
gsell committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
           -DCMAKE_Fortran_FLAGS:STRING="-fPIC" \
           -D CMAKE_BUILD_TYPE:STRING=DEBUG \
           -D TPL_ENABLE_QT:BOOL=OFF \
           -D TPL_ENABLE_MPI:BOOL=ON \
           -D TPL_ENABLE_BLAS:BOOL=ON \
           -D TPL_ENABLE_LAPACK:BOOL=ON \
           -D TPL_ENABLE_METIS:BOOL=ON \
           -D TPL_ENABLE_ParMETIS:BOOL=ON \
           -D BLAS_LIBRARY_DIRS:PATH="$BLAS_LIBRARY_DIRS" \
           -D BLAS_INCLUDE_DIRS:PATH="$BLAS_LIBRARY_DIRS" \
           -D BLAS_LIBRARY_NAMES:STRING="$BLAS_LIBRARY_NAMES" \
           -D LAPACK_LIBRARY_DIRS:PATH="$LAPACK_LIBRARY_DIRS" \
           -D LAPACK_INCLUDE_DIRS:PATH="$LAPACK_INCLUDE_DIRS" \
           -D LAPACK_LIBRARY_NAMES:STRING="$LAPACK_LIBRARY_NAMES" \
           -D TPL_METIS_INCLUDE_DIRS:PATH=$METIS_INCLUDE_DIRS \
           -D TPL_METIS_LIBRARIES:PATH=$METIS_LIBRARIES \
           -D TPL_ParMETIS_INCLUDE_DIRS:PATH=$PARMETIS_INCLUDE_DIRS \
           -D TPL_ParMETIS_LIBRARIES:PATH=$PARMETIS_LIBRARIES \
           -D Trilinos_ENABLE_Amesos:BOOL=ON \
gsell's avatar
gsell committed
48
           -D Trilinos_ENABLE_Amesos2:BOOL=ON \
gsell's avatar
gsell committed
49 50 51 52 53 54 55 56 57 58 59 60 61
           -D Trilinos_ENABLE_AztecOO:BOOL=ON \
           -D Trilinos_ENABLE_Belos:BOOL=ON \
           -D Trilinos_ENABLE_Epetra:BOOL=ON \
           -D Trilinos_ENABLE_EpetraExt:BOOL=ON \
           -D Trilinos_ENABLE_Galeri:BOOL=ON \
           -D Trilinos_ENABLE_Ifpack:BOOL=ON \
           -D Trilinos_ENABLE_Isorropia:BOOL=ON \
           -D Trilinos_ENABLE_ML:BOOL=ON \
           -D Trilinos_ENABLE_NOX:BOOL=ON \
           -D Trilinos_ENABLE_Optika:BOOL=OFF \
           -D Trilinos_ENABLE_Teuchos:BOOL=ON \
           -D Trilinos_ENABLE_Tpetra:BOOL=ON \
           -D Trilinos_ENABLE_TESTS:BOOL=OFF \
62
           "${MODULE_SRCDIR}" || exit 1
gsell's avatar
gsell committed
63 64
}

gsell's avatar
gsell committed
65 66 67 68 69
pbuild::add_to_group 'MPI'
pbuild::set_runtime_dependencies "${COMPILER}" "${MPI}" 'OpenBLAS' 'parmetis'
pbuild::set_build_dependencies 'cmake' "${COMPILER}" "${MPI}" 'OpenBLAS' 'parmetis'
pbuild::set_docfiles Copyright.txt LICENSE README RELEASE_NOTES
pbuild::make_all
gsell's avatar
gsell committed
70