Skip to content

Conversation

@rouson
Copy link
Collaborator

@rouson rouson commented Oct 4, 2022

This commit

  1. Combines nested associate statements where possible,
  2. Combines two do_concurrent_* procedures into one,
  3. Adds bind(C) to the two procedures in do_concurrent_m that didn't have it,
  4. Makes the changes that bind(C) necessitates, including
    a. Switching to interoperable types and
    b. Switching functions to subroutines

The previous functions had allocatable array results, whereas the Fortran 2018 standard clause 18.3.6 requires scalar function results for bind(C) functions.

This PR speeds up single-image runs about 33% and preserves the parallel scalability:

Images execution time speedup
1 22 sec
2 10.3 2.1
4 5.5 4
8 3.4 6.5

This commit

1. Combines nested associate statements where possible,
2. Adds bind(C) the two remaining procedures in do_concurrent_m,
3. Makes the changes that bind(C) necessitates, including
  a. Switching to interoperable types and
  b. Switching functions to subroutines

The previous functions had allocatable array results, whereas
the Fortran 2018 standard clause 18.3.6 requires scalar function
results for bind(C) functions.
@rouson rouson requested a review from Dominick99 October 4, 2022 01:06
rouson added 2 commits October 3, 2022 18:33
This commit combines the do_concurrent_x and do_concurrent_speeds
subroutines because the former simply copied data for use in the
latter.
This commit adjusts the indentation in one procedure and removes
a commented line of code.
Copy link
Member

@Dominick99 Dominick99 left a comment

Choose a reason for hiding this comment

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

LGTM

@Dominick99 Dominick99 merged commit dd6dd01 into main Oct 4, 2022
@Dominick99 Dominick99 deleted the finish-bind_C branch October 4, 2022 02:25
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