Skip to content

fix a bug in EnKF that can cause segfault in a diagnostic print #12

Merged
MichaelLueken merged 1 commit into
NOAA-EMC:masterfrom
jswhit:bugfix/enkf-readobs
Jun 12, 2020
Merged

fix a bug in EnKF that can cause segfault in a diagnostic print #12
MichaelLueken merged 1 commit into
NOAA-EMC:masterfrom
jswhit:bugfix/enkf-readobs

Conversation

@jswhit
Copy link
Copy Markdown
Contributor

@jswhit jswhit commented Jun 11, 2020

in src/enkf/mpi_readobs, if the ensemble spread in observation space exceeds a value of 1000 a print statement is triggered that tries to print an array (mem_ob) that has already been deallocated. This causes a segfault on Orion. The fix is simply to not print mem_ob.

Does not affect results, but protects against a possible segfault if ensemble spread exceeds the threshold value.

@RussTreadon-NOAA RussTreadon-NOAA self-requested a review June 11, 2020 19:15
@jswhit
Copy link
Copy Markdown
Contributor Author

jswhit commented Jun 11, 2020

@RussTreadon-NOAA - this should probably get included in the GFS v16 branch since this bug could lead to a crash.

@MichaelLueken
Copy link
Copy Markdown
Contributor

Hi Jeff,

Since this is only a single commit, I can move forward with the change. Please create a new GitHub issue detailing the issue that you corrected, then I can merge the pull request.

Thanks,

Mike

Copy link
Copy Markdown
Contributor

@RussTreadon-NOAA RussTreadon-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Undefined array, mem_ob, removed from print. Looks good to me.

@jswhit
Copy link
Copy Markdown
Contributor Author

jswhit commented Jun 12, 2020

Closes issue #15

@MichaelLueken MichaelLueken linked an issue Jun 12, 2020 that may be closed by this pull request
@MichaelLueken MichaelLueken self-requested a review June 12, 2020 17:47
Copy link
Copy Markdown
Contributor

@MichaelLueken MichaelLueken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Russ. Removal of unallocated array, mem_ob, from the print is fine. Approving change and merging pull request.

@MichaelLueken MichaelLueken merged commit 93cd14b into NOAA-EMC:master Jun 12, 2020
lbi2018 referenced this pull request in lbi2018/GSI Mar 4, 2022
…variable for regional FV3 DA (#12)

*Bug fix for EnKF analysis steps when using t (tv) as a control vector variable for regional FV3 DA.
*Whitespace and indentation clean-ups were made in src/enkf/gridio_fv3reg.f90.
Notes:
This PR addresses issue #13, which was reported by Jonathan Poterjoy (UMD).
And this bug should have affected all the EnKF steps (mean, update, recenter, etc.)
The bug fix is based on the diagnoses and discussions among @BinLiu-NOAA and @TingLei-NOAA (EMC), @XL-OU, Jonathan Poterjoy (UMD), Jason Sippel (HRD), etc.
hu5970 referenced this pull request in hu5970/GSI Apr 8, 2022
…nd (#12)

2m temperature is sensible temperature now. The convert from 2m potential
temperature to 2m temperature happens during background IO stage.
DavidHuber-NOAA referenced this pull request in DavidHuber-NOAA/GSI_old Jul 19, 2023
use stack ncdiag, update hera.gnu hpc-stack, update to head of develop
emilyhcliu referenced this pull request in emilyhcliu/GSI_old Oct 13, 2023
xyzemc pushed a commit to xyzemc/GSI_develop-v16-tms that referenced this pull request Feb 27, 2026
GitHub Issue NOAA-EMC#15.  Fix a bug in EnKF that can cause segfault in a diagnostic print.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in EnKF (printing unallocated array)

3 participants