Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[examples,smpi] remove warnings and resolve a bug (I hope I amn't sure)
[simgrid.git] / examples / smpi / NAS / LU / bcast_inputs.f
1 c---------------------------------------------------------------------
2 c---------------------------------------------------------------------
3
4       subroutine bcast_inputs
5
6 c---------------------------------------------------------------------
7 c---------------------------------------------------------------------
8
9       implicit none
10
11       include 'mpinpb.h'
12       include 'applu.incl'
13
14 c---------------------------------------------------------------------
15 c  local variables
16 c---------------------------------------------------------------------
17       integer ierr
18
19 c---------------------------------------------------------------------
20 c   root broadcasts the data
21 c   The data isn't contiguous or of the same type, so it's not
22 c   clear how to send it in the "MPI" way. 
23 c   We could pack the info into a buffer or we could create
24 c   an obscene datatype to handle it all at once. Since we only
25 c   broadcast the data once, just use a separate broadcast for
26 c   each piece. 
27 c---------------------------------------------------------------------
28       call MPI_BCAST(ipr, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
29       call MPI_BCAST(inorm, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
30       call MPI_BCAST(itmax, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
31       call MPI_BCAST(dt, 1, dp_type, root, MPI_COMM_WORLD, ierr)
32       call MPI_BCAST(omega, 1, dp_type, root, MPI_COMM_WORLD, ierr)
33       call MPI_BCAST(tolrsd, 5, dp_type, root, MPI_COMM_WORLD, ierr)
34       call MPI_BCAST(nx0, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
35       call MPI_BCAST(ny0, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
36       call MPI_BCAST(nz0, 1, MPI_INTEGER, root, MPI_COMM_WORLD, ierr)
37
38       return
39       end
40
41