Skip to content

Commit

Permalink
Use gnu parallel to run test programs.
Browse files Browse the repository at this point in the history
  • Loading branch information
nakatamaho committed Jul 25, 2022
1 parent ac049f7 commit 6679db4
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 28 deletions.
15 changes: 11 additions & 4 deletions mplapack/test/eig/test_eig_all.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
#!/bin/bash

JOBS=4
EIGREALS=`ls xeigtstR_*`
EIGCOMPLEXES=`ls xeigtstC_*`

TESTREALS=`ls R*.in [a-z]*.in | grep -v double | grep -v ^log`
TESTCOMPLEXES=`ls C*.in [a-z]*.in | grep -v double | grep -v ^log`

/usr/bin/time ./xeigtstR_double < Rbal_double.in > log.xeigtstR_double.Rbal.in
/usr/bin/time ./xeigtstC_double < Cbal_double.in > log.xeigtstC_double.Cbal.in
rm -f .parallel.test_eig_all.sh

echo "/usr/bin/time ./xeigtstR_double < Rbal_double.in >& log.xeigtstR_double.Rbal.in" >> .parallel.test_eig_all.sh
echo "/usr/bin/time ./xeigtstC_double < Cbal_double.in >& log.xeigtstC_double.Cbal.in" >> .parallel.test_eig_all.sh

for eigreal in $EIGREALS; do
for testreal in $TESTREALS; do
echo testing $eigreal $testreal
/usr/bin/time ./$eigreal < $testreal > log.$eigreal.$testreal
echo "/usr/bin/time ./$eigreal < $testreal >& log.$eigreal.$testreal" >> .parallel.test_eig_all.sh
done
done

for eigcomplex in $EIGCOMPLEXES; do
for testcomplex in $TESTCOMPLEXES; do
echo testing $eigcomplex $testcomplex
/usr/bin/time ./$eigcomplex < $testcomplex > log.$eigcomplex.$testcomplex
echo "/usr/bin/time ./$eigcomplex < $testcomplex >& log.$eigcomplex.$testcomplex" >> .parallel.test_eig_all.sh
done
done

cat .parallel.test_eig_all.sh | parallel --jobs $JOBS

rm .parallel.test_eig_all.sh
17 changes: 11 additions & 6 deletions mplapack/test/eig/test_eig_all_mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,31 @@

export WINEPATH="/usr/x86_64-w64-mingw32/lib/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix;/home/docker/MPLAPACK_MINGW/bin"
export WINEDEBUG="-all"
JOBS=4

EIGREALS=`ls *xeigtstR_* | grep -v log`
EIGCOMPLEXES=`ls *xeigtstC_* | grep -v log`

TESTREALS=`ls R*.in [a-z]*.in | grep -v double | grep -v ^log`
TESTCOMPLEXES=`ls C*.in [a-z]*.in | grep -v double | grep -v ^log`

/usr/bin/time wine64 ./*xeigtstR_double.exe < Rbal_double.in > log.x86_64-w64-mingw32-xeigtstR_double.Rbal.in
/usr/bin/time wine64 ./*xeigtstC_double.exe < Cbal_double.in > log.x86_64-w64-mingw32-xeigtstC_double.Cbal.in
rm -f .parallel.test_eig_all_mingw.sh

echo "/usr/bin/time wine64 ./*xeigtstR_double.exe < Rbal_double.in >& log.x86_64-w64-mingw32-xeigtstR_double.Rbal.in" >> .parallel.test_eig_all_mingw.sh
echo "/usr/bin/time wine64 ./*xeigtstC_double.exe < Cbal_double.in >& log.x86_64-w64-mingw32-xeigtstC_double.Cbal.in" >> .parallel.test_eig_all_mingw.sh

for eigreal in $EIGREALS; do
for testreal in $TESTREALS; do
echo testing $eigreal $testreal
/usr/bin/time wine64 ./$eigreal < $testreal > log.$eigreal.$testreal
echo "/usr/bin/time wine64 ./$eigreal < $testreal >& log.$eigreal.$testreal" >> .parallel.test_eig_all_mingw.sh
done
done

for eigcomplex in $EIGCOMPLEXES; do
for testcomplex in $TESTCOMPLEXES; do
echo testing $eigcomplex $testcomplex
/usr/bin/time wine64 ./$eigcomplex < $testcomplex > log.$eigcomplex.$testcomplex
echo "/usr/bin/time wine64 ./$eigcomplex < $testcomplex >& log.$eigcomplex.$testcomplex" >> .parallel.test_eig_all_mingw.sh
done
done

cat .parallel.test_eig_all_mingw.sh | parallel --jobs $JOBS

rm .parallel.test_eig_all_mingw.sh
4 changes: 2 additions & 2 deletions mplapack/test/getresults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cd /home/docker/mplapack/mplapack/test/eig/
rm -rf results/aarch64-unknown-linux-gnu
mkdir -p results/aarch64-unknown-linux-gnu
cd results/aarch64-unknown-linux-gnu
rsync -arv [email protected]:/data/mnt/aarch64-unknown-linux-gnu/mplapack/test/eig/log* .
rsync -arv [email protected]:/data/mnt/MPLAPACK/lib/aarch64-unknown-linux-gnu/mplapack/test/eig/log* .

##########
cd /home/docker/mplapack/mplapack/test/eig/
Expand Down Expand Up @@ -38,7 +38,7 @@ cd /home/docker/mplapack/mplapack/test/lin/
rm -rf results/aarch64-unknown-linux-gnu
mkdir -p results/aarch64-unknown-linux-gnu
cd results/aarch64-unknown-linux-gnu
rsync -arv [email protected]:/data/mnt/aarch64-unknown-linux-gnu/mplapack/test/lin/log* .
rsync -arv [email protected]:/data/mnt/MPLAPACK/lib/aarch64-unknown-linux-gnu/mplapack/test/lin/log* .

##########
cd /home/docker/mplapack/mplapack/test/lin/
Expand Down
20 changes: 12 additions & 8 deletions mplapack/test/lin/test_lin_all.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
#!/bin/bash

JOBS=4

LINREALS=`ls xlintstR_*`
LINCOMPLEXES=`ls xlintstC_*`

LINREAL_RFPS=`ls xlintstrfR_*`
LINCOMPLEX_RFPS=`ls xlintstrfC_*`

rm -f .parallel.test_lin_all.sh

for linreal in $LINREALS; do
echo testing $linreal Rtest.in
./$linreal < ./Rtest.in >& log.$linreal
echo "./$linreal < ./Rtest.in >& log.$linreal" >> .parallel.test_lin_all.sh
done

for lincomplex in $LINCOMPLEXES; do
echo testing $lincomplex Ctest.in
/usr/bin/time ./$lincomplex < ./Ctest.in >& log.$lincomplex
echo "/usr/bin/time ./$lincomplex < ./Ctest.in >& log.$lincomplex" >> .parallel.test_lin_all.sh
done

for linreal_rfp in $LINREAL_RFPS; do
echo testing $linreal_rfp Rtest_rfp.in
/usr/bin/time ./$linreal_rfp < ./Rtest_rfp.in >& log.$linreal_rfp
echo "/usr/bin/time ./$linreal_rfp < ./Rtest_rfp.in >& log.$linreal_rfp" >> .parallel.test_lin_all.sh
done

for lincomplex_rfp in $LINCOMPLEX_RFPS; do
echo testing $lincomplex_rfp Ctest_rfp.in
/usr/bin/time ./$lincomplex_rfp < ./Ctest_rfp.in >& log.$lincomplex_rfp
echo "/usr/bin/time ./$lincomplex_rfp < ./Ctest_rfp.in >& log.$lincomplex_rfp" >> .parallel.test_lin_all.sh
done

cat .parallel.test_lin_all.sh | parallel --jobs $JOBS

rm .parallel.test_lin_all.sh
20 changes: 12 additions & 8 deletions mplapack/test/lin/test_lin_all_mingw.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

JOBS=4

export WINEPATH="/usr/x86_64-w64-mingw32/lib/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/;/usr/lib/gcc/x86_64-w64-mingw32/9.3-posix;/home/docker/MPLAPACK_MINGW/bin"
export WINEDEBUG="-all"

Expand All @@ -9,22 +11,24 @@ LINCOMPLEXES=`ls *xlintstC_*exe | grep -v log`
LINREAL_RFPS=`ls *xlintstrfR_*exe | grep -v log`
LINCOMPLEX_RFPS=`ls *xlintstrfC_*exe | grep -v log`

rm -f .parallel.test_lin_all_mingw.sh

for linreal in $LINREALS; do
echo testing $linreal Rtest.in
wine64 $linreal < ./Rtest.in >& log.$linreal
echo "wine64 $linreal < ./Rtest.in >& log.$linreal" >> .parallel.test_lin_all_mingw.sh
done

for lincomplex in $LINCOMPLEXES; do
echo testing $lincomplex Ctest.in
wine64 $lincomplex < ./Ctest.in >& log.$lincomplex
echo "wine64 $lincomplex < ./Ctest.in >& log.$lincomplex" >> .parallel.test_lin_all_mingw.sh
done

for linreal_rfp in $LINREAL_RFPS; do
echo testing $linreal_rfp Rtest_rfp.in
wine64 $linreal_rfp < ./Rtest_rfp.in >& log.$linreal_rfp
echo "wine64 $linreal_rfp < ./Rtest_rfp.in >& log.$linreal_rfp" >> .parallel.test_lin_all_mingw.sh
done

for lincomplex_rfp in $LINCOMPLEX_RFPS; do
echo testing $lincomplex_rfp Ctest_rfp.in
wine64 $lincomplex_rfp < ./Ctest_rfp.in >& log.$lincomplex_rfp
echo "wine64 $lincomplex_rfp < ./Ctest_rfp.in >& log.$lincomplex_rfp" >> .parallel.test_lin_all_mingw.sh
done

cat .parallel.test_lin_all_mingw.sh | parallel --jobs $JOBS

rm .parallel.test_lin_all_mingw.sh

0 comments on commit 6679db4

Please sign in to comment.