Multiple Components, Single Executable Components processors could overlap. Sequential calls of different components. ============================================================ ! pop.f ! subroutine pop(pop_world) ! integer pop_world ! input communicator containing ! all processors involved in pop. ! If "ocean" processors overlap with "atmosphere" processors, ! above two subroutines will execute one after another (PCM mode). ! If there is no over-lap in processors, the two subroutines will ! execute simultaneously on different processor subsets (GEM mode). =========================================================== (A tentative interface for master.F) call MPH_setup_SE( 'atmosphere', ! 'atmosphere' is present 'ocean', ! 'ocean' is present 'coupler' ! 'coupler' is present ) ! You can add more components here. if(PE_in_component('ocean', comm)) call pop(comm) if(PE_in_component('atmosphere',comm)) call ccm(comm) ! comm is an output in function PE_in_component(). ============================================================= ! More complicated ways can be adopted. For example, suppose POP ! always run on procs 0-31, while CCM and coupler are invoked ! one after another on procs 32-63, if(PE_in_component('ocean', comm)) call pop( comm) do ii=1, nsteps if(PE_in_component('atmosphere',comm)) call ccm(comm) if(PE_in_component('coupler',comm)) call coupler(comm) end do ! There could have implicit syncronizations ! between POP and CCM, or between POP and coupler. END ========================================================= Processor.map file: list component names (tags) and processor ranges: PROCESSOR_MAP BEGIN atmosphere 0 15 ocean 16 30 coupler 31 31 land 32 35 ice 36 39 END Processor ranges could over-lap. For example, on 64 processors atmosphere 0 23 land 0 23 ! over-lap with ccm coupler 24 29 biosphere 30 31 ocean 32 63 ice 32 63 ! over-lap with pop It is users' responsibility to know who is overlapping with who else, and invoke components appropriately. One can always use the logical function PE_in_component("ocean", ocean_comm) to check if "ocean" covers this processor, and if yes, the "ocean" communicator is ocean_comm. ========================================================= Keywords "atmosphere", "ocean", "coupler", etc are tags or identifiers. They are provided for complete flexibility. One maybe equally well use "CCM", "CCM_LIN_ROOD", "POP_LANL", "POP_NCAR", etc. The only requirement is they are used consistently between processor.map file, and MPH_setup_SE(), MPH_comm_join(), MPH_global_id().