10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-16 11:03:49 +01:00
QuantumPackage/scripts/verif_omp/study_omp.sh

31 lines
576 B
Bash
Raw Normal View History

2021-11-19 22:39:59 +01:00
#!/bin/sh
2021-11-23 15:00:54 +01:00
# list of compilers
2021-11-19 22:39:59 +01:00
list_comp="ifort gfortran-7 gfortran-8 gfortran-9"
2021-11-23 15:00:54 +01:00
# file to store the results
2021-11-19 22:39:59 +01:00
FILE=results.dat
touch $FILE
rm $FILE
2021-11-23 15:00:54 +01:00
# Comments
2021-11-19 22:39:59 +01:00
echo "1: omp_set_max_active_levels(5)" >> $FILE
echo "2: omp_set_nested(.True.)" >> $FILE
echo "3: 1 + 2" >> $FILE
echo "" >> $FILE
echo "1 2 3" >> $FILE
2021-11-23 15:00:54 +01:00
# loop on the comp
2021-11-19 22:39:59 +01:00
for comp in $list_comp
do
$comp --version > /dev/null \
2021-11-29 10:39:34 +01:00
&& $comp -O0 -fopenmp check_omp.f90 \
2021-11-19 22:39:59 +01:00
&& echo $(./a.out | grep "Tests:" | cut -d ":" -f2- ) $(echo " : ") $($comp --version | head -n 1) >> $FILE
done
2021-11-23 15:00:54 +01:00
# Display
2021-11-19 22:39:59 +01:00
cat $FILE