-
Notifications
You must be signed in to change notification settings - Fork 25
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
Overlap communication with computation in multiply_module #290
Open
ilectra
wants to merge
14
commits into
develop
Choose a base branch
from
ic-mm-comms-overlap
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9e15b16
Refactor communications into its own subroutine in multiply_module
ilectra 05317da
Add non-blocking Mquest_get, use it to overlap comms with comps.
ilectra 45015e9
Some debugging:
ilectra 4e2d38c
More debugging: move pointers out of functions, correct barriers. Tes…
ilectra 6be243c
Fix bug with computation only being called with the wrong kpart, and …
ilectra eca1b1f
Solve deadlock:
ilectra bd1ef12
Some clean up of variables from PR 295
ilectra 26b2585
Attempt to fix failing test in CI for "double free or corruption" - p…
ilectra a0b6b2e
Further attempt to fix failing CI test.
ilectra 4d77876
Update makefile for kathleen.
ilectra 4a71353
Merge branch 'develop' into ic-mm-comms-overlap
ilectra c720172
Add .gitignore and needed housekeeping, to make benchmark folders man…
ilectra 6ab122f
Remove unneeded barriers.
ilectra 34fac21
Merge branch 'develop' into ic-mm-comms-overlap
tkoskela File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -177,7 +177,7 @@ end subroutine Mquest_start_send | |||
!! SOURCE | ||||
!! | ||||
subroutine Mquest_get( mx_nponn, ilen2,ilen3,nc_part,send_node,sent_part,myid,& | ||||
bind_rem,b_rem,lenb_rem,bind,b,istart,mx_babs,mx_part,tag) | ||||
bind_rem,b_rem,lenb_rem,bind,istart,mx_babs,mx_part,tag) | ||||
|
||||
! Module usage | ||||
use mpi | ||||
|
@@ -194,7 +194,6 @@ subroutine Mquest_get( mx_nponn, ilen2,ilen3,nc_part,send_node,sent_part,myid,& | |||
integer :: bind(:) | ||||
integer :: lenb_rem | ||||
real(double) :: b_rem(lenb_rem) | ||||
real(double) :: b(:) | ||||
! Miscellaneous data | ||||
integer :: nc_part,send_node,sent_part,myid,ilen2,ilen3,size,istart,offset | ||||
integer :: nrstat(MPI_STATUS_SIZE) | ||||
|
@@ -222,6 +221,79 @@ subroutine Mquest_get( mx_nponn, ilen2,ilen3,nc_part,send_node,sent_part,myid,& | |||
end subroutine Mquest_get | ||||
!!*** | ||||
|
||||
!!*** | ||||
|
||||
! --------------------------------------------------------------------- | ||||
! subroutine Mquest_get_nonb | ||||
! --------------------------------------------------------------------- | ||||
|
||||
!!****f* comms_module/Mquest_get_nonb * | ||||
!! | ||||
!! NAME | ||||
!! Mquest_get_nonb | ||||
!! USAGE | ||||
!! | ||||
!! PURPOSE | ||||
!! Calls non-blocking receives to get data for matrix multiplication | ||||
!! INPUTS | ||||
!! | ||||
!! | ||||
!! USES | ||||
!! | ||||
!! AUTHOR | ||||
!! I. Christidi | ||||
!! CREATION DATE | ||||
!! 2023/10/06 | ||||
!! | ||||
!! MODIFICATION HISTORY | ||||
!! | ||||
!! SOURCE | ||||
!! | ||||
subroutine Mquest_get_nonb( mx_nponn, ilen2,ilen3,nc_part,send_node,sent_part,myid,& | ||||
bind_rem,b_rem,lenb_rem,bind,istart,mx_babs,mx_part,tag,request) | ||||
|
||||
! Module usage | ||||
use mpi | ||||
use datatypes | ||||
use matrix_comms_module, ONLY: mx_msg_per_part | ||||
use GenComms, ONLY: cq_abort | ||||
|
||||
implicit none | ||||
|
||||
! Maxima | ||||
integer :: mx_nponn,mx_babs,mx_part | ||||
! Arrays for receiving data | ||||
integer :: bind_rem(:) | ||||
integer :: bind(:) | ||||
integer :: lenb_rem | ||||
real(double) :: b_rem(lenb_rem) | ||||
! Miscellaneous data | ||||
integer :: nc_part,send_node,sent_part,myid,ilen2,ilen3,size,istart,offset | ||||
integer :: tag | ||||
integer :: request(2) | ||||
|
||||
! Local variables | ||||
integer :: ilen1,ierr,lenbind_rem | ||||
|
||||
!lenb_rem = size(b_rem) | ||||
!lenbind_rem = size(bind_rem) | ||||
ierr = 0 | ||||
ilen1 = nc_part | ||||
!if(3*ilen1+5*ilen2>lenbind_rem) call cq_abort('Get error ',3*ilen1+5*ilen2,lenbind_rem) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
if(ilen3>lenb_rem) call cq_abort('Get error 2 ',ilen3,lenb_rem) | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like this check should happen inside the |
||||
call MPI_Irecv(bind_rem,3*ilen1+5*ilen2,MPI_INTEGER, & | ||||
send_node-1,tag+1,MPI_COMM_WORLD,request(1),ierr) | ||||
if(ierr/=0) call cq_abort('Error receiving indices !',ierr) | ||||
if(ilen3.gt.0)then ! Get xyz, sequence list and elements | ||||
ierr = 0 | ||||
call MPI_Irecv(b_rem,ilen3, MPI_DOUBLE_PRECISION,send_node-1,& | ||||
tag+2,MPI_COMM_WORLD,request(2),ierr) | ||||
if(ierr/=0) call cq_abort('Error receiving data !',ierr) | ||||
endif | ||||
return | ||||
end subroutine Mquest_get_nonb | ||||
!!*** | ||||
|
||||
! --------------------------------------------------------------------- | ||||
! subroutine send_trans_data | ||||
! --------------------------------------------------------------------- | ||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.