1
1

Suggestion from Andreas Schäfer: we really only need sqrt(freeprocs)

primes.  This considerably reduces the computational load when
freeprocs is large.

cmr=v1.7.5:reviewer=hjelmn:subject=MPI_Dims_create optimization

This commit was SVN r30539.
Этот коммит содержится в:
Jeff Squyres 2014-02-03 19:21:04 +00:00
родитель 12f0bf9488
Коммит fb67d98867

Просмотреть файл

@ -11,6 +11,7 @@
* All rights reserved.
* Copyright (c) 2012 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -109,7 +110,7 @@ int MPI_Dims_create(int nnodes, int ndims, int dims[])
}
/* Compute the relevant prime numbers for factoring */
if (MPI_SUCCESS != (err = getprimes(freeprocs, &nprimes, &primes))) {
if (MPI_SUCCESS != (err = getprimes(sqrt(freeprocs), &nprimes, &primes))) {
return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, err,
FUNC_NAME);
}