Skip to content
Snippets Groups Projects
Commit 209cedf8 authored by Martin Lang's avatar Martin Lang
Browse files

Merge branch 'cleanup' into 'develop'

Remove unused files and directories

See merge request !113
parents 6ec9d24c 4f690c0e
No related branches found
No related tags found
1 merge request!113Remove unused files and directories
Showing
with 0 additions and 591 deletions
FROM debian:bullseye
ENV MPSD_OS=linux-debian11
ARG toolchain=foss2021a-mpi # or foss2021a-serial
ENV TERM=xterm-256color
# Get basic packages to setup mpsd mirror
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
wget \
&& rm -rf /var/lib/apt/lists/*
#Set the MPSD mirrors
COPY docker /root/docker
RUN echo "deb http://mpsd-deb-bullseye.desy.de/debian/ bullseye main non-free contrib" > /etc/apt/sources.list && \
echo "deb http://mpsd-deb-bullseye.desy.de/debian-security/ bullseye-security main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://mpsd-deb-bullseye.desy.de/debian/ bullseye-updates main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://mpsd-deb-bullseye.desy.de/debian/ bullseye-backports main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://mpsd-deb-bullseye.desy.de/debian-mpsd/ mpsd-bullseye/" >> /etc/apt/sources.list && \
echo "deb http://mpsd-deb-bullseye.desy.de/debian-mpsd/ mpsd-bullseye-nonfree/" >> /etc/apt/sources.list && \
echo "deb http://mpsd-deb-bullseye.desy.de/debian-mpsd/ mpsd-bullseye-3rdparty/" >> /etc/apt/sources.list && \
echo "deb http://mpsd-deb-bullseye.desy.de/debian-mpsd/ mpsd-bullseye-backports/" >> /etc/apt/sources.list && \
echo "deb http://mpsd-deb-bullseye.desy.de/debian-mpsd/ mpsd-bullseye-easybuild/" >> /etc/apt/sources.list && \
apt-key add /root/docker/MPSD.asc && \
apt-get -y update
# Convenience tools, if desired for debugging etc
# RUN apt-get -y install wget time nano vim emacs git
# From https://github.com/ax3l/dockerfiles/blob/master/spack/base/Dockerfile:
# install minimal spack dependencies
RUN apt-get install -y --no-install-recommends \
autoconf \
build-essential \
coreutils \
file \
gfortran \
git \
openssh-server \
python-is-python3 \
unzip \
vim \
nano \
rsync \
sudo \
lmod \
automake \
libtool \
linux-headers-$(uname -r) \
&& rm -rf /var/lib/apt/lists/*
# Run the commands to setup spack and install the toolchain
RUN adduser user
USER user
## move the spack-environments repository in to the docker
RUN mkdir -p /home/user/spack-environments/
COPY . /home/user/spack-environments/
WORKDIR /home/user/spack-environments/
## setup the toolchains
# RUN ssh-keygen -b 2048 -t rsa -f /home/user/.ssh/id_rsa -q -N "" && \
# eval `ssh-agent -s` && \
# ssh-add ~/.ssh/id_rsa
RUN gpg --import /home/user/spack-environments/docker/MPSD.asc
RUN /bin/bash /home/user/spack-environments/spack_setup.sh -b ${toolchain}
# If testing toolchains, load the freshly made toolchain and compile octopus and run checks
# If the toolchain variable is 'global' then exit(0) and do nothing else clone octopus, load toolchains and make and test octopus
ENV MODULEPATH=/home/user/spack-environments/lmod/Core:/etc/lmod/modules:/usr/share/lmod/lmod/modulefiles
ENV MPIEXEC=orterun
ENV OMP_NUM_THREADS=1
ENV OCT_TEST_NJOBS=4
ENV OCT_TEST_MPI_NPROCS=2
RUN if [ "${toolchain}" = "global" ]; \
then exit 0; \
else \
git clone https://gitlab.com/octopus-code/octopus /home/user/octopus ; \
fi
# USER root
#TODO module load the toolchain then make octopus
RUN if [ "${toolchain}" = "global" ]; \
then exit 0; \
else \
. /usr/share/lmod/lmod/init/bash ; module load toolchains/${toolchain} && \
cd /home/user/octopus && \
autoreconf -i && \
mkdir _build && \
cd _build && \
echo "sourcing configure with ${MPSD_OCTOPUS_CONFIGURE}" && \
bash "$MPSD_OCTOPUS_CONFIGURE" --prefix=/home/user/octopus/_build/installed && \
make -j 16 && \
make install ; \
fi
RUN if [ "${toolchain}" = "global" ]; \
then exit 0; \
else \
. /usr/share/lmod/lmod/init/bash ; \
module load toolchains/${toolchain} && \
cd /home/user/octopus/_build && \
make check-short | tee /home/user/octopus/_build/check-short.log ; exit 0 ; \
fi
# we add the exit 0 to make sure the container doesn't fail if the tests fail
# the python script bellow determines from the log if the tests failures can be ignored or not
RUN if [ "${toolchain}" = "global" ]; \
then exit 0; \
else \
python /home/user/spack-environments/docker/check_buildlog.py /home/user/octopus/_build/check-short.log ${toolchain}|| /bin/true ; \
fi
CMD /bin/bash -l
# make targets for making and runing the spack-environments
# image - make ocotpus using "toolchain=foss2021a-mpi"
# image-serial - make octopus using "toolchain=foss2021a-serial"
# no-cache variants do not use docker cache
# run - run the latest container
# run-mount - mounts a folder ../tmps to /tmps in docker ( make sure it exists in host before running)
#
# The docker containers are tagged with the git branch name
gitBranch=`git rev-parse --abbrev-ref HEAD | sed 's/[^a-zA-Z0-9]/-/g'`
image : image-mpi
# Mainstream images
image-mpi: image-foss2021a-mpi
image-serial: image-foss2022a-serial
image-global-packages: image-foss2021a-global-packages
image-cuda-mpi: image-foss2021a-cuda-mpi
# All possible toolchains
image-foss2021a-serial:
docker build --build-arg "toolchain=foss2021a-serial" -f Dockerfile -t spack-environments-serial:${gitBranch} .
image-foss2021a-mpi:
docker build --build-arg "toolchain=foss2021a-mpi" -f Dockerfile -t spack-environments-mpi:${gitBranch} .
image-foss2021a-cuda-mpi:
docker build --build-arg "toolchain=foss2021a-cuda-mpi" -f Dockerfile -t spack-environments-cuda-mpi:${gitBranch} .
image-foss2021a-global-packages :
docker build --build-arg "toolchain=global" -f Dockerfile -t spack-environments-global:${gitBranch} .
image-foss2022a-serial:
docker build --build-arg "toolchain=foss2022a-serial" -f Dockerfile -t spack-environments-serial:${gitBranch} .
image-foss2022a-mpi:
docker build --build-arg "toolchain=foss2022a-mpi" -f Dockerfile -t spack-environments-mpi:${gitBranch} .
image-no-cache :
docker build --no-cache -f Dockerfile -t spack-environments:${gitBranch} .
image-serial-no-cache :
docker build --no-cache --build-arg "toolchain=foss2021a-serial" -f Dockerfile -t spack-environments-serial:${gitBranch} .
run: run-mpi
run-mpi:
docker run -ti -v $PWD:/io spack-environments-mpi:${gitBranch} env TERM=xterm-256color bash -l
run-serial:
docker run -ti -v $PWD:/io spack-environments-serial:${gitBranch} env TERM=xterm-256color bash -l
run-global:
docker run -ti -v $PWD:/io spack-environments-global:${gitBranch} env TERM=xterm-256color bash -l
\ No newline at end of file
#!/usr/bin/perl
# HG: perl one-liner as a program, with a bit
# better error handling
# process template file by substituting environment variables
#
# usage:
#
# export blah=42
# export blubb=2
#
# template_process [-i <var1>[,<var2>] ] <file>
#
# file: (input text file, containing ##blah##-style strings)
#
use strict;
use warnings;
use Getopt::Std;
our ($opt_i);
getopts('i:');
my %IGNORE_EMPTY;
map { $IGNORE_EMPTY{$_}=1 } split (',',$opt_i) if ($opt_i);
my $errorcode=0;
while (<>) {
my $src_line = $_;
my $result = '';
my $previous_match_end = 0;
while ($src_line =~ /##([\w-]+)##/g) {
$result .= substr($src_line, $previous_match_end, $-[0]-$previous_match_end);
my $SUBVAL="error";
if ((exists $ENV{$1}) and ($ENV{$1} ne '')) {
$SUBVAL=$ENV{$1};
} elsif (exists $IGNORE_EMPTY{$1}) {
$SUBVAL='';
} else {
print STDERR "$1 not in env!\n";
$SUBVAL="##!$1_not_in_env!##";
$errorcode|=1;
}
$result .= $SUBVAL;
$previous_match_end = $+[0];
}
$result .= substr($src_line, $previous_match_end);
$_ = $result;
print;
}
exit($errorcode);
#!/usr/bin/python3
import sys
import yaml
# Add flags for the correct gcc to the section of the given compiler in compilers.yaml
# used to add gcc information to intel (and in the future oneapi) compiler
# $script_dir/bin/update_intel_compilers_yaml <path/to/compilers.yaml> "intel@=2021.10.2" \
# "-gcc-name=<path/to/gcc>/bin/gcc" "-gcc-name=<path/to/gcc>/bin/g++" "-gcc-name=<path/to/gcc>/bin/gcc" \
# "12.2.0"
file_name, compiler_spec, cflags, cxxflags, fflags = sys.argv[1:]
with open(file_name) as f:
compilers_yaml = yaml.load(f, Loader=yaml.Loader)
for compiler in compilers_yaml["compilers"]:
if compiler["compiler"]["spec"] == compiler_spec:
compiler["compiler"]["flags"]["cflags"] = cflags
compiler["compiler"]["flags"]["cxxflags"] = cxxflags
compiler["compiler"]["flags"]["fflags"] = fflags
with open(file_name, "w") as f:
yaml.dump(compilers_yaml, stream=f, Dumper=yaml.Dumper)
# gpg key of mpsd mini-dinstall server 2048R/C2E2FE18
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFZUeMABCADUT5PboH5oUzI1Of7aB79D7DfxvKSBiQzHD9ds+OnkWBNpyqWs
WZRWpt3a32WfKRMstDeCh1Xvwy6gDUMTVM+UZhtVJ31weKWrBxYOqaQTdTyIk+39
7xkkV0gJv7votbU1soHXGGGXJPy5X+TuiV809SRaxFgqazC+v0bp+Izx3J0gv0uA
PdYqVQL6NIPMTSHd/cKgWF1HNGdCbYTeTT1O5oTVDV+5HbCEA52BjNGEUJeV5f7s
zwym7ZH1g8vHLqSFdybxYBVi+51gQF9sWlsCOgMu8D560+jaOG6VGNgzv2SVs36i
H/jdUQA2NxkBEE9oBdvtx9mgmH5f84NvhFy/ABEBAAG0OE1QU0QgTWluaS1EaW5z
dGFsbCAoUHNldWRvLXVzZXIpIDxtaW5pLWRpbnN0YWxsQG1wc2RmYWk+iQE3BBMB
CAAhAhsDAh4BAheABQJZqWk1BQsJCAcDBRUKCQgLBRYCAwEAAAoJEGZ8MAHC4v4Y
wL0H/R91k3elMdzstkc2GAskRahwDj2VgwEGfMoY1v8OFoZ6qXQKcviPIbn9dkbM
Ng51CiRhoQnYzEJDyACLZDKB2C99lllk01LQM5ZuZpUaSwzScNZIPUUtAgh+hIU8
rBw4VqflRCfkL4YdP6seVM0dLYoztwtMFNjAzUQquwD7hnlfRWoNta+MBXMzM/KG
OQiQsbFT0k9489zSgXAwaK+TglLvISGttohDa2d0k9sDUBqVUXEbgCnipmbJw3+Y
uPBjkBavrtZOKRBDZqxVVh1GeVnHAWiHrTxdOXqAub6530U2dAOFw4XXVzAgWdl9
sueKz/Ewd10At90OmHEG7RgPlNC5AQ0EVlR4wAEIALrR+/3oaCjANJs5HOtgKWPw
YcQz54dCkwXDWlh0WFwpgiGcNZfvVT/y8ZG8TmZp8BuSi7x1pOfGPbkqF4S7qayD
E09WSPog19Ox7HYAHR9BhQEVuQ8o12FfsAb89vfibmWkqzJr/rFY0nLbWE7qkhO0
7hutS1/jKe/1OPKLQuxqiWlSXucDAm8npr3mobhsqNlN8rYnSZUY9GLuq3Fv+rQt
sX3ngY5PlYt/BbMvV7kxVjl1szHZJ/yJwAxv37I6GLZkTkFKG90iAX8IZg08FT6q
eVxuNe864FdSxCJDm+sdSYNixX334GickFbMzeQvBjDFbdTOsKVhHxYk6yRlK0sA
EQEAAYkBHwQYAQIACQUCVlR4wAIbDAAKCRBmfDABwuL+GLPzCACtU+YGX2U4yu4d
OVovWBoY9Re2EO6KCst8YRYdR44JhaeznEEP7JupzwUdQfdzHfOVzZ/SCHU71RCn
BSuHu/SYW7e8e5nQTq+q6VDLzkIq8cdX1Cw26W7ynvWkk/vDIn6AjQqgUr5x4Q3R
Ppr7/1zn4Gs63QneIPv3TU+MM0liBFSPVjOVEDUgfDtD2pw02GpVRLo8bIJD43rz
4f1n+G5WaUmPgeGpt/KYLUJsJmIuzwezISElC53j7kpjqEeJR0XwnS65QT8lO2g+
lbifQSD7+PermjG9lXaOTXpMjdaxTOg7njf6auseDwlB4O0F1eYdhY1zOv/rkItc
jpXPgC33
=9xdF
-----END PGP PUBLIC KEY BLOCK-----
# A simple script to check the log file of `make check or `make check-short`
# and report the number of failed tests.
# And if the failed tests are ignorable.
# (errors due to tight thresholds, for example) or needs attention.
import sys
import re
ignored_test_list = {
"foss2021a-mpi": [
"finite_systems_2d/06-gdlib.test",
"finite_systems_3d/30-local_multipoles.test",
"periodic_systems/11-silicon_force.test",
],
"foss2021a-serial": [
"components/07-cholesky serial.test",
"finite_systems_2d/06-gdlib.test",
],
"foss2022a-serial":[
"components/07-cholesky serial.test",
"finite_systems_2d/06-gdlib.test",
],
}
def check_log(log_file):
with open(log_file, "r") as f:
logs = f.readlines()
# extract the last lines that has the format
# |Status: 1 failures
# | Passed: 139 / 142
# | Skipped: 0 / 142
# | Failed: 3 / 142
# |
# | testfile # failed testcases
# | ------------------------------------------------------------------------------
# | finite_systems_2d/06-gdlib.test 1
# | finite_systems_3d/30-local_multipoles.test 2
# | periodic_systems/11-silicon_force.test 1
# |
# |Total run-time of the testsuite: 03:27:12
# and extract the list of failed test files like
# finite_systems_2d/06-gdlib.test,
# finite_systems_3d/30-local_multipoles.test,
# periodic_systems/11-silicon_force.test
# from this example, by scanning from the end of the log file
# starting from the line that has the format
# `Total run-time of the testsuite:`
# and stop when the first line with the format
# `' -------------------------------------`
test_lists = []
reversed_logs = reversed(logs)
while not next(reversed_logs).startswith(
"Total run-time of the testsuite:"
):
pass
while not re.match(r" +-+", (line := next(reversed_logs))):
if not line == "\n": # skip blank lines
test_lists.append(line.split()[0])
if not test_lists:
print("No failed tests")
sys.exit(0)
unexpected_failures = [
test
for test in test_lists
if test not in ignored_test_list[used_toolchain]
]
if unexpected_failures:
print("Found {} unexpected failures".format(len(unexpected_failures)))
print("Unexpected failures : \n" + ", \n".join(unexpected_failures))
print("Built with tool chain : " + used_toolchain)
sys.exit(len(unexpected_failures))
print("All failed tests are ignored")
if __name__ == "__main__":
try:
log_file = sys.argv[1]
except IndexError:
print("Usage: python3 check_buildlog.py log_file toolchain[optional]")
sys.exit(1)
try:
used_toolchain = sys.argv[2]
except IndexError:
print("No toolchain specified, assuming the default foss2021a-mpi")
used_toolchain = "foss2021a-mpi"
check_log(log_file)
# Compiling `octopus` using the new spack-generated modules
## Load dependencies via modules
```bash
mpsd-modules 24a -m $MPSD_MICROARCH # compilation with "generic" sandybrigde is possible by omitting '-m ...'
module load toolchain/foss2022b-mpi octopus-dependencies/full
```
Optionally list all loaded modules if desired.
```bash
module list
```
## Configure and compile `octopus`
- create octopus build dir (e.g. in octopus dir, `mkdir _build`), and chdir to it
- optionally set `GCC_ARCH=native` (or another target microarchitecture to optimise code for)
- if you are not in a direct subdir of octopus, do `export OCTOPUS_SRC=/path/to/octopus`
- `source $MPSD_OCTOPUS_CONFIGURE [... other-octopus-configure-options ...]`
- `make`
- optionally: (`MPIEXEC="orterun" make check`)
#!/bin/sh
export CC="mpicc"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
OPTIMISATION_LEVEL="-O3"
export CFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments"
export CXX="mpicxx"
export CXXFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments"
export FC="mpif90"
export FCFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
# default to the parent directory unless OCTOPUS_SRC is set
[ "${OCTOPUS_SRC+1}" ] || export OCTOPUS_SRC='..'
# help configure to find the ELPA F90 modules and libraries
try_mpsd_elpa_version=`expr match "$MPSD_ELPA_ROOT" '.*/elpa-\([0-9.]\+\)'`
if [ -n "$try_mpsd_elpa_version" ] ; then
if [ -r $MPSD_ELPA_ROOT/include/elpa_openmp-$try_mpsd_elpa_version/modules/elpa.mod ]; then
export FCFLAGS_ELPA="-I$MPSD_ELPA_ROOT/include/elpa_openmp-$try_mpsd_elpa_version/modules"
export LIBS_ELPA="-lelpa_openmp"
elif [ -r $MPSD_ELPA_ROOT/include/elpa-$try_mpsd_elpa_version/modules/elpa.mod ] ; then
export FCFLAGS_ELPA="-I$MPSD_ELPA_ROOT/include/elpa-$try_mpsd_elpa_version/modules"
fi
fi
unset try_mpsd_elpa_version
# always keep options in the order listed by ``configure --help``
$OCTOPUS_SRC/configure \
--enable-mpi \
--enable-openmp \
--enable-cuda \
--with-libxc-prefix="$MPSD_LIBXC_ROOT" \
--with-libvdwxc-prefix="$MPSD_LIBVDWXC_ROOT" \
--with-blas="-L$MPSD_OPENBLAS_ROOT/lib -lopenblas" \
--with-gsl-prefix="$MPSD_GSL_ROOT" \
--with-fftw-prefix="$MPSD_FFTW_ROOT" \
--with-pfft-prefix="$MPSD_PFFT_ROOT" \
--with-nfft="$MPSD_NFFT_ROOT" \
--with-pnfft-prefix="$MPSD_PNFFT_ROOT" \
--with-berkeleygw-prefix="$MPSD_BERKELEYGW_ROOT" \
--with-sparskit="$MPSD_SPARSKIT_ROOT/lib/libskit.a" \
--with-nlopt-prefix="$MPSD_NLOPT_ROOT" \
--with-blacs="-L$MPSD_NETLIB_SCALAPACK_ROOT/lib -lscalapack" \
--with-scalapack="-L$MPSD_NETLIB_SCALAPACK_ROOT/lib -lscalapack" \
--with-elpa-prefix="$MPSD_ELPA_ROOT" \
--with-cgal="$MPSD_CGAL_ROOT" \
--with-boost="$MPSD_BOOST_ROOT" \
--with-metis-prefix="$MPSD_METIS_ROOT" \
--with-parmetis-prefix="$MPSD_PARMETIS_ROOT" \
--with-psolver-prefix="$MPSD_BIGDFT_PSOLVER_ROOT" \
--with-futile-prefix="$MPSD_BIGDFT_FUTILE_ROOT" \
--with-atlab-prefix="$MPSD_BIGDFT_ATLAB_ROOT" \
--with-dftbplus-prefix="$MPSD_DFTBPLUS_ROOT" \
--with-netcdf-prefix="$MPSD_NETCDF_FORTRAN_ROOT" \
--with-etsf-io-prefix="$MPSD_ETSF_IO_ROOT" \
"$@" | tee 00-configure.log 2>&1
echo "-------------------------------------------------------------------------------" >&2
echo "configure output has been saved to 00-configure.log" >&2
if [ "x${GCC_ARCH-}" = x ] ; then
echo "Microarchitecture optimization: native (set \$GCC_ARCH to override)" >&2
else
echo "Microarchitecture optimization: $GCC_ARCH (from override \$GCC_ARCH)" >&2
fi
echo "-------------------------------------------------------------------------------" >&2
#!/bin/sh
export CC="mpicc"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
OPTIMISATION_LEVEL="-O3"
export CFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments"
export CXX="mpicxx"
export CXXFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments"
export FC="mpif90"
export FCFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
# default to the parent directory unless OCTOPUS_SRC is set
[ "${OCTOPUS_SRC+1}" ] || export OCTOPUS_SRC='..'
# help configure to find the ELPA F90 modules and libraries
try_mpsd_elpa_version=`expr match "$MPSD_ELPA_ROOT" '.*/elpa-\([0-9.]\+\)'`
if [ -n "$try_mpsd_elpa_version" ] ; then
if [ -r $MPSD_ELPA_ROOT/include/elpa_openmp-$try_mpsd_elpa_version/modules/elpa.mod ]; then
export FCFLAGS_ELPA="-I$MPSD_ELPA_ROOT/include/elpa_openmp-$try_mpsd_elpa_version/modules"
export LIBS_ELPA="-lelpa_openmp"
elif [ -r $MPSD_ELPA_ROOT/include/elpa-$try_mpsd_elpa_version/modules/elpa.mod ] ; then
export FCFLAGS_ELPA="-I$MPSD_ELPA_ROOT/include/elpa-$try_mpsd_elpa_version/modules"
fi
fi
unset try_mpsd_elpa_version
# always keep options in the order listed by ``configure --help``
$OCTOPUS_SRC/configure \
--enable-mpi \
--enable-openmp \
--with-libxc-prefix="$MPSD_LIBXC_ROOT" \
--with-libvdwxc-prefix="$MPSD_LIBVDWXC_ROOT" \
--with-blas="-L$MPSD_OPENBLAS_ROOT/lib -lopenblas" \
--with-gsl-prefix="$MPSD_GSL_ROOT" \
--with-fftw-prefix="$MPSD_FFTW_ROOT" \
--with-pfft-prefix="$MPSD_PFFT_ROOT" \
--with-nfft="$MPSD_NFFT_ROOT" \
--with-pnfft-prefix="$MPSD_PNFFT_ROOT" \
--with-berkeleygw-prefix="$MPSD_BERKELEYGW_ROOT" \
--with-sparskit="$MPSD_SPARSKIT_ROOT/lib/libskit.a" \
--with-nlopt-prefix="$MPSD_NLOPT_ROOT" \
--with-blacs="-L$MPSD_NETLIB_SCALAPACK_ROOT/lib -lscalapack" \
--with-scalapack="-L$MPSD_NETLIB_SCALAPACK_ROOT/lib -lscalapack" \
--with-elpa-prefix="$MPSD_ELPA_ROOT" \
--with-cgal="$MPSD_CGAL_ROOT" \
--with-boost="$MPSD_BOOST_ROOT" \
--with-metis-prefix="$MPSD_METIS_ROOT" \
--with-parmetis-prefix="$MPSD_PARMETIS_ROOT" \
--with-psolver-prefix="$MPSD_BIGDFT_PSOLVER_ROOT" \
--with-futile-prefix="$MPSD_BIGDFT_FUTILE_ROOT" \
--with-atlab-prefix="$MPSD_BIGDFT_ATLAB_ROOT" \
--with-dftbplus-prefix="$MPSD_DFTBPLUS_ROOT" \
--with-netcdf-prefix="$MPSD_NETCDF_FORTRAN_ROOT" \
--with-etsf-io-prefix="$MPSD_ETSF_IO_ROOT" \
"$@" | tee 00-configure.log 2>&1
echo "-------------------------------------------------------------------------------" >&2
echo "configure output has been saved to 00-configure.log" >&2
if [ "x${GCC_ARCH-}" = x ] ; then
echo "Microarchitecture optimization: native (set \$GCC_ARCH to override)" >&2
else
echo "Microarchitecture optimization: $GCC_ARCH (from override \$GCC_ARCH)" >&2
fi
echo "-------------------------------------------------------------------------------" >&2
#!/bin/sh
export CC="gcc"
MARCH_FLAG="-march=${GCC_ARCH:-native}"
OPTIMISATION_LEVEL="-O3"
export CFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments"
export CXX="g++"
export CXXFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments"
export FC="gfortran"
export FCFLAGS="$MARCH_FLAG $OPTIMISATION_LEVEL -g -fno-var-tracking-assignments -ffree-line-length-none -fallow-argument-mismatch -fallow-invalid-boz"
# default to the parent directory unless OCTOPUS_SRC is set
[ "${OCTOPUS_SRC+1}" ] || export OCTOPUS_SRC='..'
# help configure to find the ELPA F90 modules and libraries
try_mpsd_elpa_version=`expr match "$MPSD_ELPA_ROOT" '.*/elpa-\([0-9.]\+\)'`
if [ -n "$try_mpsd_elpa_version" ] ; then
if [ -r $MPSD_ELPA_ROOT/include/elpa_openmp-$try_mpsd_elpa_version/modules/elpa.mod ]; then
export FCFLAGS_ELPA="-I$MPSD_ELPA_ROOT/include/elpa_openmp-$try_mpsd_elpa_version/modules"
export LIBS_ELPA="-lelpa_openmp"
elif [ -r $MPSD_ELPA_ROOT/include/elpa-$try_mpsd_elpa_version/modules/elpa.mod ] ; then
export FCFLAGS_ELPA="-I$MPSD_ELPA_ROOT/include/elpa-$try_mpsd_elpa_version/modules"
fi
fi
unset try_mpsd_elpa_version
# always keep options in the order listed by ``configure --help``
$OCTOPUS_SRC/configure \
--enable-openmp \
--with-libxc-prefix="$MPSD_LIBXC_ROOT" \
--with-libvdwxc-prefix="$MPSD_LIBVDWXC_ROOT" \
--with-blas="-L$MPSD_OPENBLAS_ROOT/lib -lopenblas" \
--with-gsl-prefix="$MPSD_GSL_ROOT" \
--with-fftw-prefix="$MPSD_FFTW_ROOT" \
--with-nfft="$MPSD_NFFT_ROOT" \
--with-netcdf-prefix="$MPSD_NETCDF_ROOT" \
--with-etsf-io-prefix="$MPSD_ETSF_IO_ROOT" \
--with-berkeleygw-prefix="$MPSD_BERKELEYGW_ROOT" \
--with-sparskit="$MPSD_SPARSKIT_ROOT/lib/libskit.a" \
--with-nlopt-prefix="$MPSD_NLOPT_ROOT" \
--with-cgal="$MPSD_CGAL_ROOT" \
--with-boost="$MPSD_BOOST_ROOT" \
--with-metis-prefix="$MPSD_METIS_ROOT" \
--with-psolver-prefix="$MPSD_BIGDFT_PSOLVER_ROOT" \
--with-futile-prefix="$MPSD_BIGDFT_FUTILE_ROOT" \
--with-atlab-prefix="$MPSD_BIGDFT_ATLAB_ROOT" \
--with-dftbplus-prefix="$MPSD_DFTBPLUS_ROOT" \
--with-netcdf-prefix="$MPSD_NETCDF_FORTRAN_ROOT" \
--with-etsf-io-prefix="$MPSD_ETSF_IO_ROOT" \
"$@" | tee 00-configure.log 2>&1
echo "-------------------------------------------------------------------------------" >&2
echo "configure output has been saved to 00-configure.log" >&2
if [ "x${GCC_ARCH-}" = x ] ; then
echo "Microarchitecture optimization: native (set \$GCC_ARCH to override)" >&2
else
echo "Microarchitecture optimization: $GCC_ARCH (from override \$GCC_ARCH)" >&2
fi
echo "-------------------------------------------------------------------------------" >&2
foss-cuda-mpi-config.sh
\ No newline at end of file
foss-mpi-config.sh
\ No newline at end of file
foss-serial-config.sh
\ No newline at end of file
foss-cuda-mpi-config.sh
\ No newline at end of file
foss-mpi-config.sh
\ No newline at end of file
foss-serial-config.sh
\ No newline at end of file
foss-cuda-mpi-config.sh
\ No newline at end of file
foss-mpi-config.sh
\ No newline at end of file
foss-serial-config.sh
\ No newline at end of file
foss-cuda-mpi-config.sh
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment