1 | program nonactive |
---|
2 | use mod_oasis |
---|
3 | use mpi |
---|
4 | implicit none |
---|
5 | integer :: i, kinfo, root |
---|
6 | integer :: comp_id |
---|
7 | character(len=10) :: comp_name = "nonactive" |
---|
8 | integer :: local_comm, local_size, comm_size, comm_rank |
---|
9 | character(len=10), dimension(3) :: cnames |
---|
10 | integer :: intra_comm, intra_rank, intra_size |
---|
11 | |
---|
12 | !AP logical, parameter :: lp_coupled = .false. |
---|
13 | logical, parameter :: lp_coupled = .true. |
---|
14 | |
---|
15 | print '(2A)', "Component name: ", comp_name |
---|
16 | |
---|
17 | call oasis_init_comp(comp_id, comp_name, kinfo, coupled=lp_coupled) |
---|
18 | if(kinfo<0) call oasis_abort(comp_id, comp_name, & |
---|
19 | & "Error in oasis_init_comp: ", rcode=kinfo) |
---|
20 | print '(A,I0)', "Nonactive: Component ID: ", comp_id |
---|
21 | |
---|
22 | call oasis_get_localcomm(local_comm, kinfo) |
---|
23 | if(kinfo<0) call oasis_abort(comp_id, comp_name, & |
---|
24 | & "Error in oasis_get_localcomm: ", rcode=kinfo) |
---|
25 | |
---|
26 | call mpi_comm_size(local_comm, comm_size, kinfo) |
---|
27 | call mpi_comm_rank(local_comm, comm_rank, kinfo) |
---|
28 | print '(A,I0,A,I0)', "Nonactive: rank = ",comm_rank, " of ",comm_size |
---|
29 | |
---|
30 | if (lp_coupled) then |
---|
31 | |
---|
32 | call oasis_enddef(kinfo) |
---|
33 | if(kinfo<0) call oasis_abort(comp_id, comp_name, & |
---|
34 | & "Error in oasis_enddef: ", rcode=kinfo) |
---|
35 | |
---|
36 | call oasis_terminate(kinfo) |
---|
37 | if(kinfo<0) call oasis_abort(comp_id, comp_name, & |
---|
38 | & "Error in oasis_terminate: ", rcode=kinfo) |
---|
39 | |
---|
40 | end if |
---|
41 | |
---|
42 | end program nonactive |
---|