<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Open Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Tuesday, February 14, 2017 9:51:50 PM CET Dominik Gresch wrote:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Dear Wannier90 community,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> While running Wannier90 with the 'use_ws_distance = .TRUE.' flag, I</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> encounter the error 'wrong irdist_ws'. Does anyone know the nature of</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> this error?</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">This error should never happen, although if the position of the centres of the WFs are very noisy it may pop up. It is difficult to tell without having the slightest detail about your calculation. </p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Could you please provide us the files necessary to reproduce you calculation (ie. all the file seedname.*, except the UNK files).</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">As a quick workaround, you can go in the file src/ws_distance.F90 and around line 156 change this check:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> </span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">IF</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">(</span><span style=" font-family:'monospace'; color:#18b2b2; background-color:#ffffff;">ANY</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">(</span><span style=" font-family:'monospace'; color:#18b2b2; background-color:#ffffff;">ABS</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">(</span><span style=" font-family:'monospace'; color:#18b2b2; background-color:#ffffff;">DBLE</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">(irdist_ws)</span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">-</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">irdist_real)</span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">></span><span style=" font-family:'monospace'; color:#b21818; background-color:#ffffff;">1.d-6</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">)) </span><span style=" font-family:'monospace'; color:#b218b2; background-color:#ffffff;">&</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> </span><span style=" font-family:'monospace';"><br /> </span><span style=" font-family:'monospace'; color:#18b2b2; background-color:#ffffff;">call</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> io_error(</span><span style=" font-family:'monospace'; color:#b21818; background-color:#ffffff;">'wrong irdist_ws'</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">)</span><span style=" font-family:'monospace';"><br /><br /></span>allowing for a larger tolerance, something like 1.d-4 or 1.d-3. If then the code runs to the end, it is just a problem of numerical noise/minimisation not being tight enough.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">If this does not help, we definitely need to reproduce the calculation in order to be able to help.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Important things to note:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> - The error seems to appear also for 'use_ws_distance = .FALSE.',</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> but in that case the output files are still written</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Yes, there is a place where the subroutine causing the error is called even when that option is false. This occurence arrives later in the code, hence I can see how the output files are written in this case. To avoid this problem, you can change src/plot.F90 around line 80, from</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">if</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> ( write_hr</span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">.or.</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">write_rmn</span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">.or.</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">write_tb ) </span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">then</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> </span><span style=" font-family:'monospace';"><br /> </span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">if</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> (</span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">.not.</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">done_ws_distance) </span><span style=" font-family:'monospace'; color:#18b2b2; background-color:#ffffff;">call</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> ws_translate_dist(nrpts,irvec) </span><span style=" font-family:'monospace';"><br /> </span><span style=" font-family:'monospace'; color:#18b2b2; background-color:#ffffff;">call</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> ws_write_vec(nrpts,irvec) </span><span style=" font-family:'monospace';"><br /></span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">end if</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace';"><br /></span>to</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">if</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> ( (write_hr</span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">.or.</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">write_rmn</span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">.or.</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">write_tb) </span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">.and.</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> use_ws_distance) </span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">then</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> </span><span style=" font-family:'monospace';"><br /> </span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">if</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> (</span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">.not.</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;">done_ws_distance) </span><span style=" font-family:'monospace'; color:#18b2b2; background-color:#ffffff;">call</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> ws_translate_dist(nrpts,irvec) </span><span style=" font-family:'monospace';"><br /> </span><span style=" font-family:'monospace'; color:#18b2b2; background-color:#ffffff;">call</span><span style=" font-family:'monospace'; color:#000000; background-color:#ffffff;"> ws_write_vec(nrpts,irvec) </span><span style=" font-family:'monospace';"><br /></span><span style=" font-family:'monospace'; color:#af5f00; background-color:#ffffff;">end if</span><span style=" font-family:'monospace';"><br /></span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">And, of course, recompile (I have not tested this, but it should work).</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> - My input files were generated with VASP (meaning, for Wannier90</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> v.1), which could be the source of the problem</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I do not think this makes any difference.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">hth</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Dr. Lorenzo Paulatto </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">IdR @ IMPMC -- CNRS & Université Paris 6</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">phone: +33 (0)1 442 79822 / skype: paulatz</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">www: http://www-int.impmc.upmc.fr/~paulatto/</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">mail: 23-24/423 Boîte courrier 115, 4 place Jussieu 75252 Paris Cédex 05</p></body></html>