<div dir="ltr">
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space">Thank you Klaus. I made changes you suggested. However, I am getting error with one of the changes you suggested. I tried with/without changing </span></span><span style="font-size:12.8px">MPI_TYPE_STRUCT to MPI_TYPE_CREATE_STRUCT, but both seem to give the same error. Do you have any idea why this is so? Here is the output:</span></p><p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>*** Wrote checkpoint file to sedov_hdf5_chk_0005 ****</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>exiting: reached max SimTime</span></p>
<p class="gmail-p1"><span class="gmail-s1"><span class="gmail-Apple-converted-space"> </span>*** Wrote plotfile to sedov_forced_hdf5_plt_cnt_0000 ****</span></p>
<p class="gmail-p1"><span class="gmail-s1">Fatal error in MPI_Type_create_struct: Invalid datatype, error stack:</span></p>
<p class="gmail-p1"><span class="gmail-s1">MPI_Type_create_struct(173): MPI_Type_create_struct(count=4, array_of_blocklengths=0x7fff53b22f00, array_of_displacements=0x7fff53b22f40, array_of_types=0x7fff53b22f20, newtype=0x7fff53b22ef8) failed</span></p>
<p class="gmail-p1"><span class="gmail-s1">MPI_Type_create_struct(142): Invalid datatype</span></p>
<p class="gmail-p1"><span class="gmail-s1">[unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=805970691</span></p>
<p class="gmail-p1"><span class="gmail-s1">:</span></p>
<p class="gmail-p1"><span class="gmail-s1">system msg for write_line failure : Bad file descriptor</span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 11, 2017 at 10:16 AM, Klaus Weide <span dir="ltr"><<a href="mailto:klaus@flash.uchicago.edu" target="_blank">klaus@flash.uchicago.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 10 Oct 2017, Dinesh Kandel wrote:<br>
<br>
> The solution suggested by Cory worked. I was able to run Flash 4 as:<br>
> ./flash4<br>
><br>
> This produces series of output table numbers. But, at the end it returns me<br>
> an error:<br>
><br>
> Fatal error in MPI_Address: Invalid argument, error stack:<br>
><br>
> MPI_Address(285): An address does not fit into a Fortran INTEGER. Use<br>
> MPI_Get_address instead<br>
><br>
> [unset]: write_line error; fd=-1 buf=:cmd=abort exitcode=402713612<br>
><br>
> :<br>
><br>
> system msg for write_line failure : Bad file descriptor<br>
><br>
><br>
> Could anyone let me know how to fix this?<br>
<br>
<br>
This fatal error occurs at the very end of a FLASH run, when FLASH is<br>
trying to generate the second of the Timers summaries that usually are<br>
written at the end of a log file. All computations will have been done by<br>
that point, and all output files should have been written.<br>
<br>
The fix would involve only a few changes in<br>
<br>
subroutine tmr_broadcastRootTimers<br>
<br>
in the source file<br>
<br>
source/monitors/Timers/<wbr>TimersMain/MPINative/Timers_<wbr>getSummary.F90 :<br>
<br>
* change declaration of the 'offsets' array from<br>
<br>
integer :: offsets(5)<br>
<br>
to<br>
<br>
integer(kind=MPI_ADDRESS_KIND) :: offsets(5)<br>
<br>
* change MPI_ADDRESS to MPI_Get_Address (several occurrences);<br>
<br>
* change MPI_TYPE_STRUCT to MPI_TYPE_CREATE_STRUCT (once).<br>
<br>
That should work for MPI-2 (and later), but would break compatibility with<br>
MPI-1.<br>
<br>
<br>
<br>
<br>
> Note that when I run flash using mpirun as: mpirun -np 2 ./flash4, I get<br>
> the following error:<br>
><br>
> Fatal error in MPI_Init: Other MPI error, error stack:<br>
<br>
That appears to be a problem related to your MPI installation(s),<br>
difficult to analyze remotely.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Klaus<br>
</font></span></blockquote></div><br></div>