Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inline post quietly failing #1121

Closed
pjpegion opened this issue Mar 17, 2022 · 21 comments
Closed

inline post quietly failing #1121

pjpegion opened this issue Mar 17, 2022 · 21 comments
Assignees
Labels
bug Something isn't working

Comments

@pjpegion
Copy link
Collaborator

Description

I am attempting to run a 35-day 1-degree coupled model forecast with hourly output for the atmosphere using write_dopost=.true.
After about forecast hour 276 the model stops writing the grib files, but continues to run, writing the ocean output (daily) and ice output (6-hourly) and ends without an error.
I have a run ongoing right now which is 18-days into the forecast, and have the ESMF logging on. I see that the clock in the compute tasks is correct, but for the I/O tasks, the clock advanced all the way to the end of the forecast:

(ufs_icgen) [Philip.Pegion@h13c47 fcst.234149]$ grep current PET000.ESMF_LogFile | tail -n 2
20220317 212050.210 INFO PET000 entering FV3_ADVANCE phase1 with clock current: 2012 1 18 23 50 0 0
20220317 212051.262 INFO PET000 leaving FV3_ADVANCE phase2 with clock current: 2012 1 18 23 50 0 0
(ufs_icgen) [Philip.Pegion@h13c47 fcst.234149]$ grep current PET144.ESMF_LogFile | tail -n 2
20220317 210107.172 INFO PET144 entering FV3_ADVANCE phase1 with clock current: 2012 2 4 23 50 0 0
20220317 210107.172 INFO PET144 leaving FV3_ADVANCE phase2 with clock current: 2012 2 4 23 50 0 0
(ufs_icgen) [Philip.Pegion@h13c47 fcst.234149]$ tail -n 2 PET200.ESMF_LogFile
20220317 212005.529 INFO PET200 --------------------------------> to: 2012 1 18 19 0 0 0
20220317 212013.146 INFO PET200 (MOM_cap:ModelAdvance)------>Advancing OCN from: 2012 1 18 19 0 0 0
(ufs_icgen) [Philip.Pegion@h13c47 fcst.234149]$ tail -n 2 PET210.ESMF_LogFile
20220317 212051.277 INFO PET210 --------------------------------> to: 2012 1 19 0 10 0 0
20220317 212051.277 INFO PET210 ice_import tfrz_option = mushy, ktherm = 2

I originally had 1 write task and 40 write_tasks_per_group, and switched it to 4 write tasks with 10 task per group, but it did not change the result.

@pjpegion pjpegion added the bug Something isn't working label Mar 17, 2022
@junwang-noaa
Copy link
Collaborator

junwang-noaa commented Mar 17, 2022

@pjpegion Which platform is this test running on? Can you bring your run directory to hera if it is not the platform? Also please let us know your run output file, we can take a look. Thanks

@pjpegion
Copy link
Collaborator Author

pjpegion commented Mar 17, 2022

@junwang-noaa I'm running on hera. Here is more information:
I am running with the global workflow, so it creates a list for output_fh, which is 0 thourhg 840 in my case. But the model thinks:
af nems config,quilting= T calendar=julian iau_offset= 0 noutput_fh = 277

and noutput_fh comes from.
fv3_cap.F90: noutput_fh = ESMF_ConfigGetLen(config=CF, label ='output_fh:',rc=rc)

I am going to try with output_fh: -1 1

run directory is /scratch2/BMC/gsienkf/Philip.Pegion/stmp2/RUNDIRS/P8_C96_mem001_stoch5_a/2012010100/gfs/fcst.234149
and log file is /scratch2/BMC/gsienkf/Philip.Pegion/UFS-coupled/comrot/P8_C96_mem001_stoch5_a/logs/2012010100/gfsfcst.log.0

@pjpegion
Copy link
Collaborator Author

Seems better, when the model writes output_fh, it is giving the full list of output times.

@junwang-noaa
Copy link
Collaborator

I don't see any issue with the inline post output, the run goes up to 690hr. I saw the output files.
-rw-r--r-- 1 Philip.Pegion gsienkf 2783973 Mar 17 23:11 /scratch2/BMC/gsienkf/Philip.Pegion/UFS-coupled/comrot//P8_C96_mem001_stoch5_a/gfs.20120101/00/atmos//gfs.t00z.master.grb2f690

@junwang-noaa
Copy link
Collaborator

I think this might be a workflow issue. In your case, you can set:

output_fh: 1 -1
for hourly output or
output_fh: 3 -1
for3 hourly output
Rather than list all the output fhours. If you have:
output_fh: 677
it means to output the history file at fh=677.

Please see output_fh in the documentation at:
https://ufs-weather-model.readthedocs.io/en/latest/InputsOutputs.html#model-configure-file

Thanks

@pjpegion
Copy link
Collaborator Author

@junwang-noaa You are seeing the re-run with output_fh: 1 -1, which works.
I think there should be some documentation mentioning that there is a limit to the length of the output_fh list.

@junwang-noaa
Copy link
Collaborator

@pjpegion Thanks. I will have the information added in the documentation.

@rsdunlapiv @theurich I want to confirm that for the array variable in ESMF config with 841 elelments such as:

output_fh: 0 1 2 4 ... 838 839 840

the ESMF subroutine call ESMF_ConfigGetLen only returns 277.

noutput_fh = ESMF_ConfigGetLen(config=CF, label ='output_fh:',rc=rc) 

I can't find ESMF documentation on this subroutine about the limit of the array length. Thanks

@rsdunlapiv
Copy link

@junwang-noaa @pjpegion as @danrosen25 reported, the actual line limit is 1024 characters. We are going to update the docs to correctly state this.

In this case, I wonder if it is maintainable to have such a long list of integers in a config file. Would a syntax like:

[0:840:3]

be possible? In this case it means every 3 hours between 0 and 840. Nice compact syntax.

@SMoorthi-emc
Copy link
Contributor

SMoorthi-emc commented Mar 19, 2022 via email

@junwang-noaa
Copy link
Collaborator

@SMoorthi-emc the fhout is still working. This is for random time outputs.

@rsdunlapiv @danrosen25 We do have frequency options, so the long forecast length is not an issue as Phil has tried. The problem here is how many elements the configuration array can take.
I did a test with output_fh shown in Phil's model_configure, With:
output_fh: 0 1 2 4 5 6 7 8 ... 838 839 840 (all the elements are listed, total 841 elements, please see /scratch2/BMC/gsienkf/Philip.Pegion/stmp2/RUNDIRS/P8_C96_mem001_stoch5_a/2012010100/gfs/fcst.234149/model_configure), I also got 277 from the ESMF_ConfigGetLen(config=CF, label ='output_fh:',rc=rc).

Then I tried

output_fh: 0 1 2 3 4 5 600 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 700 701 702 703 704 705 706 707 708 709 710 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589

I still got: 277 from ESMF_ConfigGetLen(config=CF, label ='output_fh:',rc=rc), please see model_configure and out files in /scratch1/NCEPDEV/stmp2/Jun.Wang/FV3_RT/rt_244896/control_testoutputfh. So it seems to me it's not the limit of 1032 characters.

@danrosen25
Copy link
Collaborator

Hi @junwang-noaa
I looked in the directory /scratch1/NCEPDEV/stmp2/Jun.Wang/FV3_RT/rt_244896/control_testoutputfh

The output_fh line is 2527+ characters but the limit is 1024 characters. Please try a shorter list.

I'll look into returning an error if a line in a resource file is longer than 1024 characters.

@danrosen25 danrosen25 self-assigned this Mar 21, 2022
@junwang-noaa
Copy link
Collaborator

@danrosen25 Shorter list is working. Please see /scratch1/NCEPDEV/stmp2/Jun.Wang/FV3_RT/rt_244896/control_testoutputfh2. Please let me know if you have the fix ready.

@junwang-noaa
Copy link
Collaborator

@pjpegion The ufs-weather-model documentation was updated.

@junwang-noaa
Copy link
Collaborator

@danrosen25 may I ask if you have the fix with return code ready? Thanks

@danrosen25
Copy link
Collaborator

@junwang-noaa
We don't have the fix ready. The fix we have planned won't prevent this failure but will fail more gracefully.

@junwang-noaa
Copy link
Collaborator

@danrosen25 Thanks. Do you have the updates to allow model fail with error code?

@danrosen25
Copy link
Collaborator

@junwang-noaa
No, we're short on bandwidth to make the fix at this time. It'll stay on the to-do list for now.

@junwang-noaa
Copy link
Collaborator

@danrosen25 I will close the issue. At this time, ufs-weather-model documentation was updated. We will open a new one when the updates from ESMF is available.

@danrosen25
Copy link
Collaborator

@junwang-noaa
Thanks, the ESMF_ConfigLoadFile line limit check is in my backlog.

@danrosen25
Copy link
Collaborator

The line length limitation for ESMF_ConfigLoadFile will be resolved in v8.6.1. The entire file is limited to 256k characters.

@junwang-noaa
Copy link
Collaborator

Great, thanks @danrosen25!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants