Skip to content

Commit 9e1ad00

Browse files
committed
another fix to runscript
1 parent ab9ac8f commit 9e1ad00

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Bootstrap: docker
2-
From: ubuntu:24.04
2+
From: nvcr.io/nvidia/nvhpc:23.11-devel-cuda12.3-ubuntu22.04
33

44
%environment
55
export OMPI_ALLOW_RUN_AS_ROOT=1
@@ -8,6 +8,9 @@ From: ubuntu:24.04
88

99
%post
1010
export DEBIAN_FRONTEND=noninteractive
11+
export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/bin:$PATH
12+
export LD_LIBRARY_PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/23.11/compilers/lib:$LD_LIBRARY_PATH
13+
1114
apt update -y && apt install -y \
1215
build-essential git tar wget make cmake gcc g++ \
1316
python3 python3-dev python3-venv \
@@ -16,9 +19,16 @@ From: ubuntu:24.04
1619
cd /opt
1720
git clone --depth 1 https://github.com/mflowcode/mfc.git MFC
1821
cd /opt/MFC
19-
./mfc.sh build -j $(nproc)
22+
rm -rf build
23+
export CC=nvc
24+
export CXX=nvc++
25+
export FC=nvfortran
26+
./mfc.sh build --mpi --gpu -j $(nproc)
2027
./mfc.sh test --dry-run -j $(nproc)
2128

2229
%runscript
30+
mkdir -p /tmp/mfc/build
2331
cd /opt/MFC
32+
cp -r /opt/MFC /tmp/mfc/
33+
cd /tmp/mfc/MFC
2434
exec ./mfc.sh "$@"

0 commit comments

Comments
 (0)