[Wien] MIXER runtime error + solution on Mac OS X

Kevin Jorissen kevinjorissenpdx at gmail.com
Sun Aug 31 22:31:05 CEST 2014


Dear all,

Jianxin Zhu and I have done a little work on a problem he discovered
running WIEN2k v. 13 on Mac OS X for a medium size calculation (matrix size
~3800; 40 ineq atoms).

ISSUE:
In this calculation, the "mixer" program crashes with a runtime error (it
prints "Illegal Instruction" on my computer) during the SCF loop.

This problem does not occur with WIEN2k v. 12.  It also does not occur for
smaller testcases.  We have only tested ifort.

SOLUTION:
We can solve the situation by adding "-heap-arrays" to the compiler options
for the mixer program:
1.  edit SRC_mixer/Makefile : add "-heap-arrays" to "FOPT".
2. in SRC_mixer directory, do "make"
3. "cp mixer .."
As far as we currently know, it is only needed in mixer.  (No need to use
siteconfig and recompile the entire WIEN2k installation.)  This compiler
option just tells the compiler to put arrays on the memory "heap" rather
than the "stack".

TECHNICAL DETAILS:
Possibly the situation could be avoided entirely by a slight recoding.  Mac
and Linux have slightly different rules for how to use memory, for the
different types of arrays (dynamically or statically allocated, array
temporaries ...).  It seems that the issue happens when qmix8 calls NormS
(a routine that didn't exist in WIEN2k_12) : a debugging statement right
before "call norms" is executed, but a debugging statement in the first
line of "subroutine norms" is not executed.  (I'm no expert in memory
issues, so I'm trying to report as phenomenologically as possible.)  The
objects in this function call are ca. 1,500,000 x 2 size in my test, or
~20MB each.  My hunch is that the first dimension would grow with number of
atoms, whereas the second dimension will grow with the number of SCF
iterations.  Perhaps just changing the definition/allocation of the arrays
in the function call can quickly solve the issue without need for custom
compilation options!


I don't know that we will have time for further analysis, so we wanted to
submit our report as is.  If anyone would like to test this calculation
themselves, please ping Jianxin for files.  Thanks everyone :).


Cheers,

Jian Xin
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20140831/d60019a1/attachment.htm>


More information about the Wien mailing list