A.2 FHI-aims aborts with a segfault at the beginning of the first test run.
We here repeat the information given already in Chapter 1:
If you are not familiar with Unix or Unix-like operating systems, the following will perhaps clarify what is going on. In Unix, the operating system kernel will allow a program to allocate / deallocate the variables it requires on the so-called heap. For small quick variables needed at runtime, this is not always the most efficient procedure (you do not want to allocate / deallocate every single loop counter in your code, for example). Such small variables can instead be requested from a stack, available per process, and also controlled by the kernel.
In principle, using the stack is not a great problem on current computers available for scientific computing, because you will rarely ever find more than a few processes at the same time that make excessive use of the stack. So, technically it should not matter whether you get your memory from the heap, or from the stack.
Unfortunately, for reasons unbeknownst to us, some opertaing system vendors limit the default user stack size to 5 MB in a time when typical available RAM per processor is 2 GB or more. For some purposes, FHI-aims requires that the execution stack size available to you be large enough for some initial internal operations. If too little stack is available, your FHI-aims run will segfault shortly after the command was launched. In that case, type:
> ulimit -s unlimited
(when using the bash shell or similar), or
> limit stacksize unlimited
(when using the tcsh or similar).
> echo $SHELL
will tell you which shell you are using. Ideally, this same setting should be specified in your .profile, .bashrc, or .cshrc login profiles. If “unlimited” does not work, try setting a large value instead, e.g., ulimit -s 500000.
If any of these steps are not allowed, you will have to contact the system manager of your computer in order to modify the stack size limits set by the kernel of your operating system.
FHI-aims prints at startup the settings of the stacksize as they are found on your system. As mentioned, here “unlimited” or a large value should be reported.