Skip to content

Commit 9736b7e

Browse files
committed
CS-1152 add a checktree_mpi to testsuite with configuration and tests making use of the various MPI integrations
// added missing file used by testsuite
1 parent d0d536c commit 9736b7e

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

source/dist/mpi/examples/build.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/bin/sh
2+
#___INFO__MARK_BEGIN_NEW__
3+
###########################################################################
4+
#
5+
# Copyright 2025 HPC-Gridware GmbH
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#
19+
###########################################################################
20+
#___INFO__MARK_END_NEW__
21+
22+
# usage: build.sh [suffix]
23+
# suffix can be used to differentiate between different architetures, e.g.
24+
# build.sh lx-amd64
25+
26+
# path to the MPI implementation
27+
if [ -z "$MPIR_HOME" ]; then
28+
echo "MPIR_HOME is not set"
29+
exit 1
30+
fi
31+
32+
BINARY="testmpi"
33+
if [ $# -gt 0 ]; then
34+
BINARY="$BINARY-$1"
35+
fi
36+
37+
PATH=$MPIR_HOME/bin:$PATH
38+
export PATH
39+
40+
CFLAGS=""
41+
LFLAGS=""
42+
# need additional options for Intel MPI
43+
type mpiicc >/dev/null 2>&1
44+
if [ $? -eq 0 ]; then
45+
CFLAGS="$CFLAGS -I$MPIR_HOME/include"
46+
LFLAGS="$LFLAGS -L$MPIR_HOME/lib"
47+
fi
48+
49+
mpicc $CFLAGS $LFLAGS -o $BINARY $SGE_ROOT/mpi/examples/testmpi.c -lm

0 commit comments

Comments
 (0)