Added cleanup
This commit is contained in:
parent
97d2789951
commit
ac6ab1c548
103
Champ/champ.def
103
Champ/champ.def
@ -11,6 +11,7 @@ From: ubuntu:22.04
|
||||
export LANG="C"
|
||||
export LANGUAGE=$LANG
|
||||
export LC_ALL=$LANG
|
||||
export OMP_NUM_THREADS=1
|
||||
|
||||
%files
|
||||
champ.def /opt/install/champ.def
|
||||
@ -28,104 +29,14 @@ From: ubuntu:22.04
|
||||
cd /opt/install
|
||||
./setup_image.sh
|
||||
./install_oneapi.sh
|
||||
./install_trexio.sh
|
||||
./install_trexio_python.sh
|
||||
./install_qmckl.sh
|
||||
./install_champ.sh
|
||||
|
||||
# Install dependencies
|
||||
# --------------------
|
||||
|
||||
apt install -y cmake python3 python3-pip git \
|
||||
make m4 mlocate autotools-dev pkg-config \
|
||||
libhdf5-dev \
|
||||
bash vim emacs-nox
|
||||
|
||||
ln -s /usr/bin/python3 /usr/bin/python
|
||||
|
||||
|
||||
# Install TREXIO
|
||||
# --------------
|
||||
|
||||
cd /opt
|
||||
|
||||
wget https://github.com/TREX-CoE/trexio/releases/download/v2.4.2/trexio-2.4.2.tar.gz
|
||||
tar -zxvf trexio-2.4.2.tar.gz
|
||||
cd trexio-2.4.2
|
||||
./configure --prefix=/usr
|
||||
make -j 8
|
||||
make -j 8 check
|
||||
make install
|
||||
cd ..
|
||||
rm -rf trexio-2.4.2 trexio-2.4.2.tar.gz
|
||||
pip install trexio
|
||||
|
||||
|
||||
# Install QMCkl
|
||||
# -------------
|
||||
|
||||
cflags="-Ofast -g -qmkl=sequential -ftz -fma -march=core-avx2"
|
||||
fcflags="-Ofast -g -qmkl=sequential -ftz -fma -march=core-avx2 -ip"
|
||||
|
||||
wget https://github.com/TREX-CoE/qmckl/releases/download/v1.0.0/qmckl-1.0.0.tar.gz
|
||||
tar -zxvf qmckl-1.0.0.tar.gz
|
||||
cd qmckl-1.0.0
|
||||
|
||||
mkdir _build_sequential
|
||||
cd _build_sequential
|
||||
../configure --prefix=/usr --disable-python --disable-doc --enable-hpc --without-openmp \
|
||||
CFLAGS="$cflags" FCFLAGS="$fcflags"
|
||||
make -j 8
|
||||
make -j 8 check
|
||||
|
||||
# make install
|
||||
/usr/bin/install -c src/.libs/libqmckl.so.0.0.0 /usr/lib/libqmckl-sequential.so.0.0.0
|
||||
(cd /usr/lib \
|
||||
&& { ln -s -f libqmckl-sequential.so.0.0.0 libqmckl-sequential.so.0 \
|
||||
|| { rm -f libqmckl-sequential.so.0 \
|
||||
&& ln -s libqmckl-sequential.so.0.0.0 libqmckl-sequential.so.0; }; })
|
||||
(cd /usr/lib \
|
||||
&& { ln -s -f libqmckl-sequential.so.0.0.0 libqmckl-sequential.so \
|
||||
|| { rm -f libqmckl-sequential.so \
|
||||
&& ln -s libqmckl-sequential.so.0.0.0 libqmckl-sequential.so; }; })
|
||||
/usr/bin/install -c src/.libs/libqmckl.lai /usr/lib/libqmckl-sequential.la
|
||||
sed -i "s/libqmckl/libqmckl-sequential/g" /usr/lib/libqmckl-sequential.la
|
||||
/usr/bin/install -c src/.libs/libqmckl.a /usr/lib/libqmckl-sequential.a
|
||||
chmod 644 /usr/lib/libqmckl-sequential.a
|
||||
ranlib /usr/lib/libqmckl-sequential.a
|
||||
|
||||
cd ..
|
||||
|
||||
mkdir _build_parallel
|
||||
cd _build_parallel
|
||||
../configure --prefix=/usr --disable-python --disable-doc --enable-hpc --with-openmp \
|
||||
CFLAGS="$cflags" FCFLAGS="$fcflags"
|
||||
make -j 8
|
||||
make -j 8 check
|
||||
make install
|
||||
cd ..
|
||||
|
||||
cd ..
|
||||
rm -rf qmckl-1.0.0 qmckl-1.0.0.tar.gz
|
||||
|
||||
# CHAMP
|
||||
# -----
|
||||
|
||||
git clone --depth=1 https://github.com/filippi-claudia/champ.git
|
||||
cd champ
|
||||
cmake -S. -Bbuild \
|
||||
-DCMAKE_Fortran_COMPILER="mpiifort" \
|
||||
-DENABLE_TREXIO=ON \
|
||||
-DENABLE_QMCKL=ON
|
||||
|
||||
cmake --build build -j 8
|
||||
|
||||
|
||||
# Clean up
|
||||
# --------
|
||||
|
||||
rm -rf compile-* docs tests build lib
|
||||
apt remove -y intel-oneapi-compiler-dpcpp-cpp \
|
||||
intel-oneapi-compiler-fortran \
|
||||
intel-oneapi-mpi-devel \
|
||||
wget git gcc gfortran
|
||||
./cleanup_oneapi.sh
|
||||
|
||||
apt autoremove -y
|
||||
apt purge -y --auto-remove
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
8
lib/cleanup_oneapi.sh
Executable file
8
lib/cleanup_oneapi.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
apt remove -y \
|
||||
intel-oneapi-compiler-dpcpp-cpp \
|
||||
intel-oneapi-compiler-fortran \
|
||||
intel-oneapi-mpi-devel \
|
||||
gcc gfortran
|
||||
|
@ -1,16 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
source environment.sh
|
||||
cd /opt
|
||||
source environment.sh
|
||||
|
||||
ln -s /usr/bin/python3 /usr/bin/python
|
||||
|
||||
# Install dependencies
|
||||
# --------------------
|
||||
|
||||
apt install -y cmake python3 git \
|
||||
make m4 mlocate autotools-dev pkg-config \
|
||||
vim emacs-nox
|
||||
|
||||
ln -s /usr/bin/python3 /usr/bin/python
|
||||
apt install -y cmake python3 git make
|
||||
|
||||
|
||||
git clone --depth=1 https://github.com/filippi-claudia/champ.git
|
||||
@ -22,16 +20,6 @@ cmake -S. -Bbuild \
|
||||
|
||||
cmake --build build -j 8
|
||||
|
||||
|
||||
# Clean up
|
||||
# --------
|
||||
|
||||
rm -rf compile-* docs tests build lib
|
||||
apt remove -y intel-oneapi-compiler-dpcpp-cpp \
|
||||
intel-oneapi-compiler-fortran \
|
||||
intel-oneapi-mpi-devel \
|
||||
wget git gcc gfortran
|
||||
|
||||
apt autoremove -y
|
||||
apt purge -y --auto-remove
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
apt remove -y cmake git make
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source environment.sh
|
||||
cd /opt
|
||||
source environment.sh
|
||||
|
||||
apt install -y wget pgpgpg
|
||||
|
||||
@ -29,3 +29,5 @@ ln -s /opt/intel/oneapi/compiler/latest/bin/ifort.cfg /opt/ifort.cfg
|
||||
ln -s /opt/intel/oneapi/compiler/latest/bin/icx.cfg /opt/icx.cfg
|
||||
|
||||
echo "-diag-disable=10448" > /opt/ifort.cfg
|
||||
|
||||
apt remove -y wget pgpgpg
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source environment.sh
|
||||
cd /opt
|
||||
source environment.sh
|
||||
|
||||
apt install -y wget make pkg-config
|
||||
|
||||
@ -62,3 +62,4 @@ cd ..
|
||||
cd ..
|
||||
rm -rf qmckl-1.0.0 qmckl-1.0.0.tar.gz
|
||||
|
||||
apt remove -y wget make pkg-config gcc gfortran
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source environment.sh
|
||||
cd /opt
|
||||
source environment.sh
|
||||
|
||||
apt install -y wget libhdf5-dev make
|
||||
[ -z $CC ] && apt install -y gcc
|
||||
@ -19,3 +19,4 @@ cd ..
|
||||
rm -rf trexio-2.4.2 trexio-2.4.2.tar.gz
|
||||
|
||||
|
||||
apt remove -y wget gcc gfortran
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
source environment.sh
|
||||
cd /opt
|
||||
source environment.sh
|
||||
|
||||
apt install -y python3 python3-pip git
|
||||
pip install trexio
|
||||
@ -10,3 +10,4 @@ git clone --depth=1 https://github.com/TREX-CoE/trexio_tools.git
|
||||
cd trexio_tools
|
||||
pip install .
|
||||
|
||||
apt remove -y git python3-pip
|
||||
|
Loading…
Reference in New Issue
Block a user