<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Hello Matthew, <br>
<br>
Thank you for getting back to me. <br>
<br>
Yes, I called all the functions.<br>
<br>
The thing is that when I write a simple print statement, the run crashes.<br>
<br>
Here is the error message that I usually get:<br>
<span style="color: rgb(15, 92, 26);">Breakpoint 1, module_noahmp_hrldas_driver::land_driver_ini (ntime_out=0, wrfits=<error reading variable: Cannot access memory at address 0x0>, wrfite=<error reading variable: Cannot access memory at address 0x0>,</span></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
wrfjts=<error reading variable: Cannot access memory at address 0x0>, wrfjte=<error reading variable: Cannot access memory at address 0x0>) at module_NoahMP_hrldas_driver.f90:75</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
75 real(kind=kind_noahmp), allocatable :: BC_type_real(:,:,:), source_type_real(:,:,:)</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
Missing separate debuginfos, use: dnf debuginfo-install cyrus-sasl-lib-2.1.27-21.el9.x86_64 glibc-2.34-168.el9_6.20.x86_64 keyutils-libs-1.6.3-1.el9.x86_64 krb5-libs-1.21.1-8.el9_6.x86_64 libX11-1.7.0-9.el9.x86_64 libXau-1.0.9-8.el9.x86_64 libbrotli-1.0.9-6.el9.x86_64
libcom_err-1.46.5-5.el9.x86_64 libcurl-7.76.1-29.el9_4.1.x86_64 libevent-2.1.12-8.el9_4.x86_64 libidn2-2.3.0-7.el9.x86_64 libjpeg-turbo-2.0.90-7.el9.x86_64 libnghttp2-1.43.0-5.el9_4.3.x86_64 libpsl-0.21.1-5.el9.x86_64 libselinux-3.6-1.el9.x86_64 libunistring-0.9.10-15.el9.x86_64
libxcb-1.13.1-9.el9.x86_64 libxcrypt-4.4.18-3.el9.x86_64 libxml2-2.9.13-12.el9_6.x86_64 openssl-libs-3.2.2-6.el9_5.1.x86_64 systemd-libs-252-32.el9_4.7.x86_64 xz-libs-5.2.5-8.el9_0.x86_64 zlib-1.2.11-40.el9.x86_64</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
(gdb) n</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
77 write(6,*) "sawsan was here 1"</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
(gdb)</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
forrtl: severe (257): formatted I/O to unit open for unformatted transfers, unit 6, file /dev/pts/0</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
Image PC Routine Line Source</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
libpetsc.so.3.20. 0000155551029BA6 for__io_return Unknown Unknown</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
hrldas.exe 00000000006906E0 for_write_seq_lis Unknown Unknown</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
hrldas.exe 0000000000627135 Unknown Unknown Unknown</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
hrldas.exe 000000000040926D Unknown Unknown Unknown</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
hrldas.exe 000000000040921D Unknown Unknown Unknown</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
libc.so.6 000015554A8295D0 Unknown Unknown Unknown</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
libc.so.6 000015554A829680 __libc_start_main Unknown Unknown</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
hrldas.exe 0000000000409135 Unknown Unknown Unknown</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(15, 92, 26);" class="elementToProof">
[Inferior 1 (process 3244707) exited with code 01]</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt;" class="elementToProof">
<span style="color: rgb(0, 0, 0);">If I use print, the error will be </span><span style="color: rgb(15, 92, 26);">forrtl: severe (257): formatted I/O to unit open for unformatted transfers, unit -1, file /dev/pts/0</span></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
<br>
</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I also attached the NoahMP driver module, where I initialize and finalize PETSc. I only added PETSc functions in the land part (and its different subroutines) of the NoahMP model.<br>
<br>
Thank you for your help</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Sawsan<br>
<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Matthew Knepley <knepley@gmail.com><br>
<b>Sent:</b> Friday, September 19, 2025 3:55 AM<br>
<b>To:</b> Shatanawi, Sawsan Muhammad <sawsan.shatanawi@wsu.edu><br>
<b>Cc:</b> petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov>; petsc-maint@mcs.anl.gov<br>
<b>Subject:</b> Re: [petsc-users] Seeking help in integration Petsc with NoahMP</font>
<div> </div>
</div>
<div>
<p style="border:1px; border-style:solid; border-color:#FFCACA; background-color:#FFEB9C; padding:1px">
<span style="font-size:10.0pt; color:black"><b>[EXTERNAL EMAIL]</span></b></p>
<div>
<div dir="ltr">
<div dir="ltr">On Thu, Sep 18, 2025 at 9:25 PM Shatanawi, Sawsan Muhammad via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:</div>
<div class="x_gmail_quote x_gmail_quote_container">
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-6948140751143423171">
<div dir="ltr">
<div style="direction:ltr; margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hello everyone,</div>
<div style="direction:ltr; margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
I developed a groundwater module to be integrated within Noah-MP using the HRLDAS driver. For the numerical solver, I rely on PETSc. However, I am encountering an error that I do not fully understand.</div>
<div style="direction:ltr; margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
To debug, I added print statements in the global <code>NoahmpIOVarType.F90</code> module (This is the first module that needs to be read), but these statements did not appear in the output. This makes me wonder if I may have declared the PETSc variables incorrectly.</div>
</div>
</div>
</blockquote>
<div>Are you calling the function you added?</div>
<div><br>
</div>
<div> Thanks,'</div>
<div><br>
</div>
<div> Matt</div>
<div> </div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div class="x_msg-6948140751143423171">
<div dir="ltr">
<div style="direction:ltr; margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Could you please review my NoahmpIOVarType.F90 module and Makefile, let me know if the PETSc variables are declared in the correct place? I would greatly appreciate any guidance on this issue.</div>
<div style="direction:ltr; margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Thank you in advance</div>
<div style="direction:ltr; margin-top:1em; margin-bottom:1em; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Best regards,<br>
Sawsan Shatanawi:</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
</div>
</div>
</blockquote>
</div>
<div><br clear="all">
</div>
<div><br>
</div>
<span class="x_gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener</div>
<div><br>
</div>
<div><a href="https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!JmPEgBY0HMszNaDT!sRIOL4qd53HAKzn-5-gYS_kMNcklfbcTtwipXKmqZFVGUd7LFV1K5jgHq0kXhIi1XQKPQrHUfvrTiwPvDOCb$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>