Skip to content

Fix compilation with OPENMP=1#193

Merged
adcroft merged 1 commit into
mom-ocean:dev/masterfrom
angus-g:openmp-fixes
Jul 9, 2015
Merged

Fix compilation with OPENMP=1#193
adcroft merged 1 commit into
mom-ocean:dev/masterfrom
angus-g:openmp-fixes

Conversation

@angus-g
Copy link
Copy Markdown
Collaborator

@angus-g angus-g commented Jun 23, 2015

The compilation errors are mostly due to OMP parallel clauses with default(none) not being updated when new code is added that references new variables. The OMP parallel do clause in MOM_energetic_PBL.F90 uses default(private) because of the very large number of private variables relative to shared variables.

@Zhi-Liang
Copy link
Copy Markdown
Contributor

Hi Angus,

We understand there will be a long line of arugments when to use
default(none) for OMP directives. The reason we use default(none) is to
avoid possible error in running time. Someone might modify the code and add
some new variables in, but did not add those variables to the shared or
firstprivate place if these variables are not private. The compilation will
pass. But it will cause problem in running time and it will use longer time
to debug.

Thanks,

Zhi

On Mon, Jun 22, 2015 at 10:30 PM, Angus Gibson notifications@github.com
wrote:

The compilation errors are mostly due to OMP parallel clauses with
default(none) not being updated when new code is added that references
new variables. The OMP parallel do clause in MOM_energetic_PBL.F90 uses
default(private) because of the very large number of private variables

relative to shared variables.

You can view, comment on, or merge this pull request online at:

NOAA-GFDL#193
Commit Summary

  • Fix compilation with OPENMP=1

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
NOAA-GFDL#193.

This is mostly due to 'OMP parallel' clauses with 'default(none)' not being
updated when new code is added that references new variables. The 'OMP
parallel do' clause in MOM_energetic_PBL.F90 uses 'default(private)'
because of the very large number of private variables relative to shared
variables.
@angus-g
Copy link
Copy Markdown
Collaborator Author

angus-g commented Jun 24, 2015

Thanks for the feedback. I've updated the commit, replacing the default(private) clause with a default(none). I see your point; I'd missed a few variables that should've been shared! I don't have a way to reproducibly test these (I can't replicate the timestats for examples with my setup), so I'm not completely sure if I got everything. However, at least it builds with OPENMP=1, which it didn't before.

@adcroft
Copy link
Copy Markdown
Collaborator

adcroft commented Jul 9, 2015

@angus-g Thanks for this and sorry for the delay - I was on vacation when you sent this in and have been catching ever since I got back.

@Zhi-Liang @nikizadehgfdl I've added OPENMP=1 to my scripts so I start catching these too...

@adcroft adcroft merged commit 1d602c2 into mom-ocean:dev/master Jul 9, 2015
@angus-g angus-g deleted the openmp-fixes branch November 16, 2015 00:02
marshallward pushed a commit to marshallward/MOM6 that referenced this pull request Sep 2, 2022
Report error logs from codecov upload fail
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.

3 participants