Skip to content

Commit

Permalink
adds compilation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeter committed Apr 6, 2024
1 parent a4600a8 commit 6d05104
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/compilations/1.configure.parallel_make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
###################################################

# test name
NAME="configure.0.parallel_make"
NAME="configure.1.parallel_make"

# configuration parameters
CONF_PARAM="--with-mpi"
Expand Down
64 changes: 64 additions & 0 deletions tests/compilations/2.configure.openmp_make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash
###################################################

# test name
NAME="configure.2.openmp_make"

# configuration parameters
CONF_PARAM="--with-mpi --enable-openmp --enable-debug"

###################################################


testdir=`pwd`

# sets source directory
cd $ROOT/
srcdir=`pwd`

cd $testdir/

# title
echo >> $testdir/results.log
echo "$NAME in: $testdir" >> $testdir/results.log
echo >> $testdir/results.log

#cleanup
rm -rf config.log config.status
rm -rf ./bin ./obj ./setup ./OUTPUT_FILES ./DATA

# default configuration for serial version (without MPI)
# (out-of-source compilation)
echo "configuration: $srcdir/configure ${CONF_PARAM}" >> $testdir/results.log
$srcdir/configure ${CONF_PARAM} >> $testdir/results.log 2>&1

# checks exit code
if [[ $? -ne 0 ]]; then
echo >> $testdir/results.log
echo "configuration failed, please check..." >> $testdir/results.log
exit 1
fi

# default all compilation
make clean >> $testdir/results.log 2>&1

# checks exit code
if [[ $? -ne 0 ]]; then
echo >> $testdir/results.log
echo "compilation failed, please check..." >> $testdir/results.log
exit 1
fi

# parallel make
make -j 4 all >> $testdir/results.log 2>&1

# checks exit code
if [[ $? -ne 0 ]]; then
echo >> $testdir/results.log
echo "compilation failed, please check..." >> $testdir/results.log
exit 1
fi

echo "" >> $testdir/results.log
echo "successful compilation" >> $testdir/results.log

64 changes: 64 additions & 0 deletions tests/compilations/3.configure.vectorization_make.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash
###################################################

# test name
NAME="configure.3.vectorization_make"

# configuration parameters
CONF_PARAM="--enable-openmp --enable-vectorization"

###################################################


testdir=`pwd`

# sets source directory
cd $ROOT/
srcdir=`pwd`

cd $testdir/

# title
echo >> $testdir/results.log
echo "$NAME in: $testdir" >> $testdir/results.log
echo >> $testdir/results.log

#cleanup
rm -rf config.log config.status
rm -rf ./bin ./obj ./setup ./OUTPUT_FILES ./DATA

# default configuration for serial version (without MPI)
# (out-of-source compilation)
echo "configuration: $srcdir/configure ${CONF_PARAM}" >> $testdir/results.log
$srcdir/configure ${CONF_PARAM} >> $testdir/results.log 2>&1

# checks exit code
if [[ $? -ne 0 ]]; then
echo >> $testdir/results.log
echo "configuration failed, please check..." >> $testdir/results.log
exit 1
fi

# default all compilation
make clean >> $testdir/results.log 2>&1

# checks exit code
if [[ $? -ne 0 ]]; then
echo >> $testdir/results.log
echo "compilation failed, please check..." >> $testdir/results.log
exit 1
fi

# parallel make
make -j 4 all >> $testdir/results.log 2>&1

# checks exit code
if [[ $? -ne 0 ]]; then
echo >> $testdir/results.log
echo "compilation failed, please check..." >> $testdir/results.log
exit 1
fi

echo "" >> $testdir/results.log
echo "successful compilation" >> $testdir/results.log

0 comments on commit 6d05104

Please sign in to comment.