runstruct_vasp errors

Hello all,

I’ve been tasked with setting ATAT up for our group and I feel like I have a pretty good grasp on everything (or at least a good grasp on how I can figure out things), yet there’s one thing that’s holding me up.

When I run runstruct_vasp I get the following errors:

tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
tail: n: invalid number of lines
awk: (FILENAME=- FNR=1) fatal: division by zero attempted
Segmentation fault

I’m assuming this has something to do with the numerous (and weird) invokations of "tail --n -n -n -n etc…" in the script, but I’m mostly guessing. I don’t have a ton of csh programming background so any help is appreciated and there no amount of dumbing down that could possibly insult my intelligence.

Thanks,
G

Please check the scripts ezvasp and str2ezvasp under <atat_dir>/glue/vasp.
The syntax should be tail -n +<num> instead of a string of -n’s. (Would you mind reproducing that line here?)
Also check if csh or tcsh exists under /bin.

Thanks for the reply,

I have looked, and csh is located in /bin (it’s actually redirecting to tcsh, but that should be fine, right?)
Here are two representative sequences of code that illustrate what I was referring to:

tail -n -n -n -n -n -n -n -n -n -n -n -n -n -n -n -n -n -n +3 poscar.tmp | head -3 >! oldcell.tmp

echo set POTPATH=$POTgrep -i usepot $1 | tail -n -n -n -n -n -n -n -n -n -n -n -n -n -n -n -n -n -n -1 | sed -e 's/ *[^ =]*[ =]//g' -e 's/ *$//g' > tmpez.sh

I have probably nine or so instances of this type of line in the ezvasp script and two instances in str2ezvasp.

Thanks again

That is very strange. A quick fix would be to manually delete all the extra -n’s. Each "tail" should be followed by one instance of -n only, so the two lines should look like:

tail -n +3 poscar.tmp | head -3 >! oldcell.tmp

echo set POTPATH=\$POT`grep -i usepot $1 | tail -n -1 | sed -e 's/ *[^ =]*[ =]//g' -e 's/ *$//g'` > tmpez.sh

Please let us know if you still have errors after that!

If you wish, you can download a fresh copy and see if you still get those extra -n’s in <atat_dir>/glue/vasp.

I had a great deal more of those weird continuous -n’s in other files, but after a tedious search-and-destroy, the program is now successfully running.

Thank you so much.

Sorry for the issue!
This may have occurred with old versions of ATAT were the installation script check if your system understood "tail " or "tail -n" and patched accordingly. It looks like the installation script incorrectly patched multiple times…

This issue should no longer occur on the latest version of ATAT:
All "tail" are invoked as "tail -n" (all systems seem to understand this syntax) and no patch is performed during install anymore.