Skip to content

Commit

Permalink
any nprocs without send/recv
Browse files Browse the repository at this point in the history
  • Loading branch information
japham0 committed Jan 6, 2025
1 parent e139898 commit 0c737e4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
4 changes: 2 additions & 2 deletions model/src/w3iogomd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2483,9 +2483,9 @@ SUBROUTINE W3OUTG ( A, FLPART, FLOUTG, FLOUTG2 )
! TESTING FUNCTION WW3_SEND_TO_ERF()

COMMENT = 2
print *, "WW3: Calling WW3_SEND_TO_ERF from w3iogomd"
print *, "COMMENTING OUT: Calling WW3_SEND_TO_ERF from w3iogomd"

CALL WW3_SEND_TO_ERF()
! CALL WW3_SEND_TO_ERF()

#endif
#endif
Expand Down
23 changes: 18 additions & 5 deletions model/src/w3wavemd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
REAL, ALLOCATABLE :: BACSPEC(:)
REAL :: BACANGL
#endif
integer :: memunit, COUNTER, n_elements

integer :: memunit, COUNTER, n_elements, COMMENT
COMMENT = 1
n_elements = NX * NY
!/ ------------------------------------------------------------------- /
! 0. Initializations
Expand Down Expand Up @@ -1037,7 +1037,11 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
print *, "We have reached the end of Section 2"
!
! MY EDITS HERE
print *, "WW3: Calling WW3_RECEIVE_FROM_ERF from w3wavemd"
print *, "COMMENTING OUT FIRST CALL WW3_RECEIVE_FROM_ERF from w3wavemd"

! START BLOCK COMMENT
IF ( COMMENT .EQ. 0 ) THEN
print *, "TESTING BLOCK COMMENT"
CALL WW3_RECEIVE_FROM_ERF()
open(unit=6123, file='ww3_mpi_recv.txt', status='unknown', access='append', action="write")
DO JSEA=1, NSEAL
Expand All @@ -1062,6 +1066,9 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
U10D(JSEA) = theta_values(JSEA)
END DO

END IF
! END BLOCK COMMENT

! ==================================================================== /
!
! 3. Loop over time steps
Expand Down Expand Up @@ -1515,8 +1522,11 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
#endif
! print *, "WW3: ABOUT TO CALL SOURCE TERM SUBROUTINE", ISEA, U10(ISEA)
if (.FALSE.) then
print *, "WW3: Calling WW3_RECEIVE_FROM_ERF from w3wavemd"
CALL WW3_RECEIVE_FROM_ERF()
print *, "COMMENTING OUT WW3_RECEIVE_FROM_ERF from w3wavemd"

! START BLOCK COMMENT
IF ( COMMENT .EQ. 0 ) THEN
! CALL WW3_RECEIVE_FROM_ERF()
open(unit=6123, file='ww3_mpi_recv.txt', status='unknown', access='append', action="write")
DO JSEA=1, NSEAL
CALL INIT_GET_ISEA(ISEA, JSEA)
Expand All @@ -1539,6 +1549,9 @@ SUBROUTINE W3WAVE ( IMOD, ODAT, TEND, STAMP, NO_OUT &
U10(JSEA) = magnitude_values(JSEA)
U10D(JSEA) = theta_values(JSEA)
END DO

END IF
! END BLOCK COMMENT

ENDIF

Expand Down
10 changes: 8 additions & 2 deletions regtests/bin/run_cmake_test
Original file line number Diff line number Diff line change
Expand Up @@ -1571,8 +1571,14 @@ then
errmsg "Error occured during $path_e/$prog execution"
exit 1
#elif $runcmd -np $halfnproc $path_e/$prgb : -np $halfnproc $path_mpmd_e $path_mpmd_i | tee $ofile

elif $runcmd -np 1 $path_e/$prgb : -np 1 $path_mpmd_e $path_mpmd_i | tee $ofile
# Command for ww3 alone
#elif $runcmd -np 4 $path_e/$prgb $path_mpmd_e $path_mpmd_i

# Command for erf alone
#elif $runcmd -np 1 $path_mpmd_e $path_mpmd_i


elif $runcmd -np 3 $path_e/$prgb : -np 4 $path_mpmd_e $path_mpmd_i | tee $ofile
#elif mpirun --bind-to core:0 -np 1 $path_e/$prgb : --bind-to core:2,3 -np 2 $path_mpmd_e $path_mpmd_i | tee $ofile
then
\rm -f track_i.ww3
Expand Down

0 comments on commit 0c737e4

Please sign in to comment.