36 integer :: mpi_err,total_timesteps,i,j
38 real(kind=kind(1.0d0)),
allocatable,
dimension(:,:) :: x
41 print*,
'RUNNING MINIMAL_EMPIRE'
42 print*,
'EMPIRE COUPLING VERSION ',comm_version
45 print*,
'Reading state_dim from file state_dim: '
46 open(11,file=
'state_dim',action=
'read',status=
'old')
55 print*,
'allocating space for state vector (',state_dim,
',',cnt,
'):'
56 allocate(x(state_dim,cnt))
59 print*,
'Reading total_timesteps from file timesteps: '
60 open(11,file=
'timesteps',action=
'read',status=
'old')
61 read(11,*) total_timesteps
63 print*,
'Total timesteps read as ',total_timesteps
65 print*,
'receiving initial states'
71 do i = 1,total_timesteps
72 print*,
'starting timestep ',i
81 print*,
'sending final states'
86 call mpi_finalize(mpi_err)
87 print*,
'MINIMAL_EMPIRE got to the end without breaking!'
88 print*,
'my communicators were: ',cpl_mpi_comms(:)
subroutine send_all_models(stateDim, nrhs, x, tag)
subroutine to send all the model states to the models
Module containing EMPIRE coupling data.
subroutine recv_all_models(stateDim, nrhs, x)
subroutine to receive all the model states from the models after
subroutine initialise_mpi(mdl_id, cpl_root, cpl_mpi_comm)
program minimal_empire
the main program
Module that stores the dimension of observation and state spaces.
module pf_control holds all the information to control the the main program