Skip to content

Commit 3ec8a03

Browse files
committed
Communicate ssnow%wbliq to workers
This is required so that the initialisation of ssnow%wbliq via load_parameters is propagated to the worker processes.
1 parent b6eb5f3 commit 3ec8a03

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/offline/cable_mpicommon.F90

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ MODULE cable_mpicommon
2929

3030
! base number of input fields: must correspond to CALLS to
3131
! MPI_address (field ) in *_mpimaster/ *_mpiworker
32-
INTEGER, PARAMETER :: nparam = 340
32+
INTEGER, PARAMETER :: nparam = 341
3333

3434
! MPI: extra params sent only if nsoilparmnew is true
3535
INTEGER, PARAMETER :: nsoilnew = 1

src/offline/cable_mpimaster.F90

+6
Original file line numberDiff line numberDiff line change
@@ -1885,6 +1885,12 @@ SUBROUTINE master_cable_params (comm,met,air,ssnow,veg,bgc,soil,canopy,&
18851885
& types(bidx), ierr)
18861886
blen(bidx) = 1
18871887

1888+
bidx = bidx + 1
1889+
CALL MPI_Get_address (ssnow%wbliq(off,1), displs(bidx), ierr)
1890+
CALL MPI_Type_create_hvector (ms, r2len, r2stride, MPI_BYTE, &
1891+
& types(bidx), ierr)
1892+
blen(bidx) = 1
1893+
18881894
! additional for sli
18891895
bidx = bidx + 1
18901896
CALL MPI_Get_address (ssnow%S(off,1), displs(bidx), ierr)

src/offline/cable_mpiworker.F90

+4
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,10 @@ SUBROUTINE worker_cable_params (comm,met,air,ssnow,veg,bgc,soil,canopy,&
11471147
CALL MPI_Get_address (ssnow%wblf, displs(bidx), ierr)
11481148
blen(bidx) = ms * r2len
11491149

1150+
bidx = bidx + 1
1151+
CALL MPI_Get_address (ssnow%wbliq, displs(bidx), ierr)
1152+
blen(bidx) = ms * r2len
1153+
11501154
! additional for sli
11511155
bidx = bidx + 1
11521156
CALL MPI_Get_address (ssnow%S, displs(bidx), ierr)

0 commit comments

Comments
 (0)