<div dir="ltr"><div dir="ltr"><div class="gmail_attr">Paolo, you mentioned dealing with large matrices.  Some modern platforms do not correctly handle extremely large static arrays.  This matches your scenario very nicely.  Most programs run fine, but nisclue.f is consistently the rogue.  This is discussed competently in this post.  Scroll down to "Your third-party tooling is generating a huge static data structure, something that’s not compatible with the Apple silicon runtime model".  They are specifically discussing M1's, but I suspect it is about the same for all modern macs.</div><div class="gmail_attr"><br></div><div class="gmail_attr">      <a href="https://developer.apple.com/forums/thread/722360">https://developer.apple.com/forums/thread/722360</a><br></div><div class="gmail_attr"><br></div><div class="gmail_attr">I have run into this myself.  The cure is absurdly simple, even with ancient fortran code.  Locate your most gigantic arrays, and switch them from static to dynamic allocation at the start of the program.  Probably you only need to change few of the worst offenders, leave all the small ones alone.  The magic number on modern macs seems to be 2 GBYTES, and that is probably TOTAL static allocation.  For example:</div><div class="gmail_attr"><br></div><div class="gmail_attr">      <    real monster(5000,1000,1000)</div><div class="gmail_attr"><br></div><div class="gmail_attr">      >    real, allocatable :: monster(:,:,:)             ! in declarations</div><div class="gmail_attr">      >    allocate (monster(5000,1000,1000))     ! in executable area</div><div class="gmail_attr"><br></div><div class="gmail_attr">Yes, you are contaminating archaic fortran with a little bit of fortran 90, but gfortran and others handle this very well.  You may also see collateral benefits such as smaller executable, and faster compile and run startup times.  BTW this works the same for both C and fortran arrays, IIRC.  I use modern gfortran's on Mac all the time, and they continue to work fine for complex projects.</div><div class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Tue, Oct 1, 2024 at 10:36 AM P. Denti via macports-users <<a href="mailto:macports-users@lists.macports.org">macports-users@lists.macports.org</a>> wrote:<br>Subject: Reply to Maxim Abalenkov + a pair of sad reflections</div><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hello Maxim,<br>thank you very much for indicating the article on Apple Developer.<br>I am final user of Fortran as a  physicist who developed some research software just in Fortran.<br>The hardware based on Intel CPU i7 is about nine-years-old, so that I bought a new iMac M3.<br>The new software Sonoma, now Sequoia, according to the article have an architecture that is responsible for the signaled failure.<br><br>It is a pity that, attempting to work around the difficulty on Fortran changing gcc port, I found all gcc's  branded as notoriously not working, with the (apparent!) exception of gcc14.<br>As a naive user, I now think that problems with Fortran could be overcome with appropriate patches to the linker. But, according to article, the problem is rather old…<br><br>Otherwise inconvenient is the building procedure of gcc and its library: for around an hour the cpu cores temperature is 100-108 Kelvin, on account that no fan is present in iMac ...<br><br>Thank you,<br>best wishes,<br>Paolo</blockquote></div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 1, 2024 at 3:27 AM Maxim Abalenkov <<a href="mailto:maxim.abalenkov@gmail.com">maxim.abalenkov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="line-break:after-white-space">Hello Paolo,<div><br></div><div>How are you? A quick search on the Internet results in the following links:</div><div><br></div><div><a href="https://stackoverflow.com/questions/74909796/missing-libsystem-b-dylib-file-on-macos" target="_blank">https://stackoverflow.com/questions/74909796/missing-libsystem-b-dylib-file-on-macos</a></div><div><a href="https://stackoverflow.com/questions/70549365/why-are-my-system-libraries-and-frameworks-not-visible-in-macos-monterey" target="_blank">https://stackoverflow.com/questions/70549365/why-are-my-system-libraries-and-frameworks-not-visible-in-macos-monterey</a></div><div><a href="https://developer.apple.com/forums/thread/655588" target="_blank">https://developer.apple.com/forums/thread/655588</a></div><div><br></div><div>The article on the Apple Developer forum may be most helpful for you. Thank you and have a great day ahead!</div><div>—</div><div>Best wishes,</div><div>Maxim</div><div><br></div><div><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div>Maxim Abalenkov \\ <a href="mailto:maxim.abalenkov@gmail.com" target="_blank">maxim.abalenkov@gmail.com</a><br>+44 7 486 486 505 \\ <a href="http://www.maxim.abalenkov.uk" target="_blank">www.maxim.abalenkov.uk</a></div></div></div>
</div>
<div><br><blockquote type="cite"><div>On 1 Oct 2024, at 10:16, P. Denti via macports-users <<a href="mailto:macports-users@lists.macports.org" target="_blank">macports-users@lists.macports.org</a>> wrote:</div><br><div><div style="line-break:after-white-space"><span style="font-family:Monaco;font-size:10px">Failure starting with OS Sonoma, now with Sequoia.</span><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">Processor is M3 on iMac.</span><br style="font-family:Monaco;font-size:10px"><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">The following message in Sonoma:</span><br style="font-family:Monaco;font-size:10px"><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">paolo in ~/Desktop/nisclue240 $ ./nisclue</span><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">dyld[78445]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed</span><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">dyld[78445]: Library not loaded: /usr/lib/libSystem.B.dylib</span><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px"> Referenced from: <A5EF4235-E54A-3375-A9DC-4278E534593E> /Users/paolo/Desktop/nisclue240/nisclue</span><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px"> Reason: tried: 'usr/lib/libSystem.B.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/O/uS/usr/lib/libSystem.B.dylib' (no such file), '/usr/lib/libSystem.B.dylib' (no such file, no dyld cache)</span><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">Abort trap: 6</span><br style="font-family:Monaco;font-size:10px"><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">Analogous response in Sequoia.</span><br style="font-family:Monaco;font-size:10px"><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">Additional information:</span><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">The same job runs until completion on a  previous iMac with processor i7 with OS Monterey.</span><br style="font-family:Monaco;font-size:10px"><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">nisclue from nisclue.f is the only job in a dozen of similar jobs that refuses to work;</span><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">a common feature of these jobs is  dealing with large matrices.</span><br style="font-family:Monaco;font-size:10px"><br style="font-family:Monaco;font-size:10px"><span style="font-family:Monaco;font-size:10px">If this information is insufficient, and sources and data involved are required, I  will post.</span></div></div></blockquote></div></div></div></blockquote></div></div>