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

Segfaults when running cpld aerosol model with GNU 9 and 10 #1115

Closed
MinsukJi-NOAA opened this issue Mar 15, 2022 · 56 comments · Fixed by #1228
Closed

Segfaults when running cpld aerosol model with GNU 9 and 10 #1115

MinsukJi-NOAA opened this issue Mar 15, 2022 · 56 comments · Fixed by #1228
Assignees
Labels
bug Something isn't working

Comments

@MinsukJi-NOAA
Copy link
Contributor

MinsukJi-NOAA commented Mar 15, 2022

Description

Currently, CI includes tests for cpld_control_c96_p8 and its debug run.
Due to changes introduced in #1071, the cpld_control_c96_p8 test with GNU results in segfaults originating from ufs-weather-model/GOCART/ESMF/UFS/Aerosol_Cap.F90:321 for runs both in a Docker container and on Hera.

Solution

Switch cpld_control_c96_p8 with cpld_control_c96_noaero_p8 in CI. Also make changes to opnReqTest script and CI (library update and input data update) that are needed after the aerosol update.

Update

CI tests have been made and merged into the UFS weather model via #1087. However, this issue will be kept open to address the segfault issue when running the coupled aerosol model with GNU 9 and 10. The issue title has been updated accordingly.

@MinsukJi-NOAA MinsukJi-NOAA added the enhancement New feature or request label Mar 15, 2022
@MinsukJi-NOAA MinsukJi-NOAA self-assigned this Mar 15, 2022
@junwang-noaa
Copy link
Collaborator

@MinsukJi-NOAA May I ask what is the error message when running cpld_control_c96_p8 with GNU compiler?

The line 321 in ufs-weather-model/GOCART/ESMF/UFS/Aerosol_Cap.F90

is % wrap % maplCap = MAPL_Cap("MAPL Driver", aerosol_routine_SS, cap_options=maplCapOptions, _RC)

@rmontuoro FYI.

@rmontuoro
Copy link
Collaborator

rmontuoro commented Mar 16, 2022

@MinsukJi-NOAA, @junwang-noaa:

I have built the current revision (e028578) of the ufs-weather-model on Hera using ufs_hera.gnu and run the cpld_control_p8 case. The model crashed, too, with the following stack trace:

  0: At line 4310 of file /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/FV3/ccpp/physics/physics/module_mp_thompson.F90 (unit = 63, file = 'qr_acr_qgV2.dat')
  0: Fortran runtime error: End of file

  0: Error termination. Backtrace:
  0: #0  0x2b0807b278af in us_read
  0:    at /tmp/Role.Apps/spack-stage/spack-stage-gcc-9.2.0-wqdecm4rkyyhejagxwmnabt6lscgm45d/spack-src/libgfortran/io/transfer.c:2636
  0: #1  0x2b0807b279ac in pre_position
  0:    at /tmp/Role.Apps/spack-stage/spack-stage-gcc-9.2.0-wqdecm4rkyyhejagxwmnabt6lscgm45d/spack-src/libgfortran/io/transfer.c:2758
  0: #2  0x2b0807b2a5b4 in data_transfer_init
  0:    at /tmp/Role.Apps/spack-stage/spack-stage-gcc-9.2.0-wqdecm4rkyyhejagxwmnabt6lscgm45d/spack-src/libgfortran/io/transfer.c:3200
  0: #3  0x25ba552 in __module_mp_thompson_MOD_qr_acr_qg
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/FV3/ccpp/physics/physics/module_mp_thompson.F90:4310
  0: #4  0x25d68a2 in __module_mp_thompson_MOD_thompson_init
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/FV3/ccpp/physics/physics/module_mp_thompson.F90:933
  0: #5  0x25df88b in __mp_thompson_MOD_mp_thompson_init
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/FV3/ccpp/physics/physics/mp_thompson.F90:121
  0: #6  0x24eff9b in __ccpp_fv3_gfs_v17_coupled_p8_physics_cap_MOD_fv3_gfs_v17_coupled_p8_physics_init_cap
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/build/FV3/ccpp/physics/ccpp_FV3_GFS_v17_coupled_p8_physics_cap.F90:753
  0: #7  0x24e058e in __ccpp_fv3_gfs_v17_coupled_p8_cap_MOD_fv3_gfs_v17_coupled_p8_init_cap
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/build/FV3/ccpp/physics/ccpp_FV3_GFS_v17_coupled_p8_cap.F90:156
  0: #8  0x2404f62 in __ccpp_static_api_MOD_ccpp_physics_init
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/build/FV3/ccpp/physics/ccpp_static_api.F90:455
  0: #9  0x24027e6 in __ccpp_driver_MOD_ccpp_step
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/FV3/ccpp/driver/CCPP_driver.F90:108
  0: #10  0x1f9ce71 in __atmos_model_mod_MOD_atmos_model_init
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/FV3/atmos_model.F90:752
  0: #11  0x1eff8cf in fcst_initialize
  0:    at /scratch2/NCEPDEV/stmp1/Raffaele.Montuoro/p8b/src/gnu/ufs-weather-model/FV3/module_fcst_grid_comp.F90:606

This points to an issue with the Thompson MP scheme and/or its input files.

@climbfuji
Copy link
Collaborator

Does the file exist in the input directory? qr_acr_qgV2.dat - there are a few more of them that need to be copied.

@MinsukJi-NOAA
Copy link
Contributor Author

@rmontuoro When I try running cpld_control_p8, I get similar error messages as you do, but we do not currently run the coupled model with the wave component using GNU (Not sure why the error messages are coming from ccpp and not ww3, though). So, this is a different issue.

The error messages I posted earlier are from running cpld_control_c96_p8, which does not have the wave component, and I am compiling it with -DAPP=S2S instead of -DAPP=S2SW (my tests are on Hera):

Backtrace for this error:
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

...

117: #1  0x12f5195 in modeldatainitialize
117:  at /scratch1/NCEPDEV/stmp4/Minsuk.Ji/ufs-aerosol-gnu-issue/GOCART/ESMF/UFS/Aerosol_Cap.F90:321

...

117: #2  0xeb39bb in _ZNK5ESMCI13MethodElement7executeEPvPi
117:  at /scratch2/NCEPDEV/nwprod/hpc-stack/src/v1.2.0/pkg/v8.2.1b04/src/Superstructure/Component/src/ESMCI_MethodTable.C:377

...

As @junwang-noaa pointed out, line 321 of Aerosol_Cap.F90 is:
is % wrap % maplCap = MAPL_Cap("MAPL Driver", aerosol_routine_SS, cap_options=maplCapOptions, _RC)

@MinsukJi-NOAA MinsukJi-NOAA mentioned this issue Mar 18, 2022
16 tasks
@DeniseWorthen
Copy link
Collaborator

I ran the following on Cheyenne.gnu:

# Waves off
COMPILE | -DAPP=S2S -DUFS_GOCART=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8                                                                          |                | fv3         |
#RUN     | cpld_control_c96_noaero_p8                                                                                              |                | fv3         |
RUN     | cpld_control_c96_p8                                                                                              |                | fv3         |

COMPILE | -DAPP=S2S -DUFS_GOCART=ON -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8                                                               |                | fv3         |
#RUN     | cpld_debug_noaero_p8                                                                                                    |                | fv3         |
RUN     | cpld_debug_p8

Both failed with the error:

71:Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
71:
71:Backtrace for this error:
89:#0  0x2b4809361aff in ???
96:#0  0x2b4809361aff in ???
102:#0  0x2b4809361aff in ???
107:#0  0x2b4809361aff in ???
76:#0  0x2b4809361aff in ???
79:#0  0x2b4809361aff in ???
93:#0  0x2b4809361aff in ???
84:#0  0x2b4809361aff in ???
86:#0  0x2b4809361aff in ???
80:#0  0x2b4809361aff in ???
74:#0  0x2b4809361aff in ???
100:#0  0x2b4809361aff in ???
106:#0  0x2b4809361aff in ???
77:#0  0x2b4809361aff in ???
82:#0  0x2b4809361aff in ???
87:#0  0x2b4809361aff in ???
103:#0  0x2b4809361aff in ???
75:#0  0x2b4809361aff in ???
97:#0  0x2b4809361aff in ???
91:#0  0x2b4809361aff in ???
105:#0  0x2b4809361aff in ???
104:#0  0x2b4809361aff in ???
98:#0  0x2b4809361aff in ???
99:#0  0x2b4809361aff in ???
94:#0  0x2b4809361aff in ???
101:#0  0x2b4809361aff in ???
88:#0  0x2b4809361aff in ???
90:#0  0x2b4809361aff in ???
81:#0  0x2b4809361aff in ???
95:#0  0x2b4809361aff in ???
73:#0  0x2b4809361aff in ???
83:#0  0x2b4809361aff in ???
72:#0  0x2b4809361aff in ???
78:#0  0x2b4809361aff in ???
92:#0  0x2b4809361aff in ???
85:#0  0x2b4809361aff in ???
98:#1  0x1300781 in modeldatainitialize
98:     at /glade/work/worthen/ufs-weather-model-gnu/GOCART/ESMF/UFS/Aerosol_Cap.F90:321
102:#1  0x1300781 in modeldatainitialize

@MinsukJi-NOAA MinsukJi-NOAA changed the title Change two tests in CI Segfaults when running cpld aerosol model with GNU 9 and 10 Mar 21, 2022
@DeniseWorthen
Copy link
Collaborator

To summarize, there appears to be two separate issues. On hera.gnu, I ran the following tests using develop

COMPILE | -DAPP=S2S -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8                                                               |                | fv3         |
RUN     | cpld_debug_noaero_p8                                                                                                    |                | fv3         |

COMPILE | -DAPP=S2SA -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8                                                              | - wcoss_cray                            | fv3 |
RUN     | cpld_debug_p8                                                                                                           | - wcoss_cray

The cpld_debug_noaero_p8 test completed. The cpld_debug_p8 test failed at GOCART/ESMF/UFS/Aerosol_Cap.F90:321, as noted above.

Using the new wave cap (which can be compiled and run in debug mode), I ran the following using 4d3650d

COMPILE | -DAPP=S2SW -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8                                                              |                | fv3         |
RUN     | cpld_debug_noaero_p8                                                                                                    |                | fv3         |

COMPILE | -DAPP=S2SWA -DDEBUG=ON -DCCPP_SUITES=FV3_GFS_v17_coupled_p8                                                             | - wcoss_cray                            | fv3 |
RUN     | cpld_debug_p8                                                                                                           | - wcoss_cray                            | fv3 |

Both tests failed with

118: At line 4317 of file /scratch2/NCEPDEV/climate/Denise.Worthen/WORK/ufs_cmake_gnu/FV3/ccpp/physics/physics/module_mp_thompson.F90 (unit = 63, file = 'qr_acr_qgV2.dat')
118: Fortran runtime error: End of file

The field_table, diag_table, input.nml and qr_acr_qgV2.dat were identical (except for cplwav, cpwav2atm) between the cases run at develop and the cases run with the new wave cap.

@ChunxiZhang-NOAA
Copy link
Contributor

For this error: module_mp_thompson.F90 (unit = 63, file = 'qr_acr_qgV2.dat')
118: Fortran runtime error: End of file
The possible cause is the big_endian, little_endian issue. Not sure if -fconvert=big_endian was on?

@climbfuji
Copy link
Collaborator

Why would that only be the case for this particular test? The file is used all over the place in many other regression tests.

@JessicaMeixner-NOAA
Copy link
Collaborator

Is the wave model also trying to read/write something with unit=63? (I'm trying to look in the wave code and haven't found this yet, so maybe not?)

@junwang-noaa
Copy link
Collaborator

junwang-noaa commented Apr 13, 2022 via email

@ChunxiZhang-NOAA
Copy link
Contributor

@climbfuji I did a test by simply adding "convert=big_endian" in the open(63,...) in module_mp_thompson.F90 and I got the 'end of file during read' error. Not sure if similar compiler option was added during compiling for these particular tests.

@JessicaMeixner-NOAA
Copy link
Collaborator

WW3 uses -fconvert=big-endian although I wouldn't think that would effect non-wave files

@DusanJovic-NOAA
Copy link
Collaborator

Then, add convert='little_endian' to the open statement (in mp_thompson) to explicitly specify endianess, because WW3 adds the compiler flags that implicitly sets 'big endian' to all unformatted file implicitly. We should try to avoid using this flag.

@DeniseWorthen
Copy link
Collaborator

DeniseWorthen commented Apr 13, 2022

@DusanJovic-NOAA Do you mean that when WW3 sets 'big endian', it propagates to other components?

The failure happens only on intel.

@DusanJovic-NOAA
Copy link
Collaborator

It does propagate to all other components that depend on WW3, including the top-level driver. WW3 should not set compiler flags as PUBLIC properties of the ww3_lib target:

target_compile_options(ww3_lib PUBLIC "$<$<COMPILE_LANGUAGE:Fortran>:${compile_flags}>")

Why is this done this way? No other component is doing that. All other components are either appending component specific flags to already defined CMAKE_Fortran_FLAGS or set the flags from scratch.

@DusanJovic-NOAA
Copy link
Collaborator

Instead of adding convert='little_endian' to mp_thompson, you can also try to switch all compiler options in WW3 to PRIVATE, or in my opinion just set various CMAKE_Fortran_FLAGS to whatever options are necessary for WW3, like it's done in other components.

@climbfuji
Copy link
Collaborator

I think it is best to explicitly add the endiannness in module_mp_thompson - way safer than relying on external (build) compiler options.

@JessicaMeixner-NOAA
Copy link
Collaborator

Maybe some day we'll get away from binary files and not need to set big-endian, but for the time being we still need to be consistent. I don't think we can realistically switch it for WW3, but if we need to set it to PRIVATE so it does not propagate out, I'll be happy to attempt to figure out how to do that and make sure it gets updated in WW3. Just let me know. However I also agree with @climbfuji it's probably best to add the endianness to the module file that needs it.

@ChunxiZhang-NOAA
Copy link
Contributor

@climbfuji @DusanJovic-NOAA @JessicaMeixner-NOAA @DeniseWorthen Yes, the safer way is to add endianness in the module_mp_thompson.F90. I will ask Greg Thompson if he agrees to make changes to the code.

@junwang-noaa
Copy link
Collaborator

I agree with @DusanJovic-NOAA, I am worried that the compile options set for ww3 are populated to other components, so the test running with/without ww3 will have different compile options and could generate different results, even though the reading file issue could be temporarily fixed by adding endiannness in module_mp_thompson. Anytime ww3 compile option change could impact atm run results, that is not good coding practice to me. Can we try if changing the ww3_lib from PUBLIC to PRIVATE resolves the issue? @kgerheiser Can we set ww3_lib to PRIVATE as Dusan suggested?

@kgerheiser
Copy link
Contributor

Yes, I will fix the flags and make a PR. I think @DusanJovic-NOAA is correct about using CMAKE_Fortran_FLAGS. I think I was being a little too clever setting flags per target like that.

@kgerheiser
Copy link
Contributor

kgerheiser commented Apr 13, 2022

@DeniseWorthen
Copy link
Collaborator

DeniseWorthen commented Apr 14, 2022

I added 'convert=little_endian' to all the open statements in module_mp_thompson and re-ran the S2SWA test using the new cap. I no longer get the end-of-file error, but I do now get the cap error (GOCART/ESMF/UFS/Aerosol_Cap.F90:321).

I will also test Kyle's solution.

BTW, in ozinterp.f90 and h2ointerp.f90, there are existing 'convert' statements in the file open statements.

@DeniseWorthen
Copy link
Collaborator

I tried Kyle's cmake solution but the model appears to hang. I'm not sure what exactly is happening. The run directory is here

/scratch1/NCEPDEV/stmp2/Denise.Worthen/FV3_RT/rt_gnumesh/test_flags

@JessicaMeixner-NOAA
Copy link
Collaborator

@DeniseWorthen I understand now. Hopefully it'll run with the new mod_defs without further code modifications. It does look like w3igrmd is using the big_endian, but are all WW3 files? Because w3iogo w3iors and others also use binary files and need to be consistently compiled.

@DeniseWorthen
Copy link
Collaborator

@JessicaMeixner-NOAA Reverting the change to w3iogrmd.F90 and using your new mod_def produces a model hang (I've been giving it 5 minutes to start up and killing when it has not progressed).

I don't understand why the convert modifier is required if the compiler is including it.

@JessicaMeixner-NOAA
Copy link
Collaborator

This change seems odd to me. Especially as it's a one-line change and not changing for example the write above it, which should likely also be changed along with every other binary read or write in WW3. I wonder what NDSM is? Is the issue that somehow NDSM=63 and that's the issue?

@DeniseWorthen
Copy link
Collaborator

W3IOGR is being called in wav_shel_inp here:

    ! 2.3 Domain setup

    CALL NEXTLN ( COMSTR , NDSI , NDSEN )
    READ (NDSI,*) IOSTYP
    CALL W3IOGR ( 'GRID', NDSF(7) )

NDSF(7) is unit 17 (which I confirmed).

I've also confirmed now that if I compile the same code w/ Intel and Kyle's build fix (but no fix to mp_module_thompson, no fix to w3iogr), the model runs fine.

@JessicaMeixner-NOAA
Copy link
Collaborator

So we still have an issue with gnu without the w3iogr fix though? I wonder if the mod_def needs to be created with a gnu executable?

@JessicaMeixner-NOAA
Copy link
Collaborator

@DeniseWorthen I made mod_defs with gnu:
/scratch2/NCEPDEV/climate/Jessica.Meixner/newgridsforp8andregtests/WW3_input_data_20220418_gnu

@DeniseWorthen
Copy link
Collaborator

DeniseWorthen commented Apr 19, 2022

So we still have an issue with gnu without the w3iogr fix though? I wonder if the mod_def needs to be created with a gnu executable?

That's right. We can't turn on Aerosols for GNU because of the issue in the the aerosol_cap. But I've been trying to add waves to the test (currently it is run w/o waves on gnu). If we resolve the propagation of compiler flags from WW3 to other components w/ Kyle's build fix, even though we're compiling the w3iogr with big_endian, I need to add that modifier or the model hangs for GNU.

One thing that does seem odd is that it hangs rather than seg-faults. It seems in the past when I've run into endian-ness issues, the code generally seg-faults because it is getting nonsense numbers.

@DeniseWorthen
Copy link
Collaborator

The gnu mod_def didn't make a difference.

@DeniseWorthen
Copy link
Collaborator

DeniseWorthen commented Apr 20, 2022

I think I understand what may be happening. I did two final tests, with and without Kyle's build fix (to prevent propagation of the big-endian flag to all components). I did not change the open statements in either module_mp_thompson or w3iogrmd, but I added an inquiry to write the endian-ness of the open unit.

With Kyle's build fix, all files report being 'little_endian', even w3iogrmd, even though we are specifically compiling WW3 with -fconvert=big-endian. The model hangs at the reading of the ww3 mod_def file.

Without Kyle's build fix, as expected, the thompson files are reported as being big_endian and the model fails with the end-of-file error. It fails before getting to the ww3 startup.

Checking the GNU documentation, it states that -fconvert=big_endian only has an effect only when used in the main program.

So, when we allow the big_endian flag from WW3 to go to all components, the main program also gets compiled with big_endian, and so WW3 is happy (but mp_thompson is not).

When we try to force only WW3 to be compiled with big_endian, it has no impact because the endianness isn't being set for the main program.

Does this make sense @kgerheiser ?

@JessicaMeixner-NOAA
Copy link
Collaborator

Thanks @DeniseWorthen that's really interesting!

Theoretically as long as WW3 is consistently compiled we could change to little endian, but that would have big consequences for operations and the community users, so we should think about possible ways to minimize that impact if that's something we want to consider. @DeniseWorthen let me know if you want a "little-endian" set of GNU mod_defs for any testing in the meantime.

@DeniseWorthen
Copy link
Collaborator

I actually think the safest solution might be to specify the convert=big-endian on all open statements in WW3. That involves a lot of source code changes I'm sure. But as was pointed out, it means that WW3 will not be relying on any build system particulars.

@kgerheiser
Copy link
Contributor

@DeniseWorthen that does make sense. Good work on finding that.

I actually think the safest solution might be to specify the convert=big-endian on all open statements in WW3.

That is non-standard Fortran. Ifort (and maybe gfortran) have extensions, but they are compiler dependent.

@DusanJovic-NOAA
Copy link
Collaborator

Is there any particular reason why WW3 uses big-endian unformatted files on a little-endian system?

@JessicaMeixner-NOAA
Copy link
Collaborator

JessicaMeixner-NOAA commented Apr 20, 2022

Is there any particular reason why WW3 uses big-endian unformatted files on a little-endian system?

@arunchawla-NOAA might know more of that history. We've always used big-endian on WW3.

@DeniseWorthen
Copy link
Collaborator

@DeniseWorthen that does make sense. Good work on finding that.

I actually think the safest solution might be to specify the convert=big-endian on all open statements in WW3.

That is non-standard Fortran. Ifort (and maybe gfortran) have extensions, but they are compiler dependent.

@kgerheiser Do you mean that the words you specify for convert setting in the open statement is compiler dependent? I wrote 'big-endian' but it looks like both ifort and gnu use "convert=big_endian".

@kgerheiser
Copy link
Contributor

kgerheiser commented Apr 20, 2022

I mean that the convert= syntax specifier is a compiler extension, and is not technically standard Fortran. I've checked Intel, GNU, PGI, Flang, and Cray compilers, and they all support it, so it appears safe to use across most mainstream compilers.

@DeniseWorthen
Copy link
Collaborator

Thanks for the clarification. I think we're all agreed that WW3 compiler flags should not be propagated to all components, so we want to use Kyle's build fix. Are these our two options then?

  1. create the mod_def files as little-endian and remove the fconvert=big_endian flag from WW3 for UWM (since it isn't working anyway, at least not for GNU)

  2. specify the fconvert=big_endian everywhere in the WW3 source code where a binary file is opened.

@JessicaMeixner-NOAA
Copy link
Collaborator

The way that the CMAKE is introduced in WW3 it's not just choosing the "fconvert=big_endian " for WW3/UWM it's doing that for everyone and everyone might not agree to that. It's also pretty impactful for operations for a GNU-only issue. That being said, putting in non-standard fortran in the code for a compiler issue seems like not a great option, but perhaps still preferable if our options are only 1 or 2.

@DeniseWorthen
Copy link
Collaborator

@JessicaMeixner-NOAA Thanks for the clarification regarding how big_endian is not configurable for just UWM.

What solution would you propose?

@JessicaMeixner-NOAA
Copy link
Collaborator

If the choices are 1 or 2, I personally think 2 is the way to go. The other solutions I've thought of adds unnecessary complication. Should I make an issue in WW3 to make sure others are okay with this addition?

@kgerheiser
Copy link
Contributor

kgerheiser commented Apr 20, 2022

I think specifying open(convert=big_endian) might be the best solution.

It makes the option explicit in each open statement that needs it, and cuts out setting the endian flag for each compiler. I couldn't find a compiler that doesn't support this setting. Even the NAG Fortran compiler has it, which is really strict about non-standard code.

@arunchawla-NOAA
Copy link

we chose big_endian because we were on multiple different types of platforms and this allowed us to pass binary files acros platforms and not worry about endian. Choice of big_endian was arbitrary. Maybe we just remove it and move to creating mod def files on each platform ?

@arunchawla-NOAA
Copy link

Or do what Kyle suggests :). Maybe now is when we switch to a netcdf mod_def file and do away with binary outputs :)

@JessicaMeixner-NOAA
Copy link
Collaborator

Or do what Kyle suggests :). Maybe now is when we switch to a netcdf mod_def file and do away with binary outputs :)

That'd be my vote and hope we will when we get the time!

@kgerheiser
Copy link
Contributor

I made a branch based off of develop (https://github.com/kgerheiser/WW3/tree/explicit-big-endian) that adds convert='big_endian' to all unformatted opens.

Commit here: https://github.com/kgerheiser/WW3/commit/109f9fc546be7a5ee95296a8aed70d6524f465e2

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

Successfully merging a pull request may close this issue.

10 participants