Skip to content

Commit 6f951de

Browse files
authored
build and use latest openmpi 5.0.8 (#1513)
* build and use latest openmpi 5.0.8 * Use temp dir * move openmpi bld to script
1 parent 2d3d7e3 commit 6f951de

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

bin/npsdb_bld_ompi.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
export DOMP=${DOMP:-openmpi-5.0.8}
4+
export WORK=${WORK:-/tmp/ompi$$}
5+
export COMP=$AOMP
6+
export INST=${INST:-/tmp/inst$$/$DOMP-flang}
7+
8+
rm -rf $WORK
9+
mkdir -p $WORK
10+
pushd $WORK
11+
wget https://download.open-mpi.org/release/open-mpi/v5.0/$DOMP.tar.gz
12+
tar xf $DOMP.tar.gz
13+
cd $DOMP
14+
rm -rf build
15+
mkdir build
16+
cd build
17+
18+
export LD_LIBRARY_PATH=$COMP/lib
19+
export PATH=$COMP/bin:$PATH
20+
../configure --prefix=$INST OMPI_CC=clang OMPI_CXX=clang++ OMPI_F90=flang CXX=clang++ CC=clang FC=flang -enable-mpi1-compatibility
21+
make -j 32
22+
LD_LIBRARY_PATH=$COMP/lib PATH=$COMP/bin:$PATH make -j 32 install
23+
popd
24+
rm -rf $WORK
25+
echo $INST

bin/run_hpc2021.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ export AOMP_USE_CCACHE=0
1414
: ${HPC2021_SOURCE_DIR:=$AOMP_REPOS_TEST/hpc2021-1.1.9}
1515
: ${HPC2021_BUILD_NUM_THREADS:=32}
1616

17+
export INST=/tmp/npsdbInst$$/openmpi-5-flang
18+
./npsdb_bld_ompi.sh
19+
20+
export LD_LIBRARY_PATH=$AOMP/lib
21+
export PATH=$AOMP/bin:$PATH
22+
../configure --prefix=$INST OMPI_CC=clang OMPI_CXX=clang++ OMPI_F90=flang CXX=clang++ CC=clang FC=flang -enable-mpi1-compatibility
23+
make -j 32
24+
LD_LIBRARY_PATH=$AOMP/lib PATH=$AOMP/bin:$PATH make -j 32 install
25+
26+
1727
if [ "$1" == "-clean" ]; then
1828
rm -rf ${HPC2021_SOURCE_DIR}
1929
mkdir -p ${HPC2021_SOURCE_DIR}
@@ -31,5 +41,7 @@ else
3141
cd ${HPC2021_SOURCE_DIR} || exit 1
3242
fi
3343
export PATH=$AOMP/../bin:$AOMP/../../bin:$PATH
44+
export MPI=$INST
3445
./runOne
46+
rm -rf $INST
3547
#grep ratio= result/*.log

0 commit comments

Comments
 (0)