TABLE OF CONTENTS


ABINIT/xmpi_sum_master [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master

FUNCTION

  This module contains functions that calls MPI routine,
  if we compile the code using the MPI  CPP flags.
  xmpi_sum_master is the generic function.

COPYRIGHT

  Copyright (C) 2001-2018 ABINIT group (AR,XG,MB)
  This file is distributed under the terms of the
  GNU General Public License, see ~ABINIT/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

NOTES

  The workspace array xsum is filled to zeros to avoid SIFPE in [mpiio][t28_MPI4][np=4] on tikal_gnu_4.9_mpich
  On this bot, the code is compiled with -ffpe-trap and the illegal operation in the MPI library 
  make tests using xmpi_sum_master abort.
  Strictly speaking the initialization is not needed because xsum has intent(out) --> bug in mpich3-3.1.3 (gcc492)

SOURCE


ABINIT/xmpi_sum_master_c1cplx [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c1cplx

FUNCTION

  Reduces values on all processes to a single value.
  Target: one-dimensional complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

777 subroutine xmpi_sum_master_c1cplx(xval,master,spaceComm,ier)
778 
779 
780 !This section has been created automatically by the script Abilint (TD).
781 !Do not modify the following lines by hand.
782 #undef ABI_FUNC
783 #define ABI_FUNC 'xmpi_sum_master_c1cplx'
784 !End of the abilint section
785 
786  implicit none
787 
788 !Arguments-------------------------
789  complex(spc), DEV_CONTARRD intent(inout) :: xval(:)
790  integer ,intent(in) :: master
791  integer ,intent(in) :: spaceComm
792  integer ,intent(out) :: ier
793 
794 !Local variables-------------------
795 #if defined HAVE_MPI
796  integer :: n1,nproc_space_comm
797  complex(spc),allocatable :: xsum(:)
798 #endif
799 
800 ! *************************************************************************
801 
802  ier=0
803 #if defined HAVE_MPI
804  if (spaceComm /= MPI_COMM_NULL) then
805    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
806    if (nproc_space_comm /= 1) then
807      n1 = size(xval,dim=1)
808 !    Collect xval from processors on master in spaceComm
809      ABI_STAT_ALLOCATE(xsum,(n1), ier)
810      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
811      xsum = zero ! See notes
812      call MPI_REDUCE(xval,xsum,n1,MPI_COMPLEX,MPI_SUM,master,spaceComm,ier)
813      xval = xsum
814      ABI_DEALLOCATE(xsum)
815    end if
816  end if
817 #endif
818 
819 end subroutine xmpi_sum_master_c1cplx

ABINIT/xmpi_sum_master_c1dpc [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c1dpc

FUNCTION

  Reduces values on all processes to a single value.
  Target: one-dimensional double complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

1114 subroutine xmpi_sum_master_c1dpc(xval,master,spaceComm,ier)
1115 
1116 
1117 !This section has been created automatically by the script Abilint (TD).
1118 !Do not modify the following lines by hand.
1119 #undef ABI_FUNC
1120 #define ABI_FUNC 'xmpi_sum_master_c1dpc'
1121 !End of the abilint section
1122 
1123  implicit none
1124 
1125 !Arguments-------------------------
1126  complex(dpc), DEV_CONTARRD intent(inout) :: xval(:)
1127  integer,intent(in) :: master
1128  integer,intent(in) :: spaceComm
1129  integer,intent(out) :: ier
1130 
1131 !Local variables-------------------
1132 #if defined HAVE_MPI
1133  integer :: n1
1134  integer :: nproc_space_comm
1135  complex(dpc),allocatable :: xsum(:)
1136 #endif
1137 
1138 ! *************************************************************************
1139 
1140  ier=0
1141 #if defined HAVE_MPI
1142  if (spaceComm /= MPI_COMM_NULL) then
1143    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
1144    if (nproc_space_comm /= 1) then
1145      n1 = size(xval,dim=1)
1146 !    Collect xval from processors on master in spaceComm
1147      ABI_STAT_ALLOCATE(xsum,(n1), ier)
1148      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
1149      xsum = zero ! See notes
1150      call MPI_REDUCE(xval,xsum,n1,MPI_DOUBLE_COMPLEX,MPI_SUM,master,spaceComm,ier)
1151      xval (:) = xsum(:)
1152      ABI_DEALLOCATE(xsum)
1153    end if
1154  end if
1155 #endif
1156 
1157 end subroutine xmpi_sum_master_c1dpc

ABINIT/xmpi_sum_master_c2cplx [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c2cplx

FUNCTION

  Reduces values on all processes to a single value.
  Target: two-dimensional complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

842 subroutine xmpi_sum_master_c2cplx(xval,master,spaceComm,ier)
843 
844 
845 !This section has been created automatically by the script Abilint (TD).
846 !Do not modify the following lines by hand.
847 #undef ABI_FUNC
848 #define ABI_FUNC 'xmpi_sum_master_c2cplx'
849 !End of the abilint section
850 
851  implicit none
852 
853 !Arguments-------------------------
854  complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:)
855  integer,intent(in) :: master
856  integer,intent(in) :: spaceComm
857  integer,intent(out) :: ier
858 
859 !Local variables-------------------
860 #if defined HAVE_MPI
861  integer :: n1,n2
862  integer :: nproc_space_comm
863  complex(spc),allocatable :: xsum(:,:)
864 #endif
865 
866 ! *************************************************************************
867 
868  ier=0
869 #if defined HAVE_MPI
870  if (spaceComm /= MPI_COMM_NULL) then
871    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
872    if (nproc_space_comm /= 1) then
873      n1 = size(xval,dim=1)
874      n2 = size(xval,dim=2)
875 !    Collect xval from processors on master in spaceComm
876      ABI_STAT_ALLOCATE(xsum,(n1,n2), ier)
877      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
878      xsum = zero ! See notes
879      call MPI_REDUCE(xval,xsum,n1*n2,MPI_COMPLEX,MPI_SUM,master,spaceComm,ier)
880      xval (:,:) = xsum(:,:)
881      ABI_DEALLOCATE(xsum)
882    end if
883  end if
884 #endif
885 
886 end subroutine xmpi_sum_master_c2cplx

ABINIT/xmpi_sum_master_c2dpc [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c2dpc

FUNCTION

  Reduces values on all processes to a single value.
  Target: two-dimensional double complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

1179 subroutine xmpi_sum_master_c2dpc(xval,master,spaceComm,ier)
1180 
1181 
1182 !This section has been created automatically by the script Abilint (TD).
1183 !Do not modify the following lines by hand.
1184 #undef ABI_FUNC
1185 #define ABI_FUNC 'xmpi_sum_master_c2dpc'
1186 !End of the abilint section
1187 
1188  implicit none
1189 
1190 !Arguments-------------------------
1191  complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:)
1192  integer ,intent(in) :: master
1193  integer ,intent(in) :: spaceComm
1194  integer ,intent(out) :: ier
1195 
1196 !Local variables-------------------
1197 #if defined HAVE_MPI
1198  integer :: n1,n2
1199  complex(dpc) , allocatable :: xsum(:,:)
1200  integer :: nproc_space_comm
1201 #endif
1202 
1203 ! *************************************************************************
1204 
1205  ier=0
1206 #if defined HAVE_MPI
1207  if (spaceComm /= MPI_COMM_NULL) then
1208    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
1209    if (nproc_space_comm /= 1) then
1210      n1 = size(xval,dim=1)
1211      n2 = size(xval,dim=2)
1212 !    Collect xval from processors on master in spaceComm
1213      ABI_STAT_ALLOCATE(xsum,(n1,n2), ier)
1214      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
1215      xsum = zero ! See notes
1216      call MPI_REDUCE(xval,xsum,n1*n2,MPI_DOUBLE_COMPLEX,MPI_SUM,master,spaceComm,ier)
1217      xval (:,:) = xsum(:,:)
1218      ABI_DEALLOCATE(xsum)
1219    end if
1220  end if
1221 #endif
1222 
1223 end subroutine xmpi_sum_master_c2dpc

ABINIT/xmpi_sum_master_c3cplx [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c3cplx

FUNCTION

  Reduces values on all processes to a single value.
  Target: three-dimensional complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

909 subroutine xmpi_sum_master_c3cplx(xval,master,spaceComm,ier)
910 
911 
912 !This section has been created automatically by the script Abilint (TD).
913 !Do not modify the following lines by hand.
914 #undef ABI_FUNC
915 #define ABI_FUNC 'xmpi_sum_master_c3cplx'
916 !End of the abilint section
917 
918  implicit none
919 
920 !Arguments-------------------------
921  complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:)
922  integer,intent(in) :: master
923  integer,intent(in) :: spaceComm
924  integer,intent(out) :: ier
925 
926 !Local variables-------------------
927 #if defined HAVE_MPI
928  integer :: n1,n2,n3
929  complex(spc), allocatable :: xsum(:,:,:)
930  integer :: nproc_space_comm
931 #endif
932 
933 ! *************************************************************************
934 
935  ier=0
936 #if defined HAVE_MPI
937  if (spaceComm /= MPI_COMM_NULL) then
938    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
939    if (nproc_space_comm /= 1) then
940      n1 = size(xval,dim=1)
941      n2 = size(xval,dim=2)
942      n3 = size(xval,dim=3)
943 !    Collect xval from processors on master in spaceComm
944      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3), ier)
945      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
946      xsum = zero ! See notes
947      call MPI_REDUCE(xval,xsum,n1*n2*n3,MPI_COMPLEX,MPI_SUM,master,spaceComm,ier)
948      xval (:,:,:) = xsum(:,:,:)
949      ABI_DEALLOCATE(xsum)
950    end if
951  end if
952 #endif
953 
954 end subroutine xmpi_sum_master_c3cplx

ABINIT/xmpi_sum_master_c3dpc [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c3dpc

FUNCTION

  Reduces values on all processes to a single value.
  Target: three-dimensional double complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

1245 subroutine xmpi_sum_master_c3dpc(xval,master,spaceComm,ier)
1246 
1247 
1248 !This section has been created automatically by the script Abilint (TD).
1249 !Do not modify the following lines by hand.
1250 #undef ABI_FUNC
1251 #define ABI_FUNC 'xmpi_sum_master_c3dpc'
1252 !End of the abilint section
1253 
1254  implicit none
1255 
1256 !Arguments-------------------------
1257  complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:)
1258  integer,intent(in) :: master
1259  integer,intent(in) :: spaceComm
1260  integer,intent(out) :: ier
1261 
1262 !Local variables-------------------
1263 #if defined HAVE_MPI
1264  integer :: n1,n2,n3
1265  complex(dpc) , allocatable :: xsum(:,:,:)
1266  integer :: nproc_space_comm
1267 #endif
1268 
1269 ! *************************************************************************
1270 
1271  ier=0
1272 #if defined HAVE_MPI
1273  if (spaceComm /= MPI_COMM_NULL) then
1274    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
1275    if (nproc_space_comm /= 1) then
1276      n1 = size(xval,dim=1)
1277      n2 = size(xval,dim=2)
1278      n3 = size(xval,dim=3)
1279 !    Collect xval from processors on master in spaceComm
1280      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3), ier)
1281      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
1282      xsum = zero ! See notes
1283      call MPI_REDUCE(xval,xsum,n1*n2*n3,MPI_DOUBLE_COMPLEX,MPI_SUM,master,spaceComm,ier)
1284      xval (:,:,:) = xsum(:,:,:)
1285      ABI_DEALLOCATE(xsum)
1286    end if
1287  end if
1288 #endif
1289 end subroutine xmpi_sum_master_c3dpc

ABINIT/xmpi_sum_master_c4cplx [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c4cplx

FUNCTION

  Reduces values on all processes to a single value.
  Target: four-dimensional complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

 976 subroutine xmpi_sum_master_c4cplx(xval,master,spaceComm,ier)
 977 
 978 
 979 !This section has been created automatically by the script Abilint (TD).
 980 !Do not modify the following lines by hand.
 981 #undef ABI_FUNC
 982 #define ABI_FUNC 'xmpi_sum_master_c4cplx'
 983 !End of the abilint section
 984 
 985  implicit none
 986 
 987 !Arguments-------------------------
 988  complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:)
 989  integer,intent(in) :: master
 990  integer,intent(in) :: spaceComm
 991  integer,intent(out) :: ier
 992 
 993 !Local variables-------------------
 994 #if defined HAVE_MPI
 995  integer :: n1,n2,n3,n4
 996  integer :: nproc_space_comm
 997  complex(spc), allocatable :: xsum(:,:,:,:)
 998 #endif
 999 
1000 ! *************************************************************************
1001 
1002  ier=0
1003 #if defined HAVE_MPI
1004  if (spaceComm /= MPI_COMM_NULL) then
1005    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
1006    if (nproc_space_comm /= 1) then
1007      n1 = size(xval,dim=1)
1008      n2 = size(xval,dim=2)
1009      n3 = size(xval,dim=3)
1010      n4 = size(xval,dim=4)
1011 !    Collect xval from processors on master in spaceComm
1012      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4), ier)
1013      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
1014      xsum = zero ! See notes
1015      call MPI_REDUCE(xval,xsum,n1*n2*n3*n4,MPI_COMPLEX,MPI_SUM,master,spaceComm,ier)
1016      xval (:,:,:,:) = xsum(:,:,:,:)
1017      ABI_DEALLOCATE(xsum)
1018    end if
1019  end if
1020 #endif
1021 end subroutine xmpi_sum_master_c4cplx

ABINIT/xmpi_sum_master_c4dpc [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c4dpc

FUNCTION

  Reduces values on all processes to a single value.
  Target: four-dimensional double complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

1311 subroutine xmpi_sum_master_c4dpc(xval,master,spaceComm,ier)
1312 
1313 
1314 !This section has been created automatically by the script Abilint (TD).
1315 !Do not modify the following lines by hand.
1316 #undef ABI_FUNC
1317 #define ABI_FUNC 'xmpi_sum_master_c4dpc'
1318 !End of the abilint section
1319 
1320  implicit none
1321 
1322 !Arguments-------------------------
1323  complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:)
1324  integer,intent(in) :: master
1325  integer,intent(in) :: spaceComm
1326  integer,intent(out) :: ier
1327 
1328 !Local variables-------------------
1329 #if defined HAVE_MPI
1330  integer :: n1,n2,n3,n4
1331  complex(dpc) , allocatable :: xsum(:,:,:,:)
1332  integer :: nproc_space_comm
1333 #endif
1334 
1335 ! *************************************************************************
1336 
1337  ier=0
1338 #if defined HAVE_MPI
1339  if (spaceComm /= MPI_COMM_NULL) then
1340    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
1341    if (nproc_space_comm /= 1) then
1342      n1 = size(xval,dim=1)
1343      n2 = size(xval,dim=2)
1344      n3 = size(xval,dim=3)
1345      n4 = size(xval,dim=4)
1346 !    Collect xval from processors on master in spaceComm
1347      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4), ier)
1348      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
1349      xsum = zero ! See notes
1350      call MPI_REDUCE(xval,xsum,n1*n2*n3*n4,MPI_DOUBLE_COMPLEX,MPI_SUM,master,spaceComm,ier)
1351      xval (:,:,:,:) = xsum(:,:,:,:)
1352      ABI_DEALLOCATE(xsum)
1353    end if
1354  end if
1355 #endif
1356 end subroutine xmpi_sum_master_c4dpc

ABINIT/xmpi_sum_master_c5cplx [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c5cplx

FUNCTION

  Reduces values on all processes to a single value.
  Target: five-dimensional single precision complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

1046 subroutine xmpi_sum_master_c5cplx(xval,master,spaceComm,ier)
1047 
1048 !This section has been created automatically by the script Abilint (TD).
1049 !Do not modify the following lines by hand.
1050 #undef ABI_FUNC
1051 #define ABI_FUNC 'xmpi_sum_master_c5cplx'
1052 !End of the abilint section
1053 
1054  implicit none
1055 
1056 !Arguments-------------------------
1057  complex(spc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:)
1058  integer,intent(in) :: master
1059  integer,intent(in) :: spaceComm
1060  integer,intent(out) :: ier
1061 
1062 !Local variables-------------------
1063 #if defined HAVE_MPI
1064  integer :: n1,n2,n3,n4,n5
1065  complex(spc),allocatable :: xsum(:,:,:,:,:)
1066  integer :: nproc_space_comm
1067 #endif
1068 
1069 ! *************************************************************************
1070 
1071  ier=0
1072 #if defined HAVE_MPI
1073  if (spaceComm /= MPI_COMM_NULL) then
1074    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
1075    if (nproc_space_comm /= 1) then
1076      n1 = size(xval,dim=1)
1077      n2 = size(xval,dim=2)
1078      n3 = size(xval,dim=3)
1079      n4 = size(xval,dim=4)
1080      n5 = size(xval,dim=5)
1081 !    Collect xval from processors on master in spaceComm
1082      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4,n5), ier)
1083      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
1084      xsum = zero ! See notes
1085      call MPI_REDUCE(xval,xsum,n1*n2*n3*n4*n5,MPI_COMPLEX,MPI_SUM,master,spaceComm,ier)
1086      xval = xsum
1087      ABI_DEALLOCATE(xsum)
1088    end if
1089  end if
1090 #endif
1091 end subroutine xmpi_sum_master_c5cplx

ABINIT/xmpi_sum_master_c5dpc [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_c5dpc

FUNCTION

  Reduces values on all processes to a single value.
  Target: five-dimensional double complex arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

1378 subroutine xmpi_sum_master_c5dpc(xval,master,spaceComm,ier)
1379 
1380 
1381 !This section has been created automatically by the script Abilint (TD).
1382 !Do not modify the following lines by hand.
1383 #undef ABI_FUNC
1384 #define ABI_FUNC 'xmpi_sum_master_c5dpc'
1385 !End of the abilint section
1386 
1387  implicit none
1388 
1389 !Arguments-------------------------
1390  complex(dpc), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:)
1391  integer,intent(in) :: master
1392  integer,intent(in) :: spaceComm
1393  integer,intent(out) :: ier
1394 
1395 !Local variables-------------------
1396 #if defined HAVE_MPI
1397  integer :: n1,n2,n3,n4,n5
1398  complex(dpc),allocatable :: xsum(:,:,:,:,:)
1399  integer :: nproc_space_comm
1400 #endif
1401 
1402 ! *************************************************************************
1403 
1404  ier=0
1405 #if defined HAVE_MPI
1406  if (spaceComm /= MPI_COMM_NULL) then
1407    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
1408    if (nproc_space_comm /= 1) then
1409      n1 = size(xval,dim=1)
1410      n2 = size(xval,dim=2)
1411      n3 = size(xval,dim=3)
1412      n4 = size(xval,dim=4)
1413      n5 = size(xval,dim=5)
1414 !    Collect xval from processors on master in spaceComm
1415      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4,n5), ier)
1416      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
1417      xsum = zero ! See notes
1418      call MPI_REDUCE(xval,xsum,n1*n2*n3*n4*n5,MPI_DOUBLE_COMPLEX,MPI_SUM,master,spaceComm,ier)
1419      xval (:,:,:,:,:) = xsum(:,:,:,:,:)
1420      ABI_DEALLOCATE(xsum)
1421    end if
1422  end if
1423 #endif
1424 end subroutine xmpi_sum_master_c5dpc

ABINIT/xmpi_sum_master_dp [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_p

FUNCTION

  Reduces values on all processes to a single value.
  Target: integer scalars.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

105 subroutine xmpi_sum_master_dp(xval,master,spaceComm,ier)
106 
107 
108 !This section has been created automatically by the script Abilint (TD).
109 !Do not modify the following lines by hand.
110 #undef ABI_FUNC
111 #define ABI_FUNC 'xmpi_sum_master_dp'
112 !End of the abilint section
113 
114  implicit none
115 
116 !Arguments-------------------------
117  real(dp),intent(inout) :: xval
118  integer ,intent(in) :: master
119  integer ,intent(in) :: spaceComm
120  integer ,intent(out)   :: ier
121 
122 !Local variables-------------------
123 #if defined HAVE_MPI
124  real(dp) :: xsum
125  integer :: nproc_space_comm
126 #endif
127 
128 ! *************************************************************************
129 
130  ier=0
131 #if defined HAVE_MPI
132  if (spaceComm /= MPI_COMM_NULL) then
133    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
134    if (nproc_space_comm /= 1) then
135 !    Accumulate xval on all proc. in spaceComm
136      call MPI_REDUCE(xval,xsum,1,MPI_DOUBLE_PRECISION,MPI_SUM,master,spaceComm,ier)
137      xval = xsum
138    end if
139  end if
140 #endif
141 end subroutine xmpi_sum_master_dp

ABINIT/xmpi_sum_master_dp1d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_dp1d

FUNCTION

  Reduces values on all processes to a single value.
  Target: double precision one-dimensional arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

231 subroutine xmpi_sum_master_dp1d(xval,master,spaceComm,ier)
232 
233 
234 !This section has been created automatically by the script Abilint (TD).
235 !Do not modify the following lines by hand.
236 #undef ABI_FUNC
237 #define ABI_FUNC 'xmpi_sum_master_dp1d'
238 !End of the abilint section
239 
240  implicit none
241 
242 !Arguments-------------------------
243  real(dp), DEV_CONTARRD intent(inout) :: xval(:)
244  integer ,intent(in) :: master
245  integer ,intent(in) :: spaceComm
246  integer ,intent(out) :: ier
247 
248 !Local variables-------------------
249 #if defined HAVE_MPI
250  integer :: n1
251  real(dp) , allocatable :: xsum(:)
252  integer :: nproc_space_comm
253 #endif
254 
255 ! *************************************************************************
256 
257  ier=0
258 #if defined HAVE_MPI
259  if (spaceComm /= MPI_COMM_NULL) then
260    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
261    if (nproc_space_comm /= 1) then
262      n1 = size(xval,dim=1)
263 !    Accumulate xval on all proc. in spaceComm
264      ABI_STAT_ALLOCATE(xsum,(n1), ier)
265      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
266      xsum = zero ! See notes
267      call MPI_REDUCE(xval,xsum,n1,MPI_DOUBLE_PRECISION,MPI_SUM,master,spaceComm,ier)
268      xval (:) = xsum(:)
269      ABI_DEALLOCATE(xsum)
270    end if
271  end if
272 #endif
273 end subroutine xmpi_sum_master_dp1d

ABINIT/xmpi_sum_master_dp2d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_dp2d

FUNCTION

  Reduces values on all processes to a single value.
  Target: double precision two-dimensional arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

296 subroutine xmpi_sum_master_dp2d(xval,master,spaceComm,ier)
297 
298 
299 !This section has been created automatically by the script Abilint (TD).
300 !Do not modify the following lines by hand.
301 #undef ABI_FUNC
302 #define ABI_FUNC 'xmpi_sum_master_dp2d'
303 !End of the abilint section
304 
305  implicit none
306 
307 !Arguments-------------------------
308  real(dp), DEV_CONTARRD intent(inout) :: xval(:,:)
309  integer ,intent(in) :: master
310  integer ,intent(in) :: spaceComm
311  integer ,intent(out) :: ier
312 
313 !Local variables-------------------
314 #if defined HAVE_MPI
315  integer :: n1,n2
316  real(dp) , allocatable :: xsum(:,:)
317  integer :: nproc_space_comm
318 #endif
319 
320 ! *************************************************************************
321 
322  ier=0
323 #if defined HAVE_MPI
324  if (spaceComm /= MPI_COMM_NULL) then
325    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
326    if (nproc_space_comm /= 1) then
327      n1 = size(xval,dim=1)
328      n2 = size(xval,dim=2)
329 !    Accumulate xval on all proc. in spaceComm
330      ABI_STAT_ALLOCATE(xsum,(n1,n2), ier)
331      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
332      xsum = zero ! See notes
333      call MPI_REDUCE(xval,xsum,n1*n2,MPI_DOUBLE_PRECISION,MPI_SUM,master,spaceComm,ier)
334      xval (:,:) = xsum(:,:)
335      ABI_DEALLOCATE(xsum)
336    end if
337  end if
338 #endif
339 end subroutine xmpi_sum_master_dp2d

ABINIT/xmpi_sum_master_dp3d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_dp3d

FUNCTION

  Reduces values on all processes to a single value.
  Target: double precision three-dimensional arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

361 subroutine xmpi_sum_master_dp3d(xval,master,spaceComm,ier)
362 
363 
364 !This section has been created automatically by the script Abilint (TD).
365 !Do not modify the following lines by hand.
366 #undef ABI_FUNC
367 #define ABI_FUNC 'xmpi_sum_master_dp3d'
368 !End of the abilint section
369 
370  implicit none
371 
372 !Arguments-------------------------
373  real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:)
374  integer ,intent(in) :: master
375  integer ,intent(in) :: spaceComm
376  integer ,intent(out) :: ier
377 
378 !Local variables-------------------
379 #if defined HAVE_MPI
380  integer :: n1,n2,n3
381  real(dp) , allocatable :: xsum(:,:,:)
382  integer :: nproc_space_comm
383 #endif
384 
385 ! *************************************************************************
386 
387  ier=0
388 #if defined HAVE_MPI
389  if (spaceComm /= MPI_COMM_NULL) then
390    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
391    if (nproc_space_comm /= 1) then
392      n1 = size(xval,dim=1)
393      n2 = size(xval,dim=2)
394      n3 = size(xval,dim=3)
395 !    Accumulate xval on all proc. in spaceComm
396      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3), ier)
397      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
398      xsum = zero ! See notes
399 
400      call MPI_REDUCE(xval,xsum,n1*n2*n3,MPI_DOUBLE_PRECISION,MPI_SUM,master,spaceComm,ier)
401      xval (:,:,:) = xsum(:,:,:)
402      ABI_DEALLOCATE(xsum)
403    end if
404  end if
405 #endif
406 
407 end subroutine xmpi_sum_master_dp3d

ABINIT/xmpi_sum_master_dp4d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_dp4d

FUNCTION

  Reduces values on all processes to a single value.
  Target: double precision four-dimensional arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

429 subroutine xmpi_sum_master_dp4d(xval,master,spaceComm,ier)
430 
431 
432 !This section has been created automatically by the script Abilint (TD).
433 !Do not modify the following lines by hand.
434 #undef ABI_FUNC
435 #define ABI_FUNC 'xmpi_sum_master_dp4d'
436 !End of the abilint section
437 
438  implicit none
439 
440 !Arguments-------------------------
441  real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:)
442  integer ,intent(in) :: master
443  integer ,intent(in) :: spaceComm
444  integer ,intent(out) :: ier
445 
446 !Local variables-------------------
447 #if defined HAVE_MPI
448  integer :: n1,n2,n3,n4
449  real(dp) , allocatable :: xsum(:,:,:,:)
450  integer :: nproc_space_comm
451 #endif
452 
453 ! *************************************************************************
454 
455  ier=0
456 #if defined HAVE_MPI
457  if (spaceComm /= MPI_COMM_NULL) then
458    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
459    if (nproc_space_comm /= 1) then
460      n1 = size(xval,dim=1)
461      n2 = size(xval,dim=2)
462      n3 = size(xval,dim=3)
463      n4 = size(xval,dim=4)
464 !    Accumulate xval on all proc. in spaceComm
465      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4), ier)
466      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
467      xsum = zero ! See notes
468      call MPI_REDUCE(xval,xsum,n1*n2*n3*n4,MPI_DOUBLE_PRECISION,MPI_SUM,master,spaceComm,ier)
469      xval (:,:,:,:) = xsum(:,:,:,:)
470      ABI_DEALLOCATE(xsum)
471    end if
472  end if
473 #endif
474 
475 end subroutine xmpi_sum_master_dp4d

ABINIT/xmpi_sum_master_dp5d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_dp5d

FUNCTION

  Reduces values on all processes to a single value.
  Target: double precision five-dimensional arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

497 subroutine xmpi_sum_master_dp5d(xval,master,spaceComm,ier)
498 
499 
500 !This section has been created automatically by the script Abilint (TD).
501 !Do not modify the following lines by hand.
502 #undef ABI_FUNC
503 #define ABI_FUNC 'xmpi_sum_master_dp5d'
504 !End of the abilint section
505 
506  implicit none
507 
508 !Arguments ------------------------------------
509  real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:)
510  integer ,intent(in) :: master
511  integer ,intent(in) :: spaceComm
512  integer ,intent(out)   :: ier
513 
514 !Local variables-------------------------------
515 #if defined HAVE_MPI
516  integer :: n1,n2,n3,n4,n5
517  real(dp), allocatable :: xsum(:,:,:,:,:)
518  integer :: nproc_space_comm
519 #endif
520 
521 ! *************************************************************************
522 
523  ier=0
524 #if defined HAVE_MPI
525  if (spaceComm /= MPI_COMM_NULL) then
526    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
527    if (nproc_space_comm /= 1) then
528      n1 = size(xval,dim=1)
529      n2 = size(xval,dim=2)
530      n3 = size(xval,dim=3)
531      n4 = size(xval,dim=4)
532      n5 = size(xval,dim=5)
533 !    Accumulate xval on all proc. in spaceComm
534      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4,n5), ier)
535      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
536      xsum = zero ! See notes
537      call MPI_reduce(xval,xsum,n1*n2*n3*n4*n5,MPI_DOUBLE_PRECISION,MPI_SUM,master,spaceComm,ier)
538      xval (:,:,:,:,:) = xsum(:,:,:,:,:)
539      ABI_DEALLOCATE(xsum)
540    end if
541  end if
542 #endif
543 
544 end subroutine xmpi_sum_master_dp5d

ABINIT/xmpi_sum_master_dp6d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_dp6d

FUNCTION

  Reduces values on all processes to a single value.
  Target: double precision six-dimensional arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

566 subroutine xmpi_sum_master_dp6d(xval,master,spaceComm,ier)
567 
568 
569 !This section has been created automatically by the script Abilint (TD).
570 !Do not modify the following lines by hand.
571 #undef ABI_FUNC
572 #define ABI_FUNC 'xmpi_sum_master_dp6d'
573 !End of the abilint section
574 
575  implicit none
576 
577 !Arguments ------------------------------------
578  real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:)
579  integer ,intent(in) :: master
580  integer ,intent(in) :: spaceComm
581  integer ,intent(out) :: ier
582 
583 !Local variables-------------------------------
584 #if defined HAVE_MPI
585  integer :: n1,n2,n3,n4,n5,n6
586  real(dp), allocatable :: xsum(:,:,:,:,:,:)
587  integer :: nproc_space_comm
588 #endif
589 
590 ! *************************************************************************
591 
592  ier=0
593 #if defined HAVE_MPI
594  if (spaceComm /= MPI_COMM_NULL) then
595    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
596    if (nproc_space_comm /= 1) then
597      n1 = size(xval,dim=1)
598      n2 = size(xval,dim=2)
599      n3 = size(xval,dim=3)
600      n4 = size(xval,dim=4)
601      n5 = size(xval,dim=5)
602      n6 = size(xval,dim=6)
603 !    Accumulate xval on all proc. in spaceComm
604      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4,n5,n6), ier)
605      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
606      xsum = zero ! See notes
607      call MPI_reduce(xval,xsum,n1*n2*n3*n4*n5*n6,MPI_DOUBLE_PRECISION,MPI_SUM,master,spaceComm,ier)
608      xval (:,:,:,:,:,:) = xsum(:,:,:,:,:,:)
609      ABI_DEALLOCATE(xsum)
610    end if
611  end if
612 #endif
613 
614 end subroutine xmpi_sum_master_dp6d

ABINIT/xmpi_sum_master_dp7d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_dp7d

FUNCTION

  Reduces values on all processes to a single value.
  Target: double precision seven-dimensional arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

636 subroutine xmpi_sum_master_dp7d(xval,master,spaceComm,ier)
637 
638 
639 !This section has been created automatically by the script Abilint (TD).
640 !Do not modify the following lines by hand.
641 #undef ABI_FUNC
642 #define ABI_FUNC 'xmpi_sum_master_dp7d'
643 !End of the abilint section
644 
645  implicit none
646 
647 !Arguments ------------------------------------
648  real(dp), DEV_CONTARRD intent(inout) :: xval(:,:,:,:,:,:,:)
649  integer ,intent(in) :: master
650  integer ,intent(in) :: spaceComm
651  integer ,intent(out) :: ier
652 
653 !Local variables-------------------------------
654 #if defined HAVE_MPI
655  integer :: n1,n2,n3,n4,n5,n6,n7
656  real(dp), allocatable :: xsum(:,:,:,:,:,:,:)
657  integer :: nproc_space_comm
658 #endif
659 
660 ! *************************************************************************
661 
662  ier=0
663 #if defined HAVE_MPI
664  if (spaceComm /= MPI_COMM_NULL) then
665    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
666    if (nproc_space_comm /= 1) then
667      n1 = size(xval,dim=1)
668      n2 = size(xval,dim=2)
669      n3 = size(xval,dim=3)
670      n4 = size(xval,dim=4)
671      n5 = size(xval,dim=5)
672      n6 = size(xval,dim=6)
673      n7 = size(xval,dim=7)
674 !    Accumulate xval on all proc. in spaceComm
675      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4,n5,n6,n7), ier)
676      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
677      xsum = zero ! See notes
678      call MPI_reduce(xval,xsum,n1*n2*n3*n4*n5*n6*n7,MPI_DOUBLE_PRECISION,MPI_SUM,master,spaceComm,ier)
679      xval (:,:,:,:,:,:,:) = xsum(:,:,:,:,:,:,:)
680      ABI_DEALLOCATE(xsum)
681    end if
682  end if
683 #endif
684 
685 end subroutine xmpi_sum_master_dp7d

ABINIT/xmpi_sum_master_int [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_int

FUNCTION

  Reduces values on all processes to a single value.
  Target: integer scalars.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

47 subroutine xmpi_sum_master_int(xval,master,spaceComm,ier)
48 
49 
50 !This section has been created automatically by the script Abilint (TD).
51 !Do not modify the following lines by hand.
52 #undef ABI_FUNC
53 #define ABI_FUNC 'xmpi_sum_master_int'
54 !End of the abilint section
55 
56  implicit none
57 
58 !Arguments-------------------------
59  integer,intent(inout) :: xval
60  integer ,intent(in) :: master
61  integer ,intent(in) :: spaceComm
62  integer ,intent(out)   :: ier
63 
64 !Local variables-------------------
65 #if defined HAVE_MPI
66  integer :: xsum
67  integer :: nproc_space_comm
68 #endif
69 
70 ! *************************************************************************
71 
72  ier=0
73 #if defined HAVE_MPI
74  if (spaceComm /= MPI_COMM_NULL) then
75    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
76    if (nproc_space_comm /= 1) then
77 !    Accumulate xval on all proc. in spaceComm
78      call MPI_REDUCE(xval,xsum,1,MPI_INTEGER,MPI_SUM,master,spaceComm,ier)
79      xval = xsum
80    end if
81  end if
82 #endif
83 end subroutine xmpi_sum_master_int

ABINIT/xmpi_sum_master_int2d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_int2d

FUNCTION

  Reduces values on all processes to a single value.
  Target: two-dimensional integer arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

165 subroutine xmpi_sum_master_int2d(xval,master,spaceComm,ier)
166 
167 
168 !This section has been created automatically by the script Abilint (TD).
169 !Do not modify the following lines by hand.
170 #undef ABI_FUNC
171 #define ABI_FUNC 'xmpi_sum_master_int2d'
172 !End of the abilint section
173 
174  implicit none
175 
176 !Arguments ------------------------------------
177  integer, DEV_CONTARRD intent(inout) :: xval(:,:)
178  integer,intent(in) :: master,spaceComm
179  integer,intent(out) :: ier
180 
181 !Local variables-------------------------------
182 #if defined HAVE_MPI
183  integer :: n1,n2
184  integer, allocatable :: xsum(:,:)
185  integer :: nproc_space_comm
186 #endif
187 
188 ! *************************************************************************
189 
190  ier=0
191 #if defined HAVE_MPI
192  if (spaceComm /= MPI_COMM_NULL) then
193    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
194    if (nproc_space_comm /= 1) then
195      n1 = size(xval,dim=1)
196      n2 = size(xval,dim=2)
197 !    Accumulate xval on all proc. in spaceComm
198      ABI_STAT_ALLOCATE(xsum,(n1,n2), ier)
199      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
200      xsum = zero ! See notes
201      call MPI_reduce(xval,xsum,n1*n2,MPI_INTEGER,MPI_SUM,master,spaceComm,ier)
202      xval = xsum
203      ABI_DEALLOCATE(xsum)
204    end if
205  end if
206 #endif
207 
208 end subroutine xmpi_sum_master_int2d

ABINIT/xmpi_sum_master_int4d [ Functions ]

[ Top ] [ Functions ]

NAME

  xmpi_sum_master_int4d

FUNCTION

  Reduces values on all processes to a single value.
  Target: four-diemnsional integer arrays.

INPUTS

  master= master MPI node
  spaceComm= MPI communicator

OUTPUT

  ier= exit status, a non-zero value meaning there is an error

SIDE EFFECTS

  xval= buffer array

SOURCE

708 subroutine xmpi_sum_master_int4d(xval,master,spaceComm,ier)
709 
710 
711 !This section has been created automatically by the script Abilint (TD).
712 !Do not modify the following lines by hand.
713 #undef ABI_FUNC
714 #define ABI_FUNC 'xmpi_sum_master_int4d'
715 !End of the abilint section
716 
717  implicit none
718 
719 !Arguments ------------------------------------
720  integer, DEV_CONTARRD intent(inout) :: xval(:,:,:,:)
721  integer,intent(in) :: master
722  integer,intent(in) :: spaceComm
723  integer,intent(out) :: ier
724 
725 !Local variables-------------------------------
726 #if defined HAVE_MPI
727  integer :: n1,n2,n3,n4
728  integer, allocatable :: xsum(:,:,:,:)
729  integer :: nproc_space_comm
730 #endif
731 
732 ! *************************************************************************
733 
734  ier=0
735 #if defined HAVE_MPI
736  if (spaceComm /= MPI_COMM_NULL) then
737    call MPI_COMM_SIZE(spaceComm,nproc_space_comm,ier)
738    if (nproc_space_comm /= 1) then
739      n1 = size(xval,dim=1)
740      n2 = size(xval,dim=2)
741      n3 = size(xval,dim=3)
742      n4 = size(xval,dim=4)
743 !    Accumulate xval on all proc. in spaceComm
744      ABI_STAT_ALLOCATE(xsum,(n1,n2,n3,n4), ier)
745      if (ier /= 0) call xmpi_abort(msg='error allocating xsum')
746      xsum = zero ! See notes
747      call MPI_reduce(xval,xsum,n1*n2*n3*n4,MPI_INTEGER,MPI_SUM,master,spaceComm,ier)
748      xval (:,:,:,:) = xsum(:,:,:,:)
749      ABI_DEALLOCATE(xsum)
750    end if
751  end if
752 #endif
753 
754 end subroutine xmpi_sum_master_int4d