[petsc-users] Seeking help in integration Petsc with NoahMP

Shatanawi, Sawsan Muhammad sawsan.shatanawi at wsu.edu
Sat Sep 20 18:31:48 CDT 2025


Hello Matthew,

Thank you for getting back to me.

Yes, I called all the functions.

The thing is that when I write a simple print statement, the run crashes.

Here is the error message that I usually get:
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>,
    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
75         real(kind=kind_noahmp), allocatable :: BC_type_real(:,:,:), source_type_real(:,:,:)
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
(gdb) n
77         write(6,*) "sawsan was here 1"
(gdb)
forrtl: severe (257): formatted I/O to unit open for unformatted transfers, unit 6, file /dev/pts/0
Image              PC                Routine            Line        Source
libpetsc.so.3.20.  0000155551029BA6  for__io_return        Unknown  Unknown
hrldas.exe         00000000006906E0  for_write_seq_lis     Unknown  Unknown
hrldas.exe         0000000000627135  Unknown               Unknown  Unknown
hrldas.exe         000000000040926D  Unknown               Unknown  Unknown
hrldas.exe         000000000040921D  Unknown               Unknown  Unknown
libc.so.6          000015554A8295D0  Unknown               Unknown  Unknown
libc.so.6          000015554A829680  __libc_start_main     Unknown  Unknown
hrldas.exe         0000000000409135  Unknown               Unknown  Unknown
[Inferior 1 (process 3244707) exited with code 01]

If I use print, the error will be forrtl: severe (257): formatted I/O to unit open for unformatted transfers, unit -1,  file /dev/pts/0


 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.

Thank you for your help
Sawsan

________________________________
From: Matthew Knepley <knepley at gmail.com>
Sent: Friday, September 19, 2025 3:55 AM
To: Shatanawi, Sawsan Muhammad <sawsan.shatanawi at wsu.edu>
Cc: petsc-users at mcs.anl.gov <petsc-users at mcs.anl.gov>; petsc-maint at mcs.anl.gov
Subject: Re: [petsc-users] Seeking help in integration Petsc with NoahMP


[EXTERNAL EMAIL]

On Thu, Sep 18, 2025 at 9:25 PM Shatanawi, Sawsan Muhammad via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
Hello everyone,
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.
To debug, I added print statements in the global NoahmpIOVarType.F90 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.
Are you calling the function you added?

  Thanks,'

    Matt

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.
Thank you in advance
Best regards,
Sawsan Shatanawi:



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!ZzsHnjSM7RI5-q7hIbK0SgM6A8N3IdRaheTQ9rmAghDMLW0bwhvq6O0AGOXbHH9IgbGNKbLxmJpt0SVZihaWH-_CYUo3r-SluQ$ <https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!JmPEgBY0HMszNaDT!sRIOL4qd53HAKzn-5-gYS_kMNcklfbcTtwipXKmqZFVGUd7LFV1K5jgHq0kXhIi1XQKPQrHUfvrTiwPvDOCb$ >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250920/169a0adf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module_NoahMP_hrldas_driver.F
Type: application/octet-stream
Size: 128346 bytes
Desc: module_NoahMP_hrldas_driver.F
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250920/169a0adf/attachment-0001.obj>


More information about the petsc-users mailing list