<div dir="ltr">I changed the version to include a pre-converged MSR1<div><br></div><div>A fresh pair of eyes would be useful. The minimum is somewhere in the range for atom 7 z 0.2610-0.2616, but it is very ill-conditioned and noisy. Why is unclear.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 9, 2018 at 7:11 AM, Laurence Marks <span dir="ltr"><<a href="mailto:L-marks@northwestern.edu" target="_blank">L-marks@northwestern.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Test case is not a simple question, as the Kahan summations in charge.f are used in lapw0/1/2 mixer and a few other places. I have noticed minor changes in energies (1E-5 Ryd) with preventing ifort from optimizing charge.f. However, this is very tricky as ifort does 80 bit operations and only later truncates to 64, so it could be that without optimization the results are less accurate. In an ideal world the compiler will use 80 bit carries and not optimize out the summation.<div><br></div><div>If useful, a nasty ill-conditioned case is at<br><div><a href="https://drive.google.com/file/d/18xlI3-qf4RKOS8mWdR38bfo4a9Yq_t4u/view?usp=sharing" target="_blank">https://drive.google.com/file/<wbr>d/18xlI3-qf4RKOS8mWdR38bfo4a9Y<wbr>q_t4u/view?usp=sharing</a><br></div><div><br></div></div><div>You will need to do lstart/dstart then a few (15-25) MSR1 before switching to MSR1a. The convergence is somewhat random, some of this may be in the mixer and some elsewhere. By ill-conditioned I mean that if you first do 24 MSR1 versus 25, the number of iterations to convergence, or even whether it converges will be different. Sometimes two runs from the same starting points converge (or not) in a different number of iterations.</div><div><br></div><div>Where the ill-conditioning comes from is unclear to me.</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, Aug 9, 2018 at 3:21 AM, Pavel Ondračka <span dir="ltr"><<a href="mailto:pavel.ondracka@email.cz" target="_blank">pavel.ondracka@email.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can look at the gfortran, what is your testcase?<br>
<br>
I tried to take a quick look with the full mixer using one random TiO2<br>
case. I put a breakpoint after some random Kahan sum (specifically this<br>
was at charge.f:150 in Wien2k 18.2) and I looked for the differences<br>
between O0 and O2. I was actually looking for small differences, but<br>
the value of sum was 0 with -O2 vs 739.29 with -O0!<br>
<br>
Hence in this case it looks like either the different optimization<br>
levels influence the program flow, or the optimizations caused the<br>
shift of the breakpoint to some other place. <br>
<br>
It might also be possible that this is a gdb problem since there is a<br>
lot of <br>
** On entry to DHSEQR parameter number 4 had an illegal value<br>
** On entry to DGEBAL parameter number 3 had an illegal value<br>
** On entry to DGEHRD parameter number 2 had an illegal value<br>
spam which I have no idea about and <error reading variable ....<br>
(access outside bounds of object referenced via synthetic pointer)><br>
<br>
BTW valgrind is also not happy with the mixer (even at -O0 there are<br>
lot of "Use of uninitialised value ... and On entry to DHSEQR parameter<br>
number 4 had an illegal value )<br>
<br>
If you can produce a simple testcase, I'd be happy to look into the<br>
Kahan sum problem, but at the moment I can't reproduce with the full<br>
mixer due to the aforementioned problems.<br>
<br>
Best regards<br>
Pavel<br>
<br>
Laurence Marks píše v St 08. 08. 2018 v 11:44 -0500:<br>
> I am testing adding the compiler directive !DEC$ NOOPTIMIZE to the<br>
> Kahan summations in charge.f in order to prevent ifort from<br>
> optimizing the summation away. It seems to help.<br>
> <br>
> Does anyone know if there are equivalents in gfortran or other<br>
> compilers? (I can't find anything for gfortran.)<br>
> <br>
> N.B., if anyone has experience with directives and wants to suggest<br>
> others that may be faster but will avoid optimizing away the<br>
> summation I am open to suggestions.<br>
> <br>
> ______________________________<wbr>_________________<br>
> Wien mailing list<br>
> <a href="mailto:Wien@zeus.theochem.tuwien.ac.at" target="_blank">Wien@zeus.theochem.tuwien.ac.a<wbr>t</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__zeus.theochem.tuwien.ac.at_mailman_listinfo_wien&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=QyQYMuoW6bN9WUM8q9rgMGkZX1qo4mhebpNwy6CgZYg&s=AO9cbzTkaL7wjby4sVvXjic9gjJNqjr4Ok0j7lcCehA&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__zeus.the<wbr>ochem.tuwien.ac.at_mailman_lis<wbr>tinfo_wien&d=DwIGaQ&c=yHlS04Hh<wbr>Braes5BQ9ueu5zKhE7rtNXt_<wbr>d012z2PA6ws&r=U_T4PL6jwANfAy4r<wbr>nxTj8IUxm818jnvqKFdqWLwmqg0&m=<wbr>QyQYMuoW6bN9WUM8q9rgMGkZX1qo4m<wbr>hebpNwy6CgZYg&s=AO9cbzTkaL7wjb<wbr>y4sVvXjic9gjJNqjr4Ok0j7lcCehA&<wbr>e=</a><br>
> SEARCH the MAILING-LIST at: <br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_index.html&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=QyQYMuoW6bN9WUM8q9rgMGkZX1qo4mhebpNwy6CgZYg&s=JEkVkLlljxw4YibMTPxypqQqbu7L_RFseDpnQ2k4LC8&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__www.mail<wbr>-2Darchive.com_wien-40zeus.<wbr>theochem.tuwien.ac.at_index.<wbr>html&d=DwIGaQ&c=yHlS04HhBraes5<wbr>BQ9ueu5zKhE7rtNXt_d012z2PA6ws&<wbr>r=U_T4PL6jwANfAy4rnxTj8IUxm818<wbr>jnvqKFdqWLwmqg0&m=QyQYMuoW6bN9<wbr>WUM8q9rgMGkZX1qo4mhebpNwy6CgZY<wbr>g&s=JEkVkLlljxw4YibMTPxypqQqbu<wbr>7L_RFseDpnQ2k4LC8&e=</a><br>
<br>
______________________________<wbr>_________________<br>
Wien mailing list<br>
<a href="mailto:Wien@zeus.theochem.tuwien.ac.at" target="_blank">Wien@zeus.theochem.tuwien.ac.a<wbr>t</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__zeus.theochem.tuwien.ac.at_mailman_listinfo_wien&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=QyQYMuoW6bN9WUM8q9rgMGkZX1qo4mhebpNwy6CgZYg&s=AO9cbzTkaL7wjby4sVvXjic9gjJNqjr4Ok0j7lcCehA&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__zeus.the<wbr>ochem.tuwien.ac.at_mailman_lis<wbr>tinfo_wien&d=DwIGaQ&c=yHlS04Hh<wbr>Braes5BQ9ueu5zKhE7rtNXt_<wbr>d012z2PA6ws&r=U_T4PL6jwANfAy4r<wbr>nxTj8IUxm818jnvqKFdqWLwmqg0&m=<wbr>QyQYMuoW6bN9WUM8q9rgMGkZX1qo4m<wbr>hebpNwy6CgZYg&s=AO9cbzTkaL7wjb<wbr>y4sVvXjic9gjJNqjr4Ok0j7lcCehA&<wbr>e=</a><br>
SEARCH the MAILING-LIST at: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_index.html&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=QyQYMuoW6bN9WUM8q9rgMGkZX1qo4mhebpNwy6CgZYg&s=JEkVkLlljxw4YibMTPxypqQqbu7L_RFseDpnQ2k4LC8&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http-3A__www.mail<wbr>-2Darchive.com_wien-40zeus.<wbr>theochem.tuwien.ac.at_index.<wbr>html&d=DwIGaQ&c=yHlS04HhBraes5<wbr>BQ9ueu5zKhE7rtNXt_d012z2PA6ws&<wbr>r=U_T4PL6jwANfAy4rnxTj8IUxm818<wbr>jnvqKFdqWLwmqg0&m=QyQYMuoW6bN9<wbr>WUM8q9rgMGkZX1qo4mhebpNwy6CgZY<wbr>g&s=JEkVkLlljxw4YibMTPxypqQqbu<wbr>7L_RFseDpnQ2k4LC8&e=</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div class="m_6932708257531447663gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Professor Laurence Marks</span><br></div><div dir="ltr"><span class=""><span style="font-size:12.8px">"Research is to see what everybody else has seen, and to think what nobody else has thought", </span><span style="font-size:12.8px">Albert Szent-Gyorgi</span><br></span><a href="http://www.numis.northwestern.edu" target="_blank">www.numis.northwestern.edu</a> ; <span style="font-size:12.8px">C<wbr>orrosion in 4D: </span><a href="http://MURI4D.numis.northwestern.edu" style="font-size:12.8px" target="_blank">MURI4D.numis.northwestern.edu</a><div><span style="font-size:12.8px">Partner of the CFW 100% program for gender equity, </span><a href="http://www.cfw.org/100-percent" style="font-size:12.8px" target="_blank">www.cfw.org/100-<wbr>percent</a></div><div>Co-Editor, Acta Cryst A</div></div></div></div></div></div></div></div></div></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Professor Laurence Marks</span><br></div><div dir="ltr"><span style="font-size:12.8px">"Research is to see what everybody else has seen, and to think what nobody else has thought", </span><span style="font-size:12.8px">Albert Szent-Gyorgi</span><br><a href="http://www.numis.northwestern.edu" target="_blank">www.numis.northwestern.edu</a> ; <span style="font-size:12.8px">Corrosion in 4D: </span><a href="http://MURI4D.numis.northwestern.edu" style="font-size:12.8px" target="_blank">MURI4D.numis.northwestern.edu</a><div><span style="font-size:12.8px">Partner of the CFW 100% program for gender equity, </span><a href="http://www.cfw.org/100-percent" style="font-size:12.8px" target="_blank">www.cfw.org/100-percent</a></div><div>Co-Editor, Acta Cryst A</div></div></div></div></div></div></div></div></div></div></div>
</div>