# Error with macroave

**URL:** <https://discourse.abinit.org/t/error-with-macroave/3088>\
**Category:** Other tools and postprocessing in ABINIT\
**Created:** [February 20, 2022, 3:49am UTC](https://discourse.abinit.org/t/error-with-macroave/3088 "2022-02-20T03:49:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carl\_D](https://discourse.abinit.org/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@Carl\_D](https://discourse.abinit.org/u/Carl_D)\
**Post date:** [February 20, 2022, 3:49am UTC](https://discourse.abinit.org/t/error-with-macroave/3088/1 "2022-02-20T03:49:02Z")

</div>

Hi all,  
I am trying to process a potential file with the macroave utility of Abinit. It gives me the following error  
At line 3096 of file m\_hdr.F90 (unit = 1024, file = ‘spo\_VPSP’)  
Fortran runtime error: End of file  
Error termination. Backtrace:

Could not print backtrace: executable file is not an executable  
#0 0x104b309b7  
#1 0x104b3162f  
#2 0x104b31fb3  
#3 0x104bfa6b3  
#4 0x104bfb027  
#5 0x104bfb10f  
#6 0x104bfd333  
#7 0x104bfdaf3  
#8 0x102d6d767  
#9 0x102d519b3  
#10 0x102d55687  
This happen when I run my calculations with **occopt 9 and nqfd input**. I am not sure how to fix this. Any assistance will be greatly appreciate.

---

<div class="post-metadata">

**Author:** ![mverstra](https://discourse.abinit.org/user_avatar/discourse.abinit.org/mverstra/32/92_2.png) [@mverstra](https://discourse.abinit.org/u/mverstra)\
**Post date:** [February 24, 2022, 3:33pm UTC](https://discourse.abinit.org/t/error-with-macroave/3088/2 "2022-02-24T15:33:48Z")

</div>

looks like it does not find the right matching fields for occopt 9 in the binary file, or else finds them while not expecting them. Simplest explanations: your macroave was not compiled with the same version of abinit. Make sure with:  
which macroave

Otherwise it could be that occopt 9 was not completely implemented for all i/o patterns, combining parallel io (MPIIO with an mpirun abinit), normal fortran binary, netcdf, etc… Which do you use?

Also, why do you want to look at VPSP?

Finally, if you recompile with “-g” FCFLAG option you will get a better stack when it crashes, and we can see better what is going on (who is calling the final routine for example).

---

<div class="post-metadata">

**Author:** ![Carl\_D](https://discourse.abinit.org/letter_avatar_proxy/v4/letter/c/82dd89/32.png) [@Carl\_D](https://discourse.abinit.org/u/Carl_D)\
**Post date:** [February 25, 2022, 2:29am UTC](https://discourse.abinit.org/t/error-with-macroave/3088/3 "2022-02-25T02:29:47Z")

</div>

Thanks for looking at this. Macroave is compiled with the Abinit version I am using. When I get the VPSP without using occupt 3 for instance, macroave works perfectly. I guess then it has to be your second proposition. I am not sure of what i/o patterns they have used as I am running thing on a cluster.

I am interested in the macroscopic average of the electrostatic potential in my system, so I am looking at V\_HA and VPSP.

Thanks.

---

<div class="post-metadata">

**Author:** ![mverstra](https://discourse.abinit.org/user_avatar/discourse.abinit.org/mverstra/32/92_2.png) [@mverstra](https://discourse.abinit.org/u/mverstra)\
**Post date:** [February 25, 2022, 8:40am UTC](https://discourse.abinit.org/t/error-with-macroave/3088/4 "2022-02-25T08:40:05Z")

</div>

If you can afford to, run the last iteration with a sequential run (read in the WFK file).

Alternatively, you might try to launch macroave with mpirun, or even mpirun -np 2 to see if that works.

At this stage without more information I don’t know if the PSP file has the added line for occopt 9, but then it is not read, or whether it is lacking it, and macroave tries to read it and fails.
