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

S. Riette 14 Nov 2022: update check_commit_mesonh

Update script to run all the cases in case run are stored in a
directory different from the reference directory
parent c046cd0d
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,8 @@ fi
# - they can be done in the reference pack
#They are done in the current pack except if the reference pack
#already contains a tested simulation
run_in_ref=$(ls -d $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/007_16janvier/008_run2_* 2> /dev/null | tail -1 |wc -l)
#To check this, we use the case 007_16janvier/008_run2_turb3D
run_in_ref=$(ls -d $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/007_16janvier/008_run2_turb3D_* 2> /dev/null | tail -1 |wc -l)
#Name and directory for compiling and executing user pack
fromdir=''
......@@ -258,15 +259,19 @@ if [ $run -ge 1 ]; then
[ ! -d ${exedir}_$commit ] && cp -R ${exedir} ${exedir}_$commit
cd $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/$case/${exedir}_$commit
else
cd $MNHPACK/$name/MY_RUN/KTEST/$case/
for rep in ???_*; do
rep=$MNHPACK/$name/MY_RUN/KTEST/$case
[ -d $rep ] && rm -rf $rep
mkdir $rep
cd $rep
for repref in $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/$case/$rep/*; do
rep=$(basename $repref)
if [ $rep != ${exedir} ]; then
rm -rf $rep
ln -s $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/$case/$rep .
else
cp -R $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/$case/$rep .
fi
done
[ -d ${exedir} ] && rm -rf ${exedir}
cp -R $REFDIR/MNH-V5-5-0/MY_RUN/KTEST/$case/${exedir} .
cd ${exedir}
fi
......
......@@ -30,7 +30,9 @@ def comp_DDH(filename1, filename2, output_fig, tol_ad=1.2E-7, tol_rd=1.E-6, verb
ad = v1[i] - v2[i]
rd = 200 * (v1[i] - v2[i]) / (v1[i] + v2[i])
if verbose: print(" v1={v1}, v2={v2}, diff={ad}, rdiff={rd}".format(v1=v1[i], v2=v2[i], ad=ad, rd=rd))
if abs(ad) > tol_ad and abs(rd) > tol_rd: toplt = True
if abs(ad) > tol_ad and abs(rd) > tol_rd:
if verbose: print(" ==> plot")
toplt = True
return fid if toplt else None
toplt = []
for fid in [fid for fid in l1.intersection(l2) if fid != 'DOCFICHIER']:
......
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