- Timestamp:
- Mar 14, 2019, 10:34:31 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phy_common/mod_phys_lmdz_mpi_transfert.F90
r2429 r3465 42 42 END INTERFACE 43 43 44 INTERFACE reduce_min_mpi 45 MODULE PROCEDURE reduce_min_mpi_i,reduce_min_mpi_i1,reduce_min_mpi_i2,reduce_min_mpi_i3,reduce_min_mpi_i4, & 46 reduce_min_mpi_r,reduce_min_mpi_r1,reduce_min_mpi_r2,reduce_min_mpi_r3,reduce_min_mpi_r4 47 END INTERFACE 48 44 49 INTERFACE grid1dTo2d_mpi 45 50 MODULE PROCEDURE grid1dTo2d_mpi_i,grid1dTo2d_mpi_i1,grid1dTo2d_mpi_i2,grid1dTo2d_mpi_i3, & … … 986 991 END SUBROUTINE reduce_sum_mpi_r4 987 992 993 994 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 995 !! Definition des reduce_min --> 4D !! 996 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 997 998 SUBROUTINE reduce_min_mpi_i(VarIn, VarOut) 999 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1000 IMPLICIT NONE 1001 1002 INTEGER,INTENT(IN) :: VarIn 1003 INTEGER,INTENT(OUT) :: VarOut 1004 INTEGER :: VarIn_tmp(1) 1005 INTEGER :: VarOut_tmp(1) 1006 1007 VarIn_tmp(1)=VarIn 1008 CALL reduce_min_mpi_igen(VarIn_tmp,Varout_tmp,1) 1009 VarOut=VarOut_tmp(1) 1010 1011 END SUBROUTINE reduce_min_mpi_i 1012 1013 SUBROUTINE reduce_min_mpi_i1(VarIn, VarOut) 1014 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1015 IMPLICIT NONE 1016 1017 INTEGER,INTENT(IN),DIMENSION(:) :: VarIn 1018 INTEGER,INTENT(OUT),DIMENSION(:) :: VarOut 1019 1020 CALL reduce_min_mpi_igen(VarIn,Varout,SIZE(VarIn)) 1021 1022 END SUBROUTINE reduce_min_mpi_i1 1023 1024 SUBROUTINE reduce_min_mpi_i2(VarIn, VarOut) 1025 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1026 IMPLICIT NONE 1027 1028 INTEGER,INTENT(IN),DIMENSION(:,:) :: VarIn 1029 INTEGER,INTENT(OUT),DIMENSION(:,:) :: VarOut 1030 1031 CALL reduce_min_mpi_igen(VarIn,Varout,SIZE(VarIn)) 1032 1033 END SUBROUTINE reduce_min_mpi_i2 1034 1035 SUBROUTINE reduce_min_mpi_i3(VarIn, VarOut) 1036 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1037 IMPLICIT NONE 1038 1039 INTEGER,INTENT(IN),DIMENSION(:,:,:) :: VarIn 1040 INTEGER,INTENT(OUT),DIMENSION(:,:,:) :: VarOut 1041 1042 CALL reduce_min_mpi_igen(VarIn,Varout,SIZE(VarIn)) 1043 1044 END SUBROUTINE reduce_min_mpi_i3 1045 1046 SUBROUTINE reduce_min_mpi_i4(VarIn, VarOut) 1047 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1048 IMPLICIT NONE 1049 1050 INTEGER,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn 1051 INTEGER,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut 1052 1053 CALL reduce_min_mpi_igen(VarIn,Varout,SIZE(VarIn)) 1054 1055 END SUBROUTINE reduce_min_mpi_i4 1056 1057 1058 SUBROUTINE reduce_min_mpi_r(VarIn, VarOut) 1059 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1060 IMPLICIT NONE 1061 1062 REAL,INTENT(IN) :: VarIn 1063 REAL,INTENT(OUT) :: VarOut 1064 REAL :: VarIn_tmp(1) 1065 REAL :: VarOut_tmp(1) 1066 1067 VarIn_tmp(1)=VarIn 1068 CALL reduce_min_mpi_rgen(VarIn_tmp,Varout_tmp,1) 1069 VarOut=VarOut_tmp(1) 1070 1071 END SUBROUTINE reduce_min_mpi_r 1072 1073 SUBROUTINE reduce_min_mpi_r1(VarIn, VarOut) 1074 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1075 IMPLICIT NONE 1076 1077 REAL,INTENT(IN),DIMENSION(:) :: VarIn 1078 REAL,INTENT(OUT),DIMENSION(:) :: VarOut 1079 1080 CALL reduce_min_mpi_rgen(VarIn,Varout,SIZE(VarIn)) 1081 1082 END SUBROUTINE reduce_min_mpi_r1 1083 1084 SUBROUTINE reduce_min_mpi_r2(VarIn, VarOut) 1085 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1086 IMPLICIT NONE 1087 1088 REAL,INTENT(IN),DIMENSION(:,:) :: VarIn 1089 REAL,INTENT(OUT),DIMENSION(:,:) :: VarOut 1090 1091 CALL reduce_min_mpi_rgen(VarIn,Varout,SIZE(VarIn)) 1092 1093 END SUBROUTINE reduce_min_mpi_r2 1094 1095 SUBROUTINE reduce_min_mpi_r3(VarIn, VarOut) 1096 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1097 IMPLICIT NONE 1098 1099 REAL,INTENT(IN),DIMENSION(:,:,:) :: VarIn 1100 REAL,INTENT(OUT),DIMENSION(:,:,:) :: VarOut 1101 1102 CALL reduce_min_mpi_rgen(VarIn,Varout,SIZE(VarIn)) 1103 1104 END SUBROUTINE reduce_min_mpi_r3 1105 1106 SUBROUTINE reduce_min_mpi_r4(VarIn, VarOut) 1107 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 1108 IMPLICIT NONE 1109 1110 REAL,INTENT(IN),DIMENSION(:,:,:,:) :: VarIn 1111 REAL,INTENT(OUT),DIMENSION(:,:,:,:) :: VarOut 1112 1113 CALL reduce_min_mpi_rgen(VarIn,Varout,SIZE(VarIn)) 1114 1115 END SUBROUTINE reduce_min_mpi_r4 1116 1117 988 1118 989 1119 … … 1678 1808 1679 1809 1810 SUBROUTINE reduce_min_mpi_igen(VarIn,VarOut,nb) 1811 USE mod_phys_lmdz_mpi_data 1812 USE mod_grid_phy_lmdz 1813 IMPLICIT NONE 1814 1815 #ifdef CPP_MPI 1816 INCLUDE 'mpif.h' 1817 #endif 1818 1819 INTEGER,INTENT(IN) :: nb 1820 INTEGER,DIMENSION(nb),INTENT(IN) :: VarIn 1821 INTEGER,DIMENSION(nb),INTENT(OUT) :: VarOut 1822 INTEGER :: ierr 1823 1824 IF (.not.is_using_mpi) THEN 1825 VarOut(:)=VarIn(:) 1826 RETURN 1827 ENDIF 1828 1829 1830 #ifdef CPP_MPI 1831 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_INTEGER,MPI_MIN,mpi_master,COMM_LMDZ_PHY,ierr) 1832 #endif 1833 1834 END SUBROUTINE reduce_min_mpi_igen 1835 1836 SUBROUTINE reduce_min_mpi_rgen(VarIn,VarOut,nb) 1837 USE mod_phys_lmdz_mpi_data 1838 USE mod_grid_phy_lmdz 1839 1840 IMPLICIT NONE 1841 1842 #ifdef CPP_MPI 1843 INCLUDE 'mpif.h' 1844 #endif 1845 1846 INTEGER,INTENT(IN) :: nb 1847 REAL,DIMENSION(nb),INTENT(IN) :: VarIn 1848 REAL,DIMENSION(nb),INTENT(OUT) :: VarOut 1849 INTEGER :: ierr 1850 1851 IF (.not.is_using_mpi) THEN 1852 VarOut(:)=VarIn(:) 1853 RETURN 1854 ENDIF 1855 1856 #ifdef CPP_MPI 1857 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_REAL_LMDZ,MPI_MIN,mpi_master,COMM_LMDZ_PHY,ierr) 1858 #endif 1859 1860 END SUBROUTINE reduce_min_mpi_rgen 1861 1862 1863 1864 1865 1866 1867 1680 1868 SUBROUTINE grid1dTo2d_mpi_igen(VarIn,VarOut,dimsize) 1681 1869 USE mod_phys_lmdz_mpi_data
Note: See TracChangeset
for help on using the changeset viewer.