A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add MPI_Bsend, MPI_Ibsend, MPI_Bsend_init, MPI_Buffer_attach, MPI_Buffer_detach.
[simgrid.git]
/
src
/
smpi
/
mpi
/
smpi_topo.cpp
diff --git
a/src/smpi/mpi/smpi_topo.cpp
b/src/smpi/mpi/smpi_topo.cpp
index
7ce25d4
..
3376a52
100644
(file)
--- a/
src/smpi/mpi/smpi_topo.cpp
+++ b/
src/smpi/mpi/smpi_topo.cpp
@@
-29,7
+29,7
@@
Topo_Cart::Topo_Cart(int ndims) : ndims_(ndims), dims_(ndims), periodic_(ndims),
/* reorder is ignored, don't know what would be the consequences of a dumb reordering but neither do I see the point of
* reordering*/
/* reorder is ignored, don't know what would be the consequences of a dumb reordering but neither do I see the point of
* reordering*/
-Topo_Cart::Topo_Cart(MPI_Comm comm_old, int ndims,
int dims[],
int periods[], int /*reorder*/, MPI_Comm* comm_cart)
+Topo_Cart::Topo_Cart(MPI_Comm comm_old, int ndims,
const int dims[], const
int periods[], int /*reorder*/, MPI_Comm* comm_cart)
: Topo_Cart(ndims)
{
MPI_Group newGroup;
: Topo_Cart(ndims)
{
MPI_Group newGroup;
@@
-131,7
+131,7
@@
int Topo_Cart::get(int maxdims, int* dims, int* periods, int* coords) {
return MPI_SUCCESS;
}
return MPI_SUCCESS;
}
-int Topo_Cart::rank(int* coords, int* rank) {
+int Topo_Cart::rank(
const
int* coords, int* rank) {
int ndims =ndims_;
*rank = 0;
int multiplier = 1;
int ndims =ndims_;
*rank = 0;
int multiplier = 1;
@@
-387,8
+387,8
@@
static int getfactors(int num, int *nfactors, int **factors) {
return MPI_SUCCESS;
}
/* Allocate the array of prime factors which cannot exceed log_2(num) entries */
return MPI_SUCCESS;
}
/* Allocate the array of prime factors which cannot exceed log_2(num) entries */
- int sqrtnum = ceil(sqrt(
num
));
- int size = ceil(log(
num) / log(2
));
+ int sqrtnum = ceil(sqrt(
double(num)
));
+ int size = ceil(log(
double(num)) / log(2.0
));
*factors = new int[size];
int i = 0;
*factors = new int[size];
int i = 0;