That's when a value stored in a variable is never used.
exit(1);
}
- err = MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
- err = MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
+ MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
if (size < 2) {
printf("run this program with exactly 2 processes (-np 2)\n");
MPI_Finalize();
MC_ignore(&(status.count), sizeof(status.count));
/* Get number of processes */
- err = MPI_Comm_size(MPI_COMM_WORLD, &size);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
/* Get id of this process */
- err = MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if(rank == 0){ /* Coordinator */
while(1){
exit(1);
}
- err = MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
- err = MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
+ MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
if (size % 3 != 0) {
printf("run this program with exactly 3*N processes \n");
MPI_Finalize();
MC_ignore(&(status.count), sizeof(status.count));
/* Get number of processes */
- err = MPI_Comm_size(MPI_COMM_WORLD, &size);
+ MPI_Comm_size(MPI_COMM_WORLD, &size);
/* Get id of this process */
- err = MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
if(rank == 0){ /* Coordinator */
while(1){
exit(1);
}
- err = MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
- err = MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
+ MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
if (size < 2) {
printf("run this program with at least 2 processes \n");
MPI_Finalize();
exit(1);
}
- err = MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
- err = MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
+ MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
if (size < 2) {
printf("run this program with at least 2 processes \n");
MPI_Finalize();
/* Stacks comparison */
unsigned int cursor = 0;
int diff_local = 0;
+#ifdef MC_DEBUG
is_diff = 0;
+#endif
mc_snapshot_stack_t stack1, stack2;
while(cursor < xbt_dynar_length(s1->stacks)){
PJ_container_free(existing_container);
//create new container on the new_host location
- msg = PJ_container_new(instr_vm_id(vm, str, len), INSTR_MSG_VM, PJ_container_get(SIMIX_host_get_name(new_host)));
+ PJ_container_new(instr_vm_id(vm, str, len), INSTR_MSG_VM, PJ_container_get(SIMIX_host_get_name(new_host)));
//end link
msg = PJ_container_get(instr_vm_id(vm, str, len));
- blockcount doubles until the last step when only the remaining data is
exchanged.
*/
- blockcount = 1;
- tmpsend = (char*) rbuf;
-
new_rcounts = (int*) calloc(4*size, sizeof(int));
new_rdispls = new_rcounts + size;
new_scounts = new_rdispls + size;
pof2 <<= 1;
pof2 >>= 1;
- mask = 1;
send_idx = recv_idx = 0;
// uneven count
recv_chunk = extent * count / (comm_size / num_core);
mask = 1;
- i = 0;
curr_count = count / 2;
int phase = 0;
base_offset = 0;
- send_base_offset = 0;
- recv_base_offset = 0;
while (mask < (comm_size / num_core)) {
dst = inter_rank ^ mask;
// compute offsets
- send_base_offset = base_offset;
-
// right-handside
if (inter_rank & mask) {
recv_base_offset = base_offset + curr_count;
req_ptr = reqs;
- send_offset = recv_offset = (rank % Y) * block_size * num_procs;
-
count = send_count * num_procs;
for (i = 0; i < Y; i++) {
req_ptr = reqs;
- send_offset = recv_offset = (rank % two_dsize) * block_size * num_procs;
+ recv_offset = (rank % two_dsize) * block_size * num_procs;
smpi_mpi_sendrecv(send_buff, send_count * num_procs, send_type, rank, tag,
tmp_buff1 + recv_offset, num_procs * recv_count,
size = smpi_comm_size(comm);
XBT_DEBUG("<%d> algorithm alltoall_bruck() called.", rank);
- err = smpi_datatype_extent(sendtype, &lb, &sendext);
- err = smpi_datatype_extent(recvtype, &lb, &recvext);
+ smpi_datatype_extent(sendtype, &lb, &sendext);
+ smpi_datatype_extent(recvtype, &lb, &recvext);
/* Local copy from self */
err =
smpi_datatype_copy((char *)sendbuf + senddisps[rank] * sendext,
COLL_TUNED_COMPUTED_SEGCOUNT( (size_t)first_segment_size, typelng,
first_segment_count );
- ptmp = (char *) rbuf;
for (i = 0; i < size; ++i) {
if (i == rank) {
/* skip myself */
to = header_buf[myordering + 1];
}
from = header_buf[myordering - 1];
- smpi_mpi_recv(tmp_buf, count, datatype, header_buf[myordering - 1], tag,
- comm, &status);
+ smpi_mpi_recv(tmp_buf, count, datatype, from, tag, comm, &status);
smpi_op_apply(op, tmp_buf, rbuf, &count, &datatype);
smpi_mpi_send(rbuf, count, datatype, to, tag, comm);
}
smpi_mpi_recv(ptmp, rcount*size, rdtype, bmtree->tree_prev,
COLL_TAG_SCATTER, comm, &status);
/* local copy to rbuf */
- err = smpi_datatype_copy(ptmp, scount, sdtype,
- rbuf, rcount, rdtype);
+ smpi_datatype_copy(ptmp, scount, sdtype, rbuf, rcount, rdtype);
}
/* send to children on all non-leaf */
for (i = 0; i < bmtree->tree_nextsize; i++) {
rank = smpi_comm_rank(comm);
size = smpi_comm_size(comm);
XBT_DEBUG("<%d> algorithm alltoall_bruck() called.", rank);
- err = smpi_datatype_extent(sendtype, &lb, &sendext);
- err = smpi_datatype_extent(recvtype, &lb, &recvext);
+ smpi_datatype_extent(sendtype, &lb, &sendext);
+ smpi_datatype_extent(recvtype, &lb, &recvext);
/* Local copy from self */
err =
smpi_datatype_copy((char *)sendbuf + rank * sendcount * sendext,
rank = smpi_comm_rank(comm);
size = smpi_comm_size(comm);
XBT_DEBUG("<%d> algorithm alltoall_basic_linear() called.", rank);
- err = smpi_datatype_extent(sendtype, &lb, &sendext);
- err = smpi_datatype_extent(recvtype, &lb, &recvext);
+ smpi_datatype_extent(sendtype, &lb, &sendext);
+ smpi_datatype_extent(recvtype, &lb, &recvext);
/* simple optimization */
err = smpi_datatype_copy((char *)sendbuf + rank * sendcount * sendext,
sendcount, sendtype,
rank = smpi_comm_rank(comm);
size = smpi_comm_size(comm);
XBT_DEBUG("<%d> algorithm basic_alltoallv() called.", rank);
- err = smpi_datatype_extent(sendtype, &lb, &sendext);
- err = smpi_datatype_extent(recvtype, &lb, &recvext);
+ smpi_datatype_extent(sendtype, &lb, &sendext);
+ smpi_datatype_extent(recvtype, &lb, &recvext);
/* Local copy from self */
err =
smpi_datatype_copy((char *)sendbuf + senddisps[rank] * sendext,
(*factors)[i++] = 2;
}
/* determine all occurences of uneven prime numbers up to sqrt(num) */
- d = 3;
for(d = 3; (num > 1) && (d < sqrtnum); d += 2) {
while((num % d) == 0) {
num /= d;
if (TRACE_uncategorized()){
type_t bandwidth_used = PJ_type_get_or_null ("bandwidth_used", new->type);
if (bandwidth_used == NULL){
- bandwidth_used = PJ_type_variable_new ("bandwidth_used", "0.5 0.5 0.5", new->type);
+ PJ_type_variable_new ("bandwidth_used", "0.5 0.5 0.5", new->type);
}
}
}
if (TRACE_uncategorized()){
type_t power_used = PJ_type_get_or_null ("power_used", new->type);
if (power_used == NULL){
- power_used = PJ_type_variable_new ("power_used", "0.5 0.5 0.5", new->type);
+ PJ_type_variable_new ("power_used", "0.5 0.5 0.5", new->type);
}
}
min = max = 0.5;
}
- min_diff = max_diff = middle_diff = 0.0;
overall_error = 1;
if ((diff_0 = diff(1e-16, var_cnst)) >= 0) {
do {
//Get the next node
xbt_dynar_get_cpy(connected_nodes, iterator, &graph_node);
- node_data = xbt_graph_node_get_data(graph_node);
//add all the linked nodes to the connected node array
outgoing_edges = xbt_graph_node_get_outedges(graph_node);
{
ActionPtr action = NULL;
double min = -1;
- double share, time_to_completion;
+ double share;
XBT_DEBUG
("Before share resources, the size of modified actions set is %zd",
action->updateRemainingLazy(now);
min = -1;
- time_to_completion = -1;
share = lmm_variable_getvalue(action->getVariable());
if (share > 0) {
+ double time_to_completion;
if (action->getRemains() > 0) {
time_to_completion = action->getRemainsNoUpdate() / share;
} else {
if (suite->unit_disabled) {
fprintf(stderr, "%s%d disabled", (first ? "" : ", "),
suite->unit_disabled);
- first = 0;
}
fprintf(stderr, ")\n Tests: %.0f%% ok (%d tests: ",
suite->nb_tests
if (suite->test_expect) {
fprintf(stderr, "%s%d expected to fail", (first ? "" : "; "),
suite->test_expect);
- first = 0;
}
fprintf(stderr, ")\n");
}
if (_xbt_test_suite_ignore) {
fprintf(stderr, "%s%d ignored", (first ? "" : ", "),
_xbt_test_suite_ignore);
- first = 0;
}
fprintf(stderr, ")\n Units: %.0f%% ok (%d units: ",
_xbt_test_nb_units
if (_xbt_test_unit_ignore) {
fprintf(stderr, "%s%d ignored", (first ? "" : ", "),
_xbt_test_unit_ignore);
- first = 0;
}
fprintf(stderr, ")\n Tests: %.0f%% ok (%d tests: ",
_xbt_test_nb_tests
dw_variable_t var;
dw_type_t type;
- var = test_global_variable(mc_binary_info, "some_local_variable", &some_local_variable, sizeof(int));
+ test_global_variable(mc_binary_info, "some_local_variable", &some_local_variable, sizeof(int));
var = test_global_variable(mc_binary_info, "test_some_array", &test_some_array, sizeof(test_some_array));
type = xbt_dict_get_or_null(mc_binary_info->types, var->type_origin);
for (i = 0; i < count; i++)
values[i] = (0 == rank) ? 17 : 3;
- status = MPI_Bcast(values, count, MPI_INT, 0, MPI_COMM_WORLD);
+ MPI_Bcast(values, count, MPI_INT, 0, MPI_COMM_WORLD);
int good = 0;
for (i = 0; i < count; i++)
}
/* Can we communicate with this new communicator? */
- dest = MPI_PROC_NULL;
if (rank == 0) {
dest = size - 1;
a = rank;
MPI_Barrier(comm);
/* Can we communicate with this new communicator? */
- dest = MPI_PROC_NULL;
if (rank == 0) {
dest = size - 1;
a = rank;
else {
/* Check that the group was created (and that any errors were
caught) */
- rc = MPI_Group_size( group_array[i], &group_size );
+ MPI_Group_size( group_array[i], &group_size );
if (group_size != size) {
fprintf( stderr, "Group number %d not correct (size = %d)\n",
i, size );
int i;
int count, size;
int self, npes;
- double secs;
MPI_Request request[MAXPES];
MPI_Status status;
}
for (size = 1; size <= MYBUFSIZE ; size += size) {
- secs = -MPI_Wtime ();
for (count = 0; count < NUM_RUNS; count++) {
MPI_Barrier (MPI_COMM_WORLD);
}
MPI_Barrier (MPI_COMM_WORLD);
- secs += MPI_Wtime ();
if (self == 0) {
- secs = secs / (double) NUM_RUNS;
MTestPrintfMsg( 1, "length = %d ints\n", size );
}
}
printf("MPI initialization failed!\n");
exit(1);
}
- err = MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
- err = MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
+ MPI_Comm_size(MPI_COMM_WORLD, &size); /* Get nr of tasks */
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank); /* Get id of this process */
if (size < 2) {
printf("run this program with exactly 2 processes (-np 2)\n");
MPI_Finalize();
int dst = rank + 1;
printf("[%d] About to send 1st message '%d' to process [%d]\n",
rank, msg, dst);
- err = MPI_Send(&msg, 1, MPI_INT, dst, tag1, MPI_COMM_WORLD);
+ MPI_Send(&msg, 1, MPI_INT, dst, tag1, MPI_COMM_WORLD);
- err = MPI_Recv(&msg, 1, MPI_INT, dst, tag2, MPI_COMM_WORLD, &status); /* Receive a message */
+ MPI_Recv(&msg, 1, MPI_INT, dst, tag2, MPI_COMM_WORLD, &status); /* Receive a message */
printf("[%d] Received reply message '%d' from process [%d]\n", rank,
msg, dst);
}
if ((pivot + 1) == rank) {
int src = rank - 1;
- err = MPI_Recv(&msg, 1, MPI_INT, src, tag1, MPI_COMM_WORLD, &status); /* Receive a message */
+ MPI_Recv(&msg, 1, MPI_INT, src, tag1, MPI_COMM_WORLD, &status); /* Receive a message */
printf("[%d] Received 1st message '%d' from process [%d]\n", rank,
msg, src);
msg++;
printf("[%d] increment message's value to '%d'\n", rank, msg);
printf("[%d] About to send back message '%d' to process [%d]\n",
rank, msg, src);
- err = MPI_Send(&msg, 1, MPI_INT, src, tag2, MPI_COMM_WORLD);
+ MPI_Send(&msg, 1, MPI_INT, src, tag2, MPI_COMM_WORLD);
}
}
- err = MPI_Finalize(); /* Terminate MPI */
+ MPI_Finalize(); /* Terminate MPI */
return 0;
}