Changeset 2298 for palm/trunk/SOURCE/init_pegrid.f90
- Timestamp:
- Jun 29, 2017 9:28:18 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_pegrid.f90
r2271 r2298 25 25 ! ----------------- 26 26 ! $Id$ 27 ! MPI2 related parts removed 28 ! 29 ! 2271 2017-06-09 12:34:55Z sward 27 30 ! Error message changed 28 31 ! … … 261 264 INTEGER(iwp), DIMENSION(2) :: pdims_remote !< 262 265 263 #if defined( __mpi2 )264 LOGICAL :: found !<265 #endif266 267 266 ! 268 267 !-- Get the number of OpenMP threads … … 627 626 628 627 #if defined( __parallel ) 629 #if defined( __mpi2 )630 !631 !-- In case of coupled runs, get the port name on PE0 of the atmosphere model632 !-- and pass it to PE0 of the ocean model633 IF ( myid == 0 ) THEN634 635 IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN636 637 CALL MPI_OPEN_PORT( MPI_INFO_NULL, port_name, ierr )638 639 CALL MPI_PUBLISH_NAME( 'palm_coupler', MPI_INFO_NULL, port_name, &640 ierr )641 642 !643 !-- Write a flag file for the ocean model and the other atmosphere644 !-- processes.645 !-- There seems to be a bug in MPICH2 which causes hanging processes646 !-- in case that execution of LOOKUP_NAME is continued too early647 !-- (i.e. before the port has been created)648 OPEN( 90, FILE='COUPLING_PORT_OPENED', FORM='FORMATTED' )649 WRITE ( 90, '(''TRUE'')' )650 CLOSE ( 90 )651 652 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN653 654 !655 !-- Continue only if the atmosphere model has created the port.656 !-- There seems to be a bug in MPICH2 which causes hanging processes657 !-- in case that execution of LOOKUP_NAME is continued too early658 !-- (i.e. before the port has been created)659 INQUIRE( FILE='COUPLING_PORT_OPENED', EXIST=found )660 DO WHILE ( .NOT. found )661 INQUIRE( FILE='COUPLING_PORT_OPENED', EXIST=found )662 ENDDO663 664 CALL MPI_LOOKUP_NAME( 'palm_coupler', MPI_INFO_NULL, port_name, ierr )665 666 ENDIF667 668 ENDIF669 670 !671 !-- In case of coupled runs, establish the connection between the atmosphere672 !-- and the ocean model and define the intercommunicator (comm_inter)673 CALL MPI_BARRIER( comm2d, ierr )674 IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN675 676 CALL MPI_COMM_ACCEPT( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &677 comm_inter, ierr )678 coupling_mode_remote = 'ocean_to_atmosphere'679 680 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN681 682 CALL MPI_COMM_CONNECT( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &683 comm_inter, ierr )684 coupling_mode_remote = 'atmosphere_to_ocean'685 686 ENDIF687 #endif688 628 689 629 !
Note: See TracChangeset
for help on using the changeset viewer.