<div dir="ltr"><div>Thank you Michael and Gus for the debugging suggestions. Based on 
both of your suggestions, I have done the compilation and rerun the 
model with debug mode true. Though I didn't get any error messages in 
STDERR files, I got additional messages as below on screen. It is 
pointing to the line numbers in three codes. Also STDOUT file shows that
 just before the model crashes it is trying to call the subroutine 
CALC_PCO2_APPROX several times. I did a preliminary check of these three
 codes and the CALC_PCO2_APPROX subroutine. But I am not able to 
understand what is causing the error. I need to thoroughly check these 
codes again. Meanwhile please give your suggestions.   <br></div><div><br></div><div><br></div><div>A)  Program received signal SIGSEGV: Segmentation fault - invalid memory reference.<br><br>Backtrace for this error:<br>#0  0x7f1a828562ed in ???<br>#1  0x7f1a82855503 in ???<br>#2  0x7f1a820eafcf in ???<br>#3  0x555923c54713 in bling_bio_nitrogen_<br>  at /home/adrao/Remy-mitgcm-ii/MITgcm/verification/bling/code/bling_bio_nitrogen.f:4053<br>#4  0x555923c6b514 in bling_main_<br>    at /home/adrao/Remy-mitgcm-ii/MITgcm/verification/bling/code/bling_main.f:4199<br>#5  0x555923d34205 in gchem_forcing_sep_<br>     at /home/adrao/Remy-mitgcm-ii/MITgcm/verification/bling/code/gchem_forcing_sep.f:3891<br>#6  0xffffffffffffffff in ???<br>#0  0x7f09611532ed in ???</div><div><br></div><br><div>The portion of three codes with line numbers mentioned in the error messages are included below</div><div><br></div><div>1) bling_bio_nitrogen.f</div><div><br></div><div>C  Initialize output and diagnostics</div><div>  DO k=1,Nr<br>         DO j=1-OLy,sNy+OLy<br>           DO i=1-OLx,sNx+OLx<br>              G_DIC(i,j,k)          = 0.D0<br>              G_ALK(i,j,k)          = 0.D0</div><div>              -----------------------------</div><div>              ---------------------------- etc<br></div><div>4053    G_SI(i,j,k)             = 0.D0</div><div>            ------------------------- etc<br></div><div>              ENDDO<br>         ENDDO<br>       ENDDO</div><div><br></div><div>2) bling_main.f<br></div><div><br></div><div>C  biological activity<br>C  call either "BLING" or "BLING + nitrogen"<br>       CALL BLING_BIO_NITROGEN(<br>     I                 PTR_O2, PTR_FE, PTR_PO4, PTR_DOP,<br>     I                 PTR_NO3, PTR_DON,<br>     I                 PTR_SI,<br>     U                 G_DIC, G_ALK, G_O2, G_FE,<br>     U                 G_PO4, G_DOP, G_NO3, G_DON,<br>     I                 bi, bj, imin, imax, jmin, jmax,</div><div>4199   I                 myTime, myIter, myThid)</div><div><br></div><div><br></div><div><br></div><div>3) gchem_forcing_sep.f</div><div><br></div><div>ccccccccccccccccccccccccccc BLING cccccccccccccccccccccccccccccccc<br>        IF ( useBLING ) THEN<br>          CALL BLING_MAIN( pTracer(1-OLx,1-OLy,1,bi,bj,1),<br>     &                          pTracer(1-OLx,1-OLy,1,bi,bj,2),<br>     &                          pTracer(1-OLx,1-OLy,1,bi,bj,3),<br>     &                          pTracer(1-OLx,1-OLy,1,bi,bj,4),<br>     &                          pTracer(1-OLx,1-OLy,1,bi,bj,5),<br>     &                          pTracer(1-OLx,1-OLy,1,bi,bj,6),<br>     &                          pTracer(1-OLx,1-OLy,1,bi,bj,7),<br>     &                          pTracer(1-OLx,1-OLy,1,bi,bj,8),<br>     &                          pTracer(1-OLx,1-OLy,1,bi,bj,9),<br>     &                          bi, bj, iMin, iMax, jMin, jMax,</div><div>3891  &                          myTime, myIter, myThid )<br>        ENDIF<br>cccccccccccccccccccccccccc END BLING cccccccccccccccccccccccccccccccccc</div><div><br></div><div>###################################################################</div><div><br></div><div><div> B)  The last lines in the STDOUT file <br></div><div><br></div><div>(PID.TID 0009.0001) DEBUG_MSG: CALLING S/R CALC_PCO2_APPROX<br>(PID.TID 0009.0001) DEBUG_MSG: CALLING S/R CALC_PCO2_APPROX<br>(PID.TID 0009.0001) DEBUG_MSG: CALLING S/R CALC_PCO2_APPROX<br>(PID.TID 0009.0001) DEBUG_MSG: CALLING S/R CALC_PCO2_APPROX<br>(PID.TID 0009.0001) DEBUG_MSG: CALLING S/R CALC_PCO2_APPROX<br>(PID.TID 0009.0001) DEBUG_MSG: CALLING S/R CALC_PCO2_APPROX</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 6, 2021 at 9:21 PM Gus Correa <<a href="mailto:gus@ldeo.columbia.edu">gus@ldeo.columbia.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi Kunal</div><div><br></div><div>Along the line mentioned by Michael.</div><div><br></div><div>You can compile fresh adding the -devel flag to genmake2 (do a make CLEAN or just delete your build directory beforehand to avoid any leftover).</div><div>Your build options file *probably* already has debug flags that are activated if you use -devel in genmake2. <br></div><div>I think they are flags like FOPT or similar. Check.<br></div><div><br></div><div>Then add a namelist flag (can't remember by the exact name, check) to use debug at runtime in the eesupp namelist file ...  <br></div><div>hmmm ...  debugMode-.TRUE. ... I think. <br></div><div><br></div><div>Finally, raise the debug level in the "data" PARM01 namelist debugLevel=4 (or 5).</div><div><br></div><div>This will drop more error messages in STDERR.???? and traceback the call stack the point of failure,</div><div>more verbose than it is now.<br></div><div><br></div><div>I would guess some subroutine interface may be missing one of the tracers, probably silica, but it can be another thing.</div><div><br></div><div>I hope this helps<br></div><div>Gus<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Sep 4, 2021 at 9:38 AM Michael Schaferkotter <<a href="mailto:schaferk@bellsouth.net" target="_blank">schaferk@bellsouth.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">1. just to be sure, if parameter values in *.h are altered, you must recompile.<div><br></div><div>2. for ifort compiler, recompile with:</div><div><pre style="background-color:rgb(248,248,248);font-size:1em;overflow:auto;padding:0.5em;border:thin solid rgb(216,216,216);white-space:pre-wrap;color:rgb(34,34,34);text-align:justify"><code style="font-family:"Roboto Mono",monospace"><br></code></pre><pre style="background-color:rgb(248,248,248);font-size:1em;overflow:auto;padding:0.5em;border:thin solid rgb(216,216,216);white-space:pre-wrap;color:rgb(34,34,34);text-align:justify"><code style="font-family:"Roboto Mono",monospace">g -check all -fpe0 -warn -traceback -debug extended</code></pre><div><br></div>gfortran</div><div><pre style="background-color:rgb(248,248,248);font-size:1em;overflow:auto;padding:0.5em;border:thin solid rgb(216,216,216);white-space:pre-wrap;color:rgb(34,34,34);text-align:justify"><code style="font-family:"Roboto Mono",monospace"><br></code></pre><pre style="background-color:rgb(248,248,248);font-size:1em;overflow:auto;padding:0.5em;border:thin solid rgb(216,216,216);white-space:pre-wrap;color:rgb(34,34,34);text-align:justify"><code style="font-family:"Roboto Mono",monospace">-g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=invalid,zero,overflow,underflow -finit-real=nan</code></pre><pre style="background-color:rgb(248,248,248);font-size:1em;overflow:auto;padding:0.5em;border:thin solid rgb(216,216,216);white-space:pre-wrap;color:rgb(34,34,34);text-align:justify"><code style="font-family:"Roboto Mono",monospace"><br></code></pre><div dir="ltr">rerun.</div><div id="gmail-m_7176071164104963526gmail-m_-2839542332176928859AppleMailSignature" dir="ltr"><br></div><div id="gmail-m_7176071164104963526gmail-m_-2839542332176928859AppleMailSignature" dir="ltr">the stack trace will be more meaningful.</div><div id="gmail-m_7176071164104963526gmail-m_-2839542332176928859AppleMailSignature" dir="ltr"><br></div><div id="gmail-m_7176071164104963526gmail-m_-2839542332176928859AppleMailSignature" dir="ltr">michael</div><div id="gmail-m_7176071164104963526gmail-m_-2839542332176928859AppleMailSignature" dir="ltr"><br></div><div dir="ltr">Sent from Here3.</div><div dir="ltr"><br><blockquote type="cite">On Sep 4, 2021, at 02:14, kunal madkaiker <<a href="mailto:kunal.madkaiker02@gmail.com" target="_blank">kunal.madkaiker02@gmail.com</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="auto"><div style="font-family:sans-serif;font-size:12.8px" dir="auto">Thank you Matthew and Gus for your valuable suggestions. I could resolve the 2nd query as suggested by Matt by adding apco2file in data.bling.</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">I wanted to add few points regarding my 1st query (about adding silicate as 9th tracer). The PTRACERS_num ( in PTRACER_SIZE.h ), PTRACERS_numInUse, PTRACERS_useGMRedi (in data.ptracers), etc are already 9. So the error may not be due to this. Also the same model setup is running fine for the MITgcm-checkpoint67j (2019/06/18 ) release. This is the version where the USE_SIBLING option is added to the BLING package for the first time. However, I want to use the latest (or recent year) release. As Matthew asked I am also including the detailed message I get on screen when the model crashes. My STDERR files don't contain any error messages. So is this problem related to MITgcm release ?<br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">Backtrace for this error:<br>#0  0x7f09681cc2ed in ???<br>#1  0x7f09681cb503 in ???<br>#2  0x7f0967a60fcf in ???<br>#3  0x5636cbe79533 in ???<br>#4  0x5636cbe8c909 in ???<br>#5  0x5636cbf36923 in ???<br>#6  0xffffffffffffffff in ???</div><div style="color:rgb(80,0,80);font-family:sans-serif;font-size:12.8px" dir="auto"><div>Program received signal SIGSEGV: Segmentation fault - invalid memory reference.</div><br></div><span style="font-family:sans-serif;font-size:12.8px">Backtrace for this error:</span><br style="font-family:sans-serif;font-size:12.8px"><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">==============================</span><span style="font-family:sans-serif;font-size:12.8px">==============================</span><span style="font-family:sans-serif;font-size:12.8px">=======================</span><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES</span><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">=   PID 63826 RUNNING AT ADRAO</span><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">=   EXIT CODE: 139</span><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">=   CLEANING UP REMAINING PROCESSES</span><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES</span><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">==============================</span><span style="font-family:sans-serif;font-size:12.8px">==============================</span><span style="font-family:sans-serif;font-size:12.8px">=======================</span><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)</span><br style="font-family:sans-serif;font-size:12.8px"><span style="font-family:sans-serif;font-size:12.8px">This typically refers to a problem with your application.</span><br style="font-family:sans-serif;font-size:12.8px"><div style="font-family:sans-serif;font-size:12.8px" dir="auto">Please see the FAQ page for debugging suggestions</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto"><br></div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">Regards,</div><div style="font-family:sans-serif;font-size:12.8px" dir="auto">Kunal</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 4 Sep 2021, 01:14 Gus Correa, <<a href="mailto:gus@ldeo.columbia.edu" target="_blank">gus@ldeo.columbia.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 3, 2021 at 1:48 PM Matthew Mazloff <<a href="mailto:mmazloff@ucsd.edu" rel="noreferrer" target="_blank">mmazloff@ucsd.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello<br>
<br>
1) Do you have some more info on the error? Anything else given?<br>
My first guess: did you set<br>
      PARAMETER(PTRACERS_num = 9 )<br>
in PTRACERS_SIZE.h?<br>
<br>
2) You have to give the exf parameters in data.bling, not data.ext. <br>
<br>
-Matt<br></blockquote><div><br></div><div>Yes, as Matthew said, segfault is because </div><div>PARAMETER(PTRACERS_num = )</div><div>is probably less than 9.</div><div>I had the same error before.</div><div><br></div><div>... and add to data.ptracers:</div><div><br></div><div> PTRACERS_numInUse=9,<br> PTRACERS_useGMRedi=9*.TRUE., (if using GMRedi)<br> PTRACERS_useKPP=9*.TRUE., (if using KPP)</div><div><br></div><div>and the ptracers name, long name, units, etc, for instance<br></div><div><br></div><div> PTRACERS_names(1)='dic',<br> PTRACERS_long_names(1)='Dissolved Inorganic Carbon',<br> PTRACERS_units(1)='mol C/m^3',<br> PTRACERS_advScheme(1)=77,<br> PTRACERS_diffKh(1)=0.E3,<br> PTRACERS_diffKr(1)=3.E-5,</div><div><br></div><div>Gus<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
> On Sep 3, 2021, at 10:38 AM, kunal madkaiker <<a href="mailto:kunal.madkaiker02@gmail.com" rel="noreferrer" target="_blank">kunal.madkaiker02@gmail.com</a>> wrote:<br>
> <br>
> Dear All,<br>
> <br>
>        I have two queries regarding the BLING model.<br>
> <br>
> 1) I am running the recent release of MITgcm coupled to the BLING module. The model is running fine if I use the default 8 tracer option. When I try to add silica as 9th tracer (#define USE_SIBLING in BLING_OPTIONS.h), the model crashes in the beginning giving the following error message "Program received signal SIGSEGV: Segmentation fault - invalid memory reference.".<br>
> <br>
> 2) I want the model to read apco2 values from a file via the data.exf instead of giving a constant value in data.bling. I enabled it with #define USE_EXFCO2 in BLING_OPTIONS.h. However, the model crashes with the error "Fortran runtime error: Cannot match namelist object name apco2startdate1."<br>
> <br>
> Please suggest some solutions to the above issues.<br>
> <br>
> Regards<br>
> Kunal<br>
> _______________________________________________<br>
> MITgcm-support mailing list<br>
> <a href="mailto:MITgcm-support@mitgcm.org" rel="noreferrer" target="_blank">MITgcm-support@mitgcm.org</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mitgcm.org_mailman_listinfo_mitgcm-2Dsupport&d=DwICAg&c=-35OiAkTchMrZOngvJPOeA&r=HSHS34ROdfL7f2oVxuKB761hrMvWN1RWA5k3SHGts_s&m=iOrbnncxN5Y2dAD0gIwZZlqCaFyQZtz6j7wWPBxR3O8&s=oDRvUUxOSUqUl1gJNzk7caygbs0kdrURo0TiIV6QfqQ&e=" rel="noreferrer noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.mitgcm.org_mailman_listinfo_mitgcm-2Dsupport&d=DwICAg&c=-35OiAkTchMrZOngvJPOeA&r=HSHS34ROdfL7f2oVxuKB761hrMvWN1RWA5k3SHGts_s&m=iOrbnncxN5Y2dAD0gIwZZlqCaFyQZtz6j7wWPBxR3O8&s=oDRvUUxOSUqUl1gJNzk7caygbs0kdrURo0TiIV6QfqQ&e=</a> <br>
<br>
_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" rel="noreferrer" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" rel="noreferrer noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</blockquote></div></div>
_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" rel="noreferrer" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" rel="noreferrer noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</blockquote></div>
<span>_______________________________________________</span><br><span>MITgcm-support mailing list</span><br><span><a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a></span><br><span><a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a></span><br></div></blockquote></div></div>_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" rel="noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</blockquote></div></div>
_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" rel="noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</blockquote></div>