Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@sbrus89
Copy link
Collaborator

@sbrus89 sbrus89 commented Mar 31, 2022

These are convergence tests for the new spherical harmonic transform (SHT) routines which are used in computing the self attraction and loading (SAL) terms in tidal applications.

There are two different SHT algorithms that have been implemented in: E3SM-Project/E3SM#4472. One relies on a fast library for computing SHTs, but is serial. The other is a new parallel approach which is faster at higher core counts.

@sbrus89 sbrus89 added ocean in progress This PR is not ready for review or merging MPAS-Model PR required DEPRECATED labels Mar 31, 2022
@sbrus89 sbrus89 requested a review from xylar March 31, 2022 21:22
@pep8speaks
Copy link

pep8speaks commented Mar 31, 2022

Hello @sbrus89! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 23:80: E501 line too long (96 > 79 characters)

Line 30:80: E501 line too long (97 > 79 characters)

Line 16:80: E501 line too long (97 > 79 characters)

Line 30:80: E501 line too long (97 > 79 characters)

Comment last updated at 2022-05-13 18:27:20 UTC

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Mar 31, 2022

@xylar, this is still a work in progress, but I thought I'd submit the PR to get some initial feedback.

compass/ocean/__init__.py Show resolved Hide resolved
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

@sbrus89, this is really great work! I'm excited to have these tests.

In addition to my comments above, please fix all of the PEP8 issues indicated by pep8speaks in #348 (comment). If you want to leave some lines longer than 79 characters for readability, that's okay but flag those lines in a GitHub comment so I can have a look.

check_call(args, self.logger)

if not os.path.exists('mpas_to_grid_'+nLat+'.nc'):
args = ["ncremap",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't know if there are ways of telling ncremap to run in parallel. If so, it would be worth adding them like I've done for ESMF_RegridWeightGen below.

@xylar
Copy link
Collaborator

xylar commented Apr 6, 2022

@sbrus89, it turns out flake8 is already part of the compass development environment:

I will add it to MPAS-Analysis, though.

@xylar
Copy link
Collaborator

xylar commented Apr 8, 2022

@sbrus89, is flake8 not pointing out lines longer than 79 characters and indentation that's not a multiple of 4? If not by default, maybe there's a setting for flagging those, too?

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Apr 8, 2022

@xylar, it definitely is pointing those out. I just took a break because I respectfully disagreed with it on the remaining issues.

@xylar
Copy link
Collaborator

xylar commented Apr 8, 2022

I'm afraid I do insist on tabbing being a multiple of 4 and I will accept long lines but only under unusual circumstances.

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Apr 8, 2022

I'm afraid I do insist on tabbing being a multiple of 4 and I will accept long lines but only under unusual circumstances.

That's my fault, I thought it was complaining about the function lines I broke up. I agree about the 4 spaces.

@xylar
Copy link
Collaborator

xylar commented Apr 8, 2022

BTW, I know this PEP8 stuff is super annoying. I didn't appreciate it when Phil Wolfram insisted on it in my early python days.

The way I explain it at this point is that it's the difference between a native python "speaker" and someone who "speak"s with a light (or a strong) Fortran accent. We can understand each other but it takes longer and it would make things smoother if we all stuck to the standard way of speaking, particularly when all of our code can easily become the example that the next developer works from.

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Apr 8, 2022

Its no problem, having a uniform standard is worth my being slightly annoyed for 10 minutes. Mostly I misunderstood what it was flagging.

@xylar
Copy link
Collaborator

xylar commented Apr 15, 2022

@sbrus89, please rebase and remove whatever commit(s) updated the E3SM-Project and MALI-Dev submodules. You can make updates to them locally for your testing but you should not commit changes to these submodules. We update them only in their own PRs and only with a review process that makes sure they don't introduce any unexpected changes.

@xylar
Copy link
Collaborator

xylar commented Apr 15, 2022

It looks like the submodule changes were probably committed accidentally in cee46a1, your most recent commit. If you can edit that commit to remove those changes before you rebase, I think it will make your life easier.

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Apr 15, 2022

@xylar, sorry about the submodules getting mixed up. I've fixed that and rebased.

@xylar
Copy link
Collaborator

xylar commented Apr 15, 2022

@sbrus89, testing on Anvil with Intel and Intel-MPI, I'm seeing this for QU60_init_serial_40:

Running: srun -n 36 ./ocean_model -n namelist.ocean -s streams.ocean
Abort(538976288) on node 6 (rank 6 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 538976288) - process 6
srun: Job step aborted: Waiting up to 62 seconds for job step to finish.
slurmstepd: error: *** STEP 546864.16 ON b733 CANCELLED AT 2022-04-15T10:43:48 ***
srun: error: b733: tasks 0-5,7-35: Killed
srun: error: b733: task 6: Exited with exit code 1

Could this be out of memory?

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Apr 15, 2022

@xylar, did you happen to compile with USE_SHTNS=true with E3SM-Project/E3SM#4472?

@xylar
Copy link
Collaborator

xylar commented Apr 15, 2022

Oops, nope. I used that branch but not the build flag. Sorry!

@sbrus89
Copy link
Collaborator Author

sbrus89 commented Apr 15, 2022

No, not at all; that's my fault. you wouldn't have known unless I told you!

@xylar
Copy link
Collaborator

xylar commented Apr 19, 2022

I'm trying again. Now, when I build with make USE_SHTNS=true OPENMP=true intel-mpi on Anvil, I'm seeing:

src/libdycore.a(sht_init.o): In function `init_sht_array_func':
sht_init.c:(.text+0x2d2cd): undefined reference to `ffly_m0'
sht_init.c:(.text+0x2d2d5): undefined reference to `ffly_m0'
sht_init.c:(.text+0x2d2dd): undefined reference to `ffly_m0'
sht_init.c:(.text+0x2d2e5): undefined reference to `ffly_m0'
sht_init.c:(.text+0x2d30d): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d315): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d31d): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d325): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d379): undefined reference to `ffly'
sht_init.c:(.text+0x2d381): undefined reference to `ffly'
sht_init.c:(.text+0x2d389): undefined reference to `ffly'
sht_init.c:(.text+0x2d391): undefined reference to `ffly'
sht_init.c:(.text+0x2d3b9): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d3c1): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d3c9): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d3d1): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d3f9): undefined reference to `fomp_a'
sht_init.c:(.text+0x2d401): undefined reference to `fomp_a'
sht_init.c:(.text+0x2d409): undefined reference to `fomp_a'
sht_init.c:(.text+0x2d411): undefined reference to `fomp_a'
sht_init.c:(.text+0x2d439): undefined reference to `fomp_b'
sht_init.c:(.text+0x2d441): undefined reference to `fomp_b'
sht_init.c:(.text+0x2d449): undefined reference to `fomp_b'
sht_init.c:(.text+0x2d451): undefined reference to `fomp_b'
sht_init.c:(.text+0x2d479): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d481): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d489): undefined reference to `ffly_m'
sht_init.c:(.text+0x2d491): undefined reference to `ffly_m'

@xylar
Copy link
Collaborator

xylar commented Apr 19, 2022

I rebuild without OPENMP=true and it worked fine. I didn't run a long enough job to test everything but the 60km tests seemed to work. I will see if I just messed up the OPENMP=true compile and also run the complete tests when I can.

@xylar
Copy link
Collaborator

xylar commented Apr 19, 2022

One thing to consider is whether it makes sense to add another, much cheaper test that could be used for regression testing.

@xylar
Copy link
Collaborator

xylar commented May 5, 2022

@sbrus89, in addition to #383, this PR still needs documentation. Is that something we talked about already earlier today? I think so but similar meetings are getting muddled in my brain...

@sbrus89
Copy link
Collaborator Author

sbrus89 commented May 13, 2022

@xylar, I added the user's and developer's guide documentation. I built it and it seemed to work for me. Let me know if you'd like to see any changes. Thanks!

@xylar
Copy link
Collaborator

xylar commented May 13, 2022

Great, @sbrus89! I'm doing a test merge with master and running some tests now.

@xylar xylar removed the in progress This PR is not ready for review or merging label May 13, 2022
@xylar xylar self-assigned this May 13, 2022
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

I did a test merge with master and did a test run on Anvil with Intel and OpenMPI. This ran great for me:

  test execution:      SUCCESS
  test runtime:        33:14
Test Runtimes:
33:14 PASS ocean_spherical_harmonic_transform_qu_convergence
Total runtime 33:16
PASS: All passed successfully!

The docs had some trouble building but that's unrelated to this PR. The new docs look good at a glance (I have to admit I didn't read them in a huge amount of detail).

Thanks, @sbrus89, for all the hard work here!

@xylar xylar merged commit 67e8b48 into MPAS-Dev:master May 13, 2022
@sbrus89
Copy link
Collaborator Author

sbrus89 commented May 13, 2022

thanks for your help and patience, @xylar!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.