Closed dschwoerer closed 4 years ago
Strangely, testing the packaged PETSc (3.13.1) in fedora works ...
Very odd! How did you build PETSc? I'm sure I was testing with the PETSc master branch not so long, but it's possible this test wasn't in at that point.
This is tickling some faint memory of a PETSc option that might not have played very well, but it's not coming to me just yet.
Could you maybe have a play with the PETSc AMG solver options, e.g. ksptype
?
Looks like I was checking a slightly different test. I'm bisecting PETSc with these tests to see if I can pinpoint the change in PETSc that breaks this.
Haven't gotten around to check up on this any further, this is the command I used to install PETSc:
unset PETSC_DIR
unset PETSC_ARCH
function fail() {
echo "Failure building $ver"
for f in best.*.log
do
echo $f
echo
cat $f
echo
done
echo $@
exit 2
}
for V in 13 #{9..13}
do
ver=3.$V
wget -N http://ftp.mcs.anl.gov/pub/petsc/petsc-$ver.tar.gz 2>&1 | grep 'Not Modified'
ex=$?
if test $ex -gt 0
then
rm -rf petsc-$ver.[0-9]*
tar -xf petsc-$ver.tar.gz
full=$(ls petsc-$ver.? -d)
test $full || fail "Cannot find version"
(cd $full || fail Failed to cd
module purge
module load mpi/mpich-x86_64 || fail "Failed to load mpi"
if test "$ver" == "3.4"
then
opts=--download-f-blas-lapack=1
else
opts=--download-fblaslapack=1
fi
#--with-clanguage=cxx
opts="$opts
--with-mpi=yes
--with-precision=double
--with-scalar-type=real
--with-pic=1"
# --with-shared-libraries=0"
export MAKEFLAGS=-j2
./configure $opts > best.config.log || fail "configure failed"
make PETSC_DIR=$HOME/soft/petsc-rel/$full PETSC_ARCH=arch-linux2-c-debug all > best.make.log || fail make failed
make PETSC_DIR=$HOME/soft/petsc-rel/$full PETSC_ARCH=arch-linux2-c-debug test > best.test.log|| fail make failed
) || exit
fi
done
Looks like it was this change in 3.11:
Previously the KSP Chebyshev implementation always did one more iteration than requested. For example -ksp_max_it 2 resulted in 3 Chebyshev iterations. This has been corrected. Due to this correction your solver may seem to converge more slowely than it previous has. Note that the multigrid solvers (PCMG, PCGAMG, PCML) used by default Chebyshev (with 3 actual steps) in their smoother, thus the multigrid solvers will now have seemingly different convergence rates since they will now use only 2 actual steps. To reproduce previous behavior change the number of smoother iterations to match the previous actual amount, this can be done with for example -mg_levels_ksp_max_it 3 (or -prefix_mg_levels_ksp_max_it 3 if the KSP object has a prefix).
I initially dismissed this because we're not using Chebyshev for the solver, but this is actually for the smoother. I'm currently trying to work out how to set that option it suggests, but they don't make it easy.
Fixed in #2051
With PETSc 13.3.1 I am observing some differences in the unit tests, that exceed the tolerance:
The difference is present in 3.13.1, 3.12.5 and 3.11.4. Only 3.10.5 did not fail.