From bb67157a93c8ebf10e6f64f20a0c5afc3f825e97 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 11 Apr 2024 13:53:52 +0200 Subject: [PATCH] Fixing cmake --- Champ/champ.def | 9 +++++++++ Champ/environment.sh | 1 + lib/cleanup_oneapi.sh | 1 + lib/install_champ.sh | 7 +++++-- lib/install_trexio_python.sh | 2 ++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Champ/champ.def b/Champ/champ.def index 435be27..541b847 100644 --- a/Champ/champ.def +++ b/Champ/champ.def @@ -41,3 +41,12 @@ From: ubuntu:22.04 apt purge -y --auto-remove rm -rf /var/lib/apt/lists/* + cat source /opt/environment.sh >> /etc/bash.bashrc + +%runscript + exec /bin/bash $@ + +%test + ls /opt/champ/bin/vmc.mov1 || exit 1 + ls /opt/champ/bin/dmc.mov1 || exit 1 + diff --git a/Champ/environment.sh b/Champ/environment.sh index 8955140..ca57609 100755 --- a/Champ/environment.sh +++ b/Champ/environment.sh @@ -7,4 +7,5 @@ source /opt/intel/oneapi/setvars.sh export FC=ifort export CC=icx +export OMP_NUM_THREADS=1 diff --git a/lib/cleanup_oneapi.sh b/lib/cleanup_oneapi.sh index 1c73302..60e017a 100755 --- a/lib/cleanup_oneapi.sh +++ b/lib/cleanup_oneapi.sh @@ -6,3 +6,4 @@ apt remove -y \ intel-oneapi-mpi-devel \ gcc gfortran +rm /opt/icx.cfg /opt/ifort.cfg diff --git a/lib/install_champ.sh b/lib/install_champ.sh index 7a30ae8..cf27b03 100755 --- a/lib/install_champ.sh +++ b/lib/install_champ.sh @@ -8,13 +8,16 @@ ln -s /usr/bin/python3 /usr/bin/python # Install dependencies # -------------------- -apt install -y cmake python3 git make +apt install -y cmake python3 git make gcc git clone --depth=1 https://github.com/filippi-claudia/champ.git + cd champ + cmake -S. -Bbuild \ -DCMAKE_Fortran_COMPILER="mpiifort" \ + -DCMAKE_C_COMPILER="gcc" -DENABLE_TREXIO=ON \ -DENABLE_QMCKL=ON @@ -22,4 +25,4 @@ cmake --build build -j 8 rm -rf compile-* docs tests build lib -apt remove -y cmake git make +apt remove -y cmake git make gcc diff --git a/lib/install_trexio_python.sh b/lib/install_trexio_python.sh index daf2feb..4b23265 100755 --- a/lib/install_trexio_python.sh +++ b/lib/install_trexio_python.sh @@ -9,5 +9,7 @@ pip install trexio git clone --depth=1 https://github.com/TREX-CoE/trexio_tools.git cd trexio_tools pip install . +cd .. +rm -rf trexio_tools apt remove -y git python3-pip