Skip to content
Snippets Groups Projects
Commit 89d274d4 authored by RIETTE Sébastien's avatar RIETTE Sébastien
Browse files

S. Riette 19 oct 2022: update offline compilation to be able to use testprogs_ branches

parent f50f3b07
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ build.prop{fc.defs}[testprogs] = $FPP_FLAGS WITHOUT_CXXDEMANGLE USE_OPENMP
$util = util1 util2 util3 util4 util5 util6 util7 util8 util9 util10 util11 util12 util13 util14 util15 util16
$mpi = mpi2 mpi3 mpi4 mpi5 mpi6 mpi7 mpi8 mpi9 mpi10 mpi11 mpi12 mpi13 mpi14 mpi15 mpi16 mpi17 mpi18 mpi19
$system = system1 system2 system3 system4 system5 system6 system7 system8 system10 system11 system12 system13 system14
build.prop{ns-dep.o} = common parkind drhook $util $mpi oml mpl gstats1 $system
build.prop{ns-dep.o} = param parkind drhook $util $mpi oml mpl gstats1 $system
build.prop{fc.libs} = $LIBS
################################################################################################
......@@ -64,11 +64,11 @@ build.prop{fc.libs} = $LIBS
#############################
# 4.1 Programs and dummy programm to force linking
build.source[dummyprog] = src/dummyprog.F90
build.source[testprogs] = src/testprogs
build.source[testprogs] = src/ice_adjust/ src/rain_ice/ src/support/
#############################
# 4.2 Main directory
build.source[common] = src/common/
build.source[param] = src/aux/ src/turb/ src/micro/
#############################
# 4.3 Fiat directory
......
......@@ -183,8 +183,14 @@ cp fcm-make.cfg $builddir
cd $builddir
mkdir src
cd src
ln -s ../../../../src/common .
ln -s ../../../../src/testprogs .
if [ -d ../../../../src/common ]; then
#We compile directly from a PHYEX repository
ln -s ../../../../src/common/* .
ln -s ../../../../src/testprogs/* .
else
#We compile after an execution of prep_code
ln -s ../../../../src/* .
fi
ln -s ../../fiat/src fiat
cat <<EOF > dummyprog.F90
PROGRAM DUMMYPROG
......
......@@ -171,23 +171,25 @@ if [ $compilation -eq 1 ]; then
else
expand_options=""
fi
subs="$subs -s turb -s micro -s aux -s ice_adjust"
subs="$subs -s turb -s micro -s aux -s ice_adjust -s rain_ice -s support"
prep_code=$PHYEXTOOLSDIR/prep_code.sh
if [ "$fromdir" == '' ]; then
echo "Clone repository, and checkout commit $commit (using prep_code.sh)"
$prep_code -c $commit $expand_options $subs src
mv src/build src/build_from_commit #We do not use the compilation system as it used to be when commiting
cp -r $PHYEXTOOLSDIR/../build src/ #We use the compilation system from the same commit as the current script
if [[ $commit == testprogs${separator}* ]]; then
$prep_code -c $commit src #This commit is ready for inclusion
else
$prep_code -c $commit $expand_options $subs -m testprogs src
fi
else
echo "Copy $fromdir"
mkdir src
scp -q -r $fromdir/src src/
#scp -q -r $fromdir/build src/ #We do not use the compilation system present with the source code
cp -r $PHYEXTOOLSDIR/../build src/ #We use the compilation system from the same commit as the current script
$prep_code $expand_options $subs src
$prep_code $expand_options $subs -m testprogs src
fi
cp -r $PHYEXTOOLSDIR/../build . #We use the compilation system from the same commit as the current script
cd $TESTDIR/$name/src/build/with_fcm/
cd $TESTDIR/$name/build/with_fcm/
rm -rf arch_*
./make_fcm.sh --arch $archfile 2>&1 | tee Output_compilation
fi
......@@ -196,7 +198,7 @@ if [ $run -ge 1 ]; then
echo "### Running of commit $commit"
for t in $(echo $tests | sed 's/,/ /g'); do
if [ ! -f $TESTDIR/$name/src/build/with_fcm/arch_${archfile}/build/bin/main_${t}.exe ]; then
if [ ! -f $TESTDIR/$name/build/with_fcm/arch_${archfile}/build/bin/main_${t}.exe ]; then
echo "Pack does not exist ($TESTDIR/$name) or compilation has failed, please check"
exit 6
fi
......@@ -216,7 +218,7 @@ if [ $run -ge 1 ]; then
mkdir -p tests/$t
cd tests/$t
ln -s $dirdata/$t data
$TESTDIR/$name/src/build/with_fcm/arch_${archfile}/build/bin/main_${t}.exe --check 2>&1 > Output_run
$TESTDIR/$name/build/with_fcm/arch_${archfile}/build/bin/main_${t}.exe --check 2>&1 > Output_run
done
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment