Skip to content

Commit 6ebfcba

Browse files
committed
fix: source openfoam bashrc in test project definition
fixes #5
1 parent e88115f commit 6ebfcba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

projects/test.def

+4-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ From: {{ CONTAINERS_DIR }}/basic/{{ BASE_CONTAINER }}.sif
2424
%files
2525
OMPIFoam /opt/OMPIFoam
2626

27-
%post
27+
%post -c /bin/bash
2828
echo "Testing OpenMPI implementation"
29-
/bin/bash -c "cd /opt/OMPIFoam && mpicc -o ompiTest testOMPI.cpp"
30-
/bin/bash -c "source /usr/lib/openfoam/openfoam{{ FRAMEWORK_VERSION }}/etc/bashrc && cd /opt/OMPIFoam && wmake"
29+
source /usr/lib/openfoam/openfoam{{ FRAMEWORK_VERSION }}/etc/bashrc
30+
export LD_LIBRARY_PATH=/opt/{{ MPI_IMPLEMENTATION }}/lib:$LD_LIBRARY_PATH
31+
cd /opt/OMPIFoam && mpicc -o ompiTest testOMPI.cpp && wmake
3132
jq --arg app test --arg branch {{ BRANCH }} \
3233
'.[$app] |= if . == null then
3334
{

0 commit comments

Comments
 (0)