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

l_opal's avatar
l_opal committed
3
pbuild::set_download_url "http://ftp.gromacs.org/pub/$P/$P-${V_PKG}.tar.gz"
gsell's avatar
gsell committed
4

gsell's avatar
gsell committed
5
pbuild::add_to_group 'MPI'
6

7 8 9 10 11
if (( V_MAJOR <= 2018 )); then
  pbuild::install_docfiles ACKNOWLEDGMENTS COPYING MANIFEST README.txt
else
  pbuild::install_docfiles AUTHORS COPYING README
fi
l_opal's avatar
l_opal committed
12 13

pbuild::pre_configure() {
14 15 16
  pbuild::add_configure_args "-DCMAKE_BUILD_TYPE=RELEASE"
  pbuild::add_configure_args "-DGMX_MPI=on"

17
  if pbuild::use_flag dp ; then
18
    pbuild::add_configure_args "-DGFMX_DOUBLE=on"
19
  else # pbuild::use_flag sp
20
    pbuild::add_configure_args "-DGFMX_DOUBLE=off"
21
  fi
22

23
  if pbuild::use_flag "gpu"; then
24 25
 	pbuild::add_configure_args "-DGMX_GPU=on"
  else
26
 	pbuild::add_configure_args "-DGMX_GPU=off"
27
  fi
28

Caubet Serrabou Marc's avatar
Caubet Serrabou Marc committed
29 30 31 32 33
  # For GMX_SIMD the lowest instruction number you think might work on all nodes
  #   |- Available numbers: http://manual.gromacs.org/documentation/2020/install-guide/index.html#simd-support
  #   |- AVX_512 is only for newest Intel processors (Xeon Scalable Gold, Core i9, etc.)
  #      AVX_512 will not work on old GPUs, this is why we chood AVX2_256 which are processors from 2013
  pbuild::add_configure_args "-DGMX_SIMD=AVX2_256"
34
  pbuild::add_configure_args "-DGMX_BUILD_OWN_FFTW=on"
l_opal's avatar
l_opal committed
35
}