[mpich-discuss] MPI_DIMS_CREATE

Valery valeryweber at hotmail.com
Tue Mar 31 02:10:14 CDT 2015


Dear All

I noticed that MPI_DIMS_CREATE cannot split eg
361
into a 19 * 19 processor grid. Is that a feature?

The code follows. 

I used
MPICH-3.1.4
gcc-4.9.2

valery


cat mpi_dims.f90
program test
  use mpi
  implicit none
  integer :: ierr, nnodes, ndims, dims(2), i
  call MPI_INIT( ierr )
  ndims = 2
  do i = 1, 200
     nnodes = i**2
     dims(:) = 0
     call MPI_DIMS_CREATE( nnodes, ndims, dims, ierr )
     if( dims(1) /= i ) write(*,*) i, dims
  enddo
  call MPI_FINALIZE(ierr)
end program test

mpif90 mpi_dims.f90


mpiexec -n 1 ./a.out 
          19         361           1
          41        1681           1
          43        1849           1
          71        5041           1
          73        5329           1
          79        6241           1
          83        6889           1
          89        7921           1
         137       18769           1
         139       19321           1
         149       22201           1
         151       22801           1
         157       24649           1
         163       26569           1
         167       27889           1
         173       29929           1
         179       32041           1
         181       32761           1


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20150331/07a50e52/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list