Changeset 303
- Timestamp:
- 2011-07-07T08:55:42+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ORCHIDEE_EXT/ORCHIDEE/src_parallel/transfert_para.f90
r257 r303 28 28 END INTERFACE 29 29 30 INTERFACE gather_s31 MODULE PROCEDURE gather_is, &32 gather_rs, &33 gather_ls34 END INTERFACE30 !!$ INTERFACE gather_s 31 !!$ MODULE PROCEDURE gather_is, & 32 !!$ gather_rs, & 33 !!$ gather_ls 34 !!$ END INTERFACE 35 35 36 36 INTERFACE gather … … 548 548 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 549 549 550 SUBROUTINE gather_is(VarIn, VarOut)551 USE data_para552 USE timer553 554 IMPLICIT NONE555 556 #ifdef CPP_PARA557 INCLUDE 'mpif.h'558 #endif559 560 INTEGER,INTENT(IN) :: VarIn561 INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut562 563 #ifdef CPP_PARA564 INTEGER :: nb,i,index_para,rank565 INTEGER :: ierr566 LOGICAL :: flag=.FALSE.567 LOGICAL, PARAMETER :: check=.FALSE.568 #endif569 570 #ifndef CPP_PARA571 VarOut(:)=VarIn572 RETURN573 #else574 575 IF (timer_state(timer_mpi)==running) THEN576 flag=.TRUE.577 ELSE578 flag=.FALSE.579 ENDIF580 581 IF (flag) CALL suspend_timer(timer_mpi)582 583 IF (check) &584 WRITE(numout,*) "gather_rgen VarIn=",VarIn585 586 #ifdef CPP_PARA587 CALL MPI_GATHER(VarIn,1,MPI_INT_ORCH,VarOut,1,MPI_INT_ORCH,root_prc,MPI_COMM_ORCH,ierr)588 #endif589 590 IF (check) &591 WRITE(numout,*) "gather_rgen VarOut=",VarOut592 IF (flag) CALL resume_timer(timer_mpi)593 #endif594 END SUBROUTINE gather_is595 596 SUBROUTINE gather_rs(VarIn, VarOut)597 USE data_para598 USE timer599 600 IMPLICIT NONE601 602 #ifdef CPP_PARA603 INCLUDE 'mpif.h'604 #endif605 606 REAL,INTENT(IN) :: VarIn607 REAL,INTENT(OUT),DIMENSION(:) :: VarOut608 609 #ifdef CPP_PARA610 INTEGER :: nb,i,index_para,rank611 INTEGER :: ierr612 LOGICAL :: flag=.FALSE.613 LOGICAL, PARAMETER :: check=.FALSE.614 #endif615 616 #ifndef CPP_PARA617 VarOut(:)=VarIn618 RETURN619 #else620 621 IF (timer_state(timer_mpi)==running) THEN622 flag=.TRUE.623 ELSE624 flag=.FALSE.625 ENDIF626 627 IF (flag) CALL suspend_timer(timer_mpi)628 629 IF (check) &630 WRITE(numout,*) "gather_rgen VarIn=",VarIn631 632 #ifdef CPP_PARA633 CALL MPI_GATHER(VarIn,1,MPI_REAL_ORCH,VarOut,1,MPI_REAL_ORCH,root_prc,MPI_COMM_ORCH,ierr)634 #endif635 636 IF (check) &637 WRITE(numout,*) "gather_rgen VarOut=",VarOut638 639 IF (flag) CALL resume_timer(timer_mpi)640 #endif641 END SUBROUTINE gather_rs642 643 SUBROUTINE gather_ls(VarIn, VarOut)644 USE data_para645 USE timer646 647 IMPLICIT NONE648 649 #ifdef CPP_PARA650 INCLUDE 'mpif.h'651 #endif652 653 LOGICAL,INTENT(IN) :: VarIn654 LOGICAL,INTENT(OUT),DIMENSION(:) :: VarOut655 656 #ifdef CPP_PARA657 INTEGER :: nb,i,index_para,rank658 INTEGER :: ierr659 LOGICAL :: flag=.FALSE.660 LOGICAL, PARAMETER :: check=.FALSE.661 #endif662 663 #ifndef CPP_PARA664 VarOut(:)=VarIn665 RETURN666 #else667 668 IF (timer_state(timer_mpi)==running) THEN669 flag=.TRUE.670 ELSE671 flag=.FALSE.672 ENDIF673 674 IF (flag) CALL suspend_timer(timer_mpi)675 676 IF (check) &677 WRITE(numout,*) "gather_rgen VarIn=",VarIn678 679 #ifdef CPP_PARA680 CALL MPI_GATHER(VarIn,1,MPI_LOGICAL,VarOut,1,MPI_LOGICAL,root_prc,MPI_COMM_ORCH,ierr)681 #endif682 683 IF (check) &684 WRITE(numout,*) "gather_rgen VarOut=",VarOut685 IF (flag) CALL resume_timer(timer_mpi)686 #endif687 END SUBROUTINE gather_ls550 !!$ SUBROUTINE gather_is(VarIn, VarOut) 551 !!$ USE data_para 552 !!$ USE timer 553 !!$ 554 !!$ IMPLICIT NONE 555 !!$ 556 !!$#ifdef CPP_PARA 557 !!$ INCLUDE 'mpif.h' 558 !!$#endif 559 !!$ 560 !!$ INTEGER,INTENT(IN) :: VarIn 561 !!$ INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut 562 !!$ 563 !!$#ifdef CPP_PARA 564 !!$ INTEGER :: nb,i,index_para,rank 565 !!$ INTEGER :: ierr 566 !!$ LOGICAL :: flag=.FALSE. 567 !!$ LOGICAL, PARAMETER :: check=.FALSE. 568 !!$#endif 569 !!$ 570 !!$#ifndef CPP_PARA 571 !!$ VarOut(:)=VarIn 572 !!$ RETURN 573 !!$#else 574 !!$ 575 !!$ IF (timer_state(timer_mpi)==running) THEN 576 !!$ flag=.TRUE. 577 !!$ ELSE 578 !!$ flag=.FALSE. 579 !!$ ENDIF 580 !!$ 581 !!$ IF (flag) CALL suspend_timer(timer_mpi) 582 !!$ 583 !!$ IF (check) & 584 !!$ WRITE(numout,*) "gather_rgen VarIn=",VarIn 585 !!$ 586 !!$#ifdef CPP_PARA 587 !!$ CALL MPI_GATHER(VarIn,1,MPI_INT_ORCH,VarOut,1,MPI_INT_ORCH,root_prc,MPI_COMM_ORCH,ierr) 588 !!$#endif 589 !!$ 590 !!$ IF (check) & 591 !!$ WRITE(numout,*) "gather_rgen VarOut=",VarOut 592 !!$ IF (flag) CALL resume_timer(timer_mpi) 593 !!$#endif 594 !!$ END SUBROUTINE gather_is 595 !!$ 596 !!$ SUBROUTINE gather_rs(VarIn, VarOut) 597 !!$ USE data_para 598 !!$ USE timer 599 !!$ 600 !!$ IMPLICIT NONE 601 !!$ 602 !!$#ifdef CPP_PARA 603 !!$ INCLUDE 'mpif.h' 604 !!$#endif 605 !!$ 606 !!$ REAL,INTENT(IN) :: VarIn 607 !!$ REAL,INTENT(OUT),DIMENSION(:) :: VarOut 608 !!$ 609 !!$#ifdef CPP_PARA 610 !!$ INTEGER :: nb,i,index_para,rank 611 !!$ INTEGER :: ierr 612 !!$ LOGICAL :: flag=.FALSE. 613 !!$ LOGICAL, PARAMETER :: check=.FALSE. 614 !!$#endif 615 !!$ 616 !!$#ifndef CPP_PARA 617 !!$ VarOut(:)=VarIn 618 !!$ RETURN 619 !!$#else 620 !!$ 621 !!$ IF (timer_state(timer_mpi)==running) THEN 622 !!$ flag=.TRUE. 623 !!$ ELSE 624 !!$ flag=.FALSE. 625 !!$ ENDIF 626 !!$ 627 !!$ IF (flag) CALL suspend_timer(timer_mpi) 628 !!$ 629 !!$ IF (check) & 630 !!$ WRITE(numout,*) "gather_rgen VarIn=",VarIn 631 !!$ 632 !!$#ifdef CPP_PARA 633 !!$ CALL MPI_GATHER(VarIn,1,MPI_REAL_ORCH,VarOut,1,MPI_REAL_ORCH,root_prc,MPI_COMM_ORCH,ierr) 634 !!$#endif 635 !!$ 636 !!$ IF (check) & 637 !!$ WRITE(numout,*) "gather_rgen VarOut=",VarOut 638 !!$ 639 !!$ IF (flag) CALL resume_timer(timer_mpi) 640 !!$#endif 641 !!$ END SUBROUTINE gather_rs 642 !!$ 643 !!$ SUBROUTINE gather_ls(VarIn, VarOut) 644 !!$ USE data_para 645 !!$ USE timer 646 !!$ 647 !!$ IMPLICIT NONE 648 !!$ 649 !!$#ifdef CPP_PARA 650 !!$ INCLUDE 'mpif.h' 651 !!$#endif 652 !!$ 653 !!$ LOGICAL,INTENT(IN) :: VarIn 654 !!$ LOGICAL,INTENT(OUT),DIMENSION(:) :: VarOut 655 !!$ 656 !!$#ifdef CPP_PARA 657 !!$ INTEGER :: nb,i,index_para,rank 658 !!$ INTEGER :: ierr 659 !!$ LOGICAL :: flag=.FALSE. 660 !!$ LOGICAL, PARAMETER :: check=.FALSE. 661 !!$#endif 662 !!$ 663 !!$#ifndef CPP_PARA 664 !!$ VarOut(:)=VarIn 665 !!$ RETURN 666 !!$#else 667 !!$ 668 !!$ IF (timer_state(timer_mpi)==running) THEN 669 !!$ flag=.TRUE. 670 !!$ ELSE 671 !!$ flag=.FALSE. 672 !!$ ENDIF 673 !!$ 674 !!$ IF (flag) CALL suspend_timer(timer_mpi) 675 !!$ 676 !!$ IF (check) & 677 !!$ WRITE(numout,*) "gather_rgen VarIn=",VarIn 678 !!$ 679 !!$#ifdef CPP_PARA 680 !!$ CALL MPI_GATHER(VarIn,1,MPI_LOGICAL,VarOut,1,MPI_LOGICAL,root_prc,MPI_COMM_ORCH,ierr) 681 !!$#endif 682 !!$ 683 !!$ IF (check) & 684 !!$ WRITE(numout,*) "gather_rgen VarOut=",VarOut 685 !!$ IF (flag) CALL resume_timer(timer_mpi) 686 !!$#endif 687 !!$ END SUBROUTINE gather_ls 688 688 689 689 !!!!! --> Les entiers
Note: See TracChangeset
for help on using the changeset viewer.