<div dir="ltr"><div><div>Hi all,</div><div><br></div><div>I ran into an error recently where difxcalc was segfaulting on files where calcif2 ran happily.  After some tedious investigation that I'll spare you the details of, I believe that line 115 in difxcalc/src/d_out.f is to blame:</div><div><br></div><div>      Character*9 Site_c(36)</div><div><br></div><div>This seems to be hardcoding a variable related to the number of sites to be 36, while in the cmxst11.i include file there is a variable that seems like it should be the maximum number of sites that is set to 81:</div><div><br></div><div>      Parameter(Max_Stat = 81)</div><div><br></div><div>(Actually the number 36 also makes an appearance on line 17 of d_out.f in a similar variable).</div><div><br></div><div>The test I was running had 40 antennas.  If I update these numbers in d_out.f from 36 to a larger value than the number of antennas in the calc file, then everything runs happily.</div><br></div><div>So I was going to update those two lines in d_out.f to be of length Max_stat rather than hardcoded to 36.  It seems that to do so, I need to include the cmxst11 file prior to the declaration of the relevant variable in the subroutine (seems logical).  Just wanted to check from someone who knows FORTRAN better than me that that was okay, since at the moment it is being included after all the variable declarations.  I also wondered if we need to ensure that difxcalc checks to make sure that the number of requested stations is not greater than max_stat - at the moment, I can't see that such a check is being made (it certainly wasn't being made against that hardcoded 36 number).</div><div><br></div><div>Cheers,</div><div>Adam<br></div><div><div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px"><div dir="ltr" style="font-size:12.8px">!=============================================================!<br><div dir="ltr" style="font-size:12.8px">Prof. Adam Deller         </div></div><div style="font-size:12.8px">Centre for Astrophysics & Supercomputing </div><div dir="ltr" style="font-size:12.8px">Swinburne University of Technology    <br>John St, Hawthorn VIC 3122 Australia</div><div style="font-size:12.8px">phone: +61 3 9214 5307</div><div style="font-size:12.8px">fax: +61 3 9214 8797</div><div style="font-size:12.8px">!=============================================================!</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>