Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill all trailling whitespaces
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 13 Jun 2017 20:15:05 +0000 (22:15 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 13 Jun 2017 20:17:16 +0000 (22:17 +0200)
This commit could have been called "VI VI VI, the editor of the beast"
:)

315 files changed:
examples/msg/app-chainsend/broadcaster.h
examples/msg/app-chainsend/chainsend.c
examples/msg/app-chainsend/iterator.c
examples/msg/app-chainsend/peer.c
examples/msg/async-wait/async-wait.c
examples/msg/async-waitall/async-waitall.c
examples/msg/async-waitany/async-waitany.c
examples/msg/cloud-simple/cloud-simple.c
examples/msg/dht-chord/dht-chord.c
examples/msg/dht-pastry/dht-pastry.c
examples/msg/maestro-set/maestro-set.cpp
examples/msg/mc/bugged1_liveness.c
examples/msg/mc/bugged1_liveness.h
examples/msg/mc/bugged2_liveness.c
examples/msg/mc/bugged2_liveness.h
examples/msg/mc/electric_fence.c
examples/msg/platform-properties/platform-properties.c
examples/msg/synchro-semaphore/synchro-semaphore.c
examples/simdag/availability/sd_availability.c
examples/simdag/dag-dotload/sd_dag-dotload.c
examples/simdag/daxload/sd_daxload.c
examples/simdag/goal/goal_test.c
examples/smpi/NAS/DGraph.c
examples/smpi/NAS/dt.c
examples/smpi/NAS/ep.c
examples/smpi/NAS/is.c
examples/smpi/smpi_msg_masterslave/masterslave_mailbox_smpi.c
include/simgrid/s4u/Actor.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Mailbox.hpp
include/simgrid/simdag.h
include/smpi/smpi.h
include/xbt/automaton.h
include/xbt/base.h
include/xbt/cunit.h
include/xbt/dynar.h
include/xbt/exception.hpp
include/xbt/log.h
include/xbt/mallocator.h
include/xbt/parmap.h
include/xbt/swag.h
include/xbt/xbt_os_thread.h
include/xbt/xbt_os_time.h
src/bindings/java/jmsg_host.cpp
src/bindings/java/jtrace.cpp
src/bindings/lua/lua_debug.cpp
src/bindings/lua/simgrid_lua.cpp
src/include/mc/mc.h
src/include/surf/maxmin.h
src/instr/instr_paje_trace.cpp
src/instr/instr_paje_types.cpp
src/instr/instr_private.h
src/kernel/context/ContextRaw.cpp
src/mc/ObjectInformation.cpp
src/mc/ObjectInformation.hpp
src/mc/PageStore.cpp
src/mc/Process.hpp
src/mc/RegionSnapshot.cpp
src/mc/RegionSnapshot.hpp
src/mc/checker/SafetyChecker.cpp
src/mc/mc_checkpoint.cpp
src/msg/instr_msg_task.cpp
src/msg/msg_deployment.cpp
src/msg/msg_environment.cpp
src/msg/msg_gos.cpp
src/msg/msg_host.cpp
src/s4u/s4u_comm.cpp
src/s4u/s4u_conditionVariable.cpp
src/s4u/s4u_host.cpp
src/simdag/dax_dtd.c
src/simdag/dax_dtd.h
src/simdag/sd_daxloader.cpp
src/simdag/sd_dotloader.cpp
src/simdag/sd_task.cpp
src/simgrid/sg_config.cpp
src/simix/popping_bodies.cpp
src/simix/popping_generated.cpp
src/simix/smx_context.cpp
src/simix/smx_global.cpp
src/simix/smx_network.cpp
src/simix/smx_synchro.cpp
src/smpi/colls/allgather/allgather-2dmesh.cpp
src/smpi/colls/allgather/allgather-3dmesh.cpp
src/smpi/colls/allgather/allgather-NTSLR-NB.cpp
src/smpi/colls/allgather/allgather-NTSLR.cpp
src/smpi/colls/allgather/allgather-SMP-NTS.cpp
src/smpi/colls/allgather/allgather-bruck.cpp
src/smpi/colls/allgather/allgather-mvapich-smp.cpp
src/smpi/colls/allgather/allgather-ompi-neighborexchange.cpp
src/smpi/colls/allgather/allgather-rdb.cpp
src/smpi/colls/allgather/allgather-rhv.cpp
src/smpi/colls/allgather/allgather-smp-simple.cpp
src/smpi/colls/allgatherv/allgatherv-ompi-bruck.cpp
src/smpi/colls/allgatherv/allgatherv-ompi-neighborexchange.cpp
src/smpi/colls/allgatherv/allgatherv-ring.cpp
src/smpi/colls/allreduce/allreduce-lr.cpp
src/smpi/colls/allreduce/allreduce-mvapich-two-level.cpp
src/smpi/colls/allreduce/allreduce-ompi-ring-segmented.cpp
src/smpi/colls/allreduce/allreduce-rab-rdb.cpp
src/smpi/colls/allreduce/allreduce-rab1.cpp
src/smpi/colls/allreduce/allreduce-rdb.cpp
src/smpi/colls/allreduce/allreduce-smp-binomial-pipeline.cpp
src/smpi/colls/allreduce/allreduce-smp-binomial.cpp
src/smpi/colls/allreduce/allreduce-smp-rdb.cpp
src/smpi/colls/allreduce/allreduce-smp-rsag-rab.cpp
src/smpi/colls/alltoall/alltoall-2dmesh.cpp
src/smpi/colls/alltoall/alltoall-basic-linear.cpp
src/smpi/colls/alltoall/alltoall-mvapich-scatter-dest.cpp
src/smpi/colls/alltoall/alltoall-rdb.cpp
src/smpi/colls/alltoallv/alltoallv-ompi-basic-linear.cpp
src/smpi/colls/alltoallv/alltoallv-ring.cpp
src/smpi/colls/barrier/barrier-mvapich2-pair.cpp
src/smpi/colls/barrier/barrier-ompi.cpp
src/smpi/colls/bcast/bcast-NTSB.cpp
src/smpi/colls/bcast/bcast-NTSL-Isend.cpp
src/smpi/colls/bcast/bcast-NTSL.cpp
src/smpi/colls/bcast/bcast-SMP-binary.cpp
src/smpi/colls/bcast/bcast-SMP-linear.cpp
src/smpi/colls/bcast/bcast-arrival-pattern-aware-wait.cpp
src/smpi/colls/bcast/bcast-arrival-pattern-aware.cpp
src/smpi/colls/bcast/bcast-arrival-scatter.cpp
src/smpi/colls/bcast/bcast-flattree-pipeline.cpp
src/smpi/colls/bcast/bcast-mvapich-smp.cpp
src/smpi/colls/bcast/bcast-ompi-pipeline.cpp
src/smpi/colls/bcast/bcast-ompi-split-bintree.cpp
src/smpi/colls/bcast/bcast-scatter-LR-allgather.cpp
src/smpi/colls/bcast/bcast-scatter-rdb-allgather.cpp
src/smpi/colls/coll_tuned_topo.cpp
src/smpi/colls/coll_tuned_topo.h
src/smpi/colls/gather/gather-mvapich.cpp
src/smpi/colls/gather/gather-ompi.cpp
src/smpi/colls/reduce/reduce-NTSL.cpp
src/smpi/colls/reduce/reduce-arrival-pattern-aware.cpp
src/smpi/colls/reduce/reduce-binomial.cpp
src/smpi/colls/reduce/reduce-mvapich-knomial.cpp
src/smpi/colls/reduce/reduce-mvapich-two-level.cpp
src/smpi/colls/reduce/reduce-ompi.cpp
src/smpi/colls/reduce/reduce-scatter-gather.cpp
src/smpi/colls/reduce_scatter/reduce_scatter-mpich.cpp
src/smpi/colls/reduce_scatter/reduce_scatter-ompi.cpp
src/smpi/colls/scatter/scatter-mvapich-two-level.cpp
src/smpi/colls/scatter/scatter-ompi.cpp
src/smpi/colls/smpi_default_selector.cpp
src/smpi/colls/smpi_intel_mpi_selector.cpp
src/smpi/colls/smpi_mpich_selector.cpp
src/smpi/colls/smpi_mvapich2_selector.cpp
src/smpi/colls/smpi_mvapich2_selector_stampede.h
src/smpi/colls/smpi_openmpi_selector.cpp
src/smpi/instr_smpi.cpp
src/smpi/private.h
src/smpi/private.hpp
src/smpi/smpi_bench.cpp
src/smpi/smpi_coll.cpp
src/smpi/smpi_comm.cpp
src/smpi/smpi_comm.hpp
src/smpi/smpi_datatype.cpp
src/smpi/smpi_datatype.hpp
src/smpi/smpi_datatype_derived.cpp
src/smpi/smpi_datatype_derived.hpp
src/smpi/smpi_f2c.hpp
src/smpi/smpi_f77.cpp
src/smpi/smpi_global.cpp
src/smpi/smpi_keyvals.cpp
src/smpi/smpi_keyvals.hpp
src/smpi/smpi_mpi.cpp
src/smpi/smpi_pmpi.cpp
src/smpi/smpi_replay.cpp
src/smpi/smpi_request.cpp
src/smpi/smpi_win.cpp
src/smpi/smpi_win.hpp
src/surf/fair_bottleneck.cpp
src/surf/lagrange.cpp
src/surf/maxmin.cpp
src/surf/maxmin_private.hpp
src/surf/ptask_L07.cpp
src/surf/sg_platf.cpp
src/surf/xml/simgrid_dtd.c
src/surf/xml/simgrid_dtd.h
src/xbt/automaton/automaton.c
src/xbt/automaton/automaton_lexer.yy.c
src/xbt/automaton/automatonparse_promela.c
src/xbt/dynar.cpp
src/xbt/log.c
src/xbt/mmalloc/mm_module.c
src/xbt/mmalloc/mmprivate.h
src/xbt/parmap.cpp
src/xbt/xbt_log_appender_file.c
src/xbt/xbt_main.cpp
src/xbt/xbt_os_thread.c
teshsuite/simdag/basic-link-test/basic-link-test.c
teshsuite/simdag/comm-mxn-all2all/comm-mxn-all2all.c
teshsuite/simdag/comm-mxn-independent/comm-mxn-independent.c
teshsuite/simdag/comm-mxn-scatter/comm-mxn-scatter.c
teshsuite/simdag/comm-p2p-latency-1/comm-p2p-latency-1.c
teshsuite/simdag/comm-p2p-latency-2/comm-p2p-latency-2.c
teshsuite/simdag/comm-p2p-latency-3/comm-p2p-latency-3.c
teshsuite/simdag/comm-p2p-latency-bound/comm-p2p-latency-bound.c
teshsuite/smpi/bug-17132/bug-17132.c
teshsuite/smpi/coll-allgather/coll-allgather.c
teshsuite/smpi/coll-allgatherv/coll-allgatherv.c
teshsuite/smpi/coll-allreduce/coll-allreduce.c
teshsuite/smpi/coll-alltoall/coll-alltoall.c
teshsuite/smpi/coll-alltoallv/coll-alltoallv.c
teshsuite/smpi/coll-bcast/coll-bcast.c
teshsuite/smpi/coll-gather/coll-gather.c
teshsuite/smpi/coll-reduce-scatter/coll-reduce-scatter.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock10.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock10_mod.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock11.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock2.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock3.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock4.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock4_mod.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock5.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock5_mod.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock6.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock6_mod.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock7.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock8.c
teshsuite/smpi/isp/umpire/any_src-can-deadlock9.c
teshsuite/smpi/isp/umpire/any_src-deadlock.c
teshsuite/smpi/isp/umpire/any_src-wait-deadlock.c
teshsuite/smpi/isp/umpire/any_src-wait-deadlock2.c
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock.c
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock2.c
teshsuite/smpi/isp/umpire/any_src-waitall-deadlock3.c
teshsuite/smpi/isp/umpire/any_src-waitany-deadlock.c
teshsuite/smpi/isp/umpire/any_src-waitany-deadlock2.c
teshsuite/smpi/isp/umpire/basic-deadlock-comm_dup.c
teshsuite/smpi/isp/umpire/basic-deadlock-comm_split.c
teshsuite/smpi/isp/umpire/basic-deadlock-graph_create.c
teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_create.c
teshsuite/smpi/isp/umpire/basic-deadlock-intercomm_merge.c
teshsuite/smpi/isp/umpire/change-send-buffer-exhaustive.c
teshsuite/smpi/isp/umpire/change-send-buffer-type-exhaustive.c
teshsuite/smpi/isp/umpire/collective-exhaustive-byte-int-mismatch.c
teshsuite/smpi/isp/umpire/collective-exhaustive-no-error.c
teshsuite/smpi/isp/umpire/errhandler-no-error.c
teshsuite/smpi/isp/umpire/errhandler-no-free.c
teshsuite/smpi/isp/umpire/group-no-error-exhaustive.c
teshsuite/smpi/isp/umpire/group-no-free-exhaustive.c
teshsuite/smpi/isp/umpire/hello.c
teshsuite/smpi/isp/umpire/intercomm_create-deadlock.c
teshsuite/smpi/isp/umpire/intercomm_create-deadlock2.c
teshsuite/smpi/isp/umpire/intercomm_create-deadlock3.c
teshsuite/smpi/isp/umpire/intercomm_create-deadlock4.c
teshsuite/smpi/isp/umpire/intercomm_create-no-error.c
teshsuite/smpi/isp/umpire/intercomm_merge-deadlock.c
teshsuite/smpi/isp/umpire/irecv-isend-ok2.c
teshsuite/smpi/isp/umpire/lost-request2.c
teshsuite/smpi/isp/umpire/lost-request3.c
teshsuite/smpi/isp/umpire/no-error-any_src.c
teshsuite/smpi/isp/umpire/no-error-derived-comms.c
teshsuite/smpi/isp/umpire/no-error-interleaved-isend.c
teshsuite/smpi/isp/umpire/no-error-persistent-all-completions.c
teshsuite/smpi/isp/umpire/no-error-persistent-test.c
teshsuite/smpi/isp/umpire/no-error-persistent-testpartial.c
teshsuite/smpi/isp/umpire/no-error-persistent-waitpartial.c
teshsuite/smpi/isp/umpire/no-error-persistent.c
teshsuite/smpi/isp/umpire/no-error-probe-any_src.c
teshsuite/smpi/isp/umpire/no-error-probe-any_tag.c
teshsuite/smpi/isp/umpire/no-error-probe.c
teshsuite/smpi/isp/umpire/no-error-testall.c
teshsuite/smpi/isp/umpire/no-error-vector-isend.c
teshsuite/smpi/isp/umpire/no-error-wait-any_src.c
teshsuite/smpi/isp/umpire/no-error-wait-any_src2.c
teshsuite/smpi/isp/umpire/no-error-wait-any_src3.c
teshsuite/smpi/isp/umpire/no-error-wait-any_src4.c
teshsuite/smpi/isp/umpire/no-error-waitall-any_src.c
teshsuite/smpi/isp/umpire/no-error-waitall-any_src2.c
teshsuite/smpi/isp/umpire/no-error-waitall-any_src3.c
teshsuite/smpi/isp/umpire/no-error-waitany-any_src.c
teshsuite/smpi/isp/umpire/no-error-waitany-any_src2.c
teshsuite/smpi/isp/umpire/no-error-waitany-any_src3.c
teshsuite/smpi/isp/umpire/no-error3-any_src.c
teshsuite/smpi/isp/umpire/no-error3.c
teshsuite/smpi/isp/umpire/no-error4-any_src.c
teshsuite/smpi/isp/umpire/op-no-error.c
teshsuite/smpi/isp/umpire/op-no-free.c
teshsuite/smpi/isp/umpire/partial-recv-exhaustive.c
teshsuite/smpi/isp/umpire/partial-recv-persistent.c
teshsuite/smpi/isp/umpire/partial-recv-persistent2.c
teshsuite/smpi/isp/umpire/partial-recv-persistent3.c
teshsuite/smpi/isp/umpire/partial-recv-persistent4.c
teshsuite/smpi/isp/umpire/partial-recv.c
teshsuite/smpi/isp/umpire/probe-any_src-types-can-mismatch.c
teshsuite/smpi/isp/umpire/probe-any_tag-types-can-mismatch.c
teshsuite/smpi/isp/umpire/probe-deadlock.c
teshsuite/smpi/isp/umpire/pt2pt-byte-int-mismatch.c
teshsuite/smpi/isp/umpire/remote_group-no-error.c
teshsuite/smpi/isp/umpire/type-commit-twice.c
teshsuite/smpi/isp/umpire/type-no-error-exhaustive-with-isends.c
teshsuite/smpi/isp/umpire/type-no-error-exhaustive.c
teshsuite/smpi/isp/umpire/type-no-free-exhaustive.c
teshsuite/smpi/isp/umpire/type-no-free3.c
teshsuite/smpi/macro-shared/macro-shared.c
teshsuite/smpi/mpich3-test/coll/allgatherv4_manual.c
teshsuite/smpi/mpich3-test/datatype/typename.c
teshsuite/smpi/mpich3-test/f77/attr/attraints.h
teshsuite/smpi/mpich3-test/f77/ext/add1size.h
teshsuite/smpi/mpich3-test/f77/ext/c2f2c.c
teshsuite/smpi/mpich3-test/f77/ext/c2fmult.c
teshsuite/smpi/mpich3-test/f77/ext/ctypesfromc.c
teshsuite/smpi/mpich3-test/f77/pt2pt/attr1aints.h
teshsuite/smpi/mpich3-test/f77/rma/addsize.h
teshsuite/smpi/mpich3-test/f77/rma/c2f2cwin.c
teshsuite/smpi/mpich3-test/f90/rma/c2f902cwin.c
teshsuite/smpi/mpich3-test/include/mpitestconf.h
teshsuite/smpi/type-struct/type-struct.c
teshsuite/surf/lmm_usage/lmm_usage.cpp
teshsuite/surf/maxmin_bench/maxmin_bench.cpp
tools/cmake/test_prog/prog_sem_init.c
tools/cmake/test_prog/prog_sem_open.c
tools/cmake/test_prog/prog_stackgrowth.c

index d4413d4..116f44f 100644 (file)
@@ -32,7 +32,7 @@ typedef struct s_broadcaster {
 
 typedef s_broadcaster_t *broadcaster_t;
 
-xbt_dynar_t build_hostlist_from_hostcount(int hostcount); 
+xbt_dynar_t build_hostlist_from_hostcount(int hostcount);
 
 /* Broadcaster: helper functions */
 broadcaster_t broadcaster_init(xbt_dynar_t host_list, unsigned int piece_count);
index 771e521..292abe8 100644 (file)
@@ -11,7 +11,7 @@
 #include "peer.h"
 
 /** @addtogroup MSG_examples
- * 
+ *
  *  - <b>chainsend: MSG implementation of a file broadcasting system, similar to Kastafior (from Kadeploy).</b>.
  */
 
index a6f7e44..1bba4d5 100644 (file)
@@ -13,7 +13,7 @@
 xbt_dynar_iterator_t xbt_dynar_iterator_new(xbt_dynar_t list, xbt_dynar_t (*criteria_fn)(int))
 {
   xbt_dynar_iterator_t it = xbt_new(xbt_dynar_iterator_s, 1);
-  
+
   it->list = list;
   it->length = xbt_dynar_length(list);
   it->indices_list = criteria_fn(it->length); // Creates and fills a dynar of int
index 63fa465..f19df05 100644 (file)
@@ -28,7 +28,7 @@ int peer_execute_task(peer_t peer, msg_task_t task)
 {
   int done = 0;
   message_t msg = MSG_task_get_data(task);
-  
+
   XBT_DEBUG("Peer %s got message of type %d\n", peer->me, msg->type);
   if (msg->type == MESSAGE_BUILD_CHAIN)
     peer_init_chain(peer, msg);
@@ -130,7 +130,7 @@ void peer_delete(peer_t p)
 
 void peer_print_stats(peer_t p, float elapsed_time)
 {
-  XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", elapsed_time, p->bytes, p->bytes / 1024.0 / 1024.0 / elapsed_time); 
+  XBT_INFO("### %f %llu bytes (Avg %f MB/s); copy finished (simulated).", elapsed_time, p->bytes, p->bytes / 1024.0 / 1024.0 / elapsed_time);
 }
 
 /** Peer function  */
index 286526c..e13a66a 100644 (file)
@@ -10,7 +10,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_async_wait, "Messages specific for this msg exa
 /* Main function of the Sender process */
 static int sender(int argc, char *argv[])
 {
-  xbt_assert(argc==7, "The sender function expects 6 arguments from the XML deployment file"); 
+  xbt_assert(argc==7, "The sender function expects 6 arguments from the XML deployment file");
   long number_of_tasks = xbt_str_parse_int(argv[1], "Invalid amount of tasks: %s");        /* - number of tasks */
   double task_comp_size = xbt_str_parse_double(argv[2], "Invalid computational size: %s"); /* - computational cost */
   double task_comm_size = xbt_str_parse_double(argv[3], "Invalid communication size: %s"); /* - communication cost */
index 3bbfe40..c828b13 100644 (file)
@@ -50,7 +50,7 @@ static int receiver(int argc, char *argv[])
 
   char mailbox[80];
   snprintf(mailbox,79, "receiver-%d", id);
-   
+
   MSG_process_sleep(10);
   while (1) {
     XBT_INFO("Wait to receive a task");
index 01ebfc0..95b92aa 100644 (file)
@@ -30,7 +30,7 @@ static int sender(int argc, char *argv[])
     xbt_dynar_push_as(comms, msg_comm_t, comm);
     XBT_INFO("Send to receiver-%ld %s comm_size %f", i % receivers_count, taskname, task_comm_size / coef);
   }
-   
+
   /* Here we are waiting for the completion of all communications */
   while (xbt_dynar_is_empty(comms) == 0) {
     msg_comm_t comm;
@@ -63,7 +63,7 @@ static int receiver(int argc, char *argv[])
 
   char mailbox[80];
   snprintf(mailbox,79, "receiver-%d", id);
-   
+
   MSG_process_sleep(10);
   for (int i = 0; i < task_amount; i++) {
     XBT_INFO("Wait to receive task %d", i);
index 7c633ad..74d1314 100644 (file)
@@ -86,7 +86,7 @@ static void launch_communication_worker(msg_host_t tx_host, msg_host_t rx_host)
 {
   char *mbox = bprintf("MBOX:%s-%s", MSG_host_get_name(tx_host), MSG_host_get_name(rx_host));
   char **argv = NULL;
-  
+
   const char *pr_name_tx =  "comm_tx";
   argv = xbt_new(char *, 3);
   argv[0] = xbt_strdup(pr_name_tx);
@@ -95,7 +95,7 @@ static void launch_communication_worker(msg_host_t tx_host, msg_host_t rx_host)
 
   MSG_process_create_with_arguments(pr_name_tx, communication_tx_fun, NULL, tx_host, 2, argv);
 
-  const char *pr_name_rx =  "comm_rx";  
+  const char *pr_name_rx =  "comm_rx";
   argv = xbt_new(char *, 3);
   argv[0] = xbt_strdup(pr_name_rx);
   argv[1] = xbt_strdup(mbox);
index 66faa97..88096d2 100644 (file)
@@ -134,7 +134,7 @@ static void print_finger_table(node_t node)
 }
 
 /* Sets a finger of the current node.
- * 
+ *
  * \param node the current node
  * \param finger_index index of the finger to set (0 to nb_bits - 1)
  * \param id the id to set for this finger
@@ -150,7 +150,7 @@ static void set_finger(node_t node, int finger_index, int id)
 }
 
 /* Sets the predecessor of the current node.
- * 
+ *
  * \param node the current node
  * \param id the id to predecessor, or -1 to unset the predecessor
  */
@@ -169,14 +169,14 @@ static void set_predecessor(node_t node, int predecessor_id)
 }
 
 /* Node main Function
- * 
+ *
  * Arguments:
  * - my id
  * - the id of a guy I know in the system (except for the first node)
  * - the time to sleep before I join (except for the first node)
  */
 /* This function is called when the current node receives a task.
- * 
+ *
  * \param node the current node
  * \param task the task to handle (don't touch it afterward: it will be destroyed, reused or forwarded)
  */
@@ -276,7 +276,7 @@ void create(node_t node)
 }
 
 /* Makes the current node join the ring, knowing the id of a node already in the ring
- * 
+ *
  * \param node the current node
  * \param known_id id of a node already in the ring
  * \return 1 if the join operation succeeded, 0 otherwise
@@ -340,7 +340,7 @@ void quit_notify(node_t node)
 }
 
 /* Makes the current node find the successor node of an id.
- * 
+ *
  * \param node the current node
  * \param id the id to find
  * \return the id of the successor node, or -1 if the request failed
@@ -358,7 +358,7 @@ int find_successor(node_t node, int id)
 }
 
 /* \brief Asks another node the successor node of an id.
- * 
+ *
  * \param node the current node
  * \param ask_to the node to ask to
  * \param id the id to find
@@ -447,7 +447,7 @@ int remote_find_successor(node_t node, int ask_to, int id)
 }
 
 /* Asks its predecessor to a remote node
- * 
+ *
  * \param node the current node
  * \param ask_to the node to ask to
  * \return the id of its predecessor node, or -1 if the request failed
@@ -526,7 +526,7 @@ int remote_get_predecessor(node_t node, int ask_to)
 }
 
 /* Returns the closest preceding finger of an id with respect to the finger table of the current node.
- * 
+ *
  * \param node the current node
  * \param id the id to find
  * \return the closest preceding finger of that id
index b9cac1e..517797e 100644 (file)
@@ -245,13 +245,13 @@ static void handle_task(node_t node, msg_task_t task) {
     /* Try to join the ring */
     case TASK_JOIN:
       next = routing_next(node, task_data->answer_id);
-      XBT_DEBUG("Join request from %08x forwarding to %08x", task_data->answer_id, next);      
+      XBT_DEBUG("Join request from %08x forwarding to %08x", task_data->answer_id, next);
       type = TASK_JOIN_LAST_REPLY;
 
       req_data = xbt_new0(s_task_data_t,1);
       req_data->answer_id = task_data->sender_id;
       req_data->steps = task_data->steps + 1;
-      
+
       // if next different from current node forward the join
       if (next!=node->id) {
         get_mailbox(next, mailbox);
@@ -263,8 +263,8 @@ static void handle_task(node_t node, msg_task_t task) {
           task_free(task_sent);
         }
         type = TASK_JOIN_REPLY;
-      } 
-      
+      }
+
       // send back the current node state to the joining node
       req_data->type = type;
       req_data->sender_id = node->id;
@@ -351,7 +351,7 @@ static void handle_task(node_t node, msg_task_t task) {
       print_node_namespace_set(node);
       int curr_namespace_set[NAMESPACE_SIZE];
       int task_namespace_set[NAMESPACE_SIZE+1];
-      
+
       // Copy the current namespace and the task state namespace with state->id in the middle
       i=0;
       for (; i<NAMESPACE_SIZE/2; i++){
@@ -360,7 +360,7 @@ static void handle_task(node_t node, msg_task_t task) {
       }
       task_namespace_set[i] = task_data->state->id;
       for (; i<NAMESPACE_SIZE; i++){
-        curr_namespace_set[i] = node->namespace_set[i];  
+        curr_namespace_set[i] = node->namespace_set[i];
         task_namespace_set[i+1] = task_data->state->namespace_set[i];
       }
 
@@ -465,8 +465,8 @@ static int join(node_t node){
 static int node(int argc, char *argv[])
 {
   double init_time = MSG_get_clock();
-  msg_task_t task_received = NULL;  
-  int join_success = 0;  
+  msg_task_t task_received = NULL;
+  int join_success = 0;
   double deadline;
   xbt_assert(argc == 3 || argc == 5, "Wrong number of arguments for this node");
   s_node_t node = {0};
@@ -556,9 +556,9 @@ static int node(int argc, char *argv[])
 int main(int argc, char *argv[])
 {
   MSG_init(&argc, argv);
-  xbt_assert(argc > 2, 
+  xbt_assert(argc > 2,
        "Usage: %s [-nb_bits=n] [-timeout=t] platform_file deployment_file\n"
-       "\tExample: %s ../msg_platform.xml pastry10.xml\n", 
+       "\tExample: %s ../msg_platform.xml pastry10.xml\n",
        argv[0], argv[0]);
 
   char **options = &argv[1];
index c1ab4d2..3b37c1c 100644 (file)
@@ -5,10 +5,10 @@
 
 /** @addtogroup MSG_examples
  *
- *  - <b>maestro-set/maestro-set.cpp: Switch the system thread hosting our maestro</b>. 
+ *  - <b>maestro-set/maestro-set.cpp: Switch the system thread hosting our maestro</b>.
  *    That's a very advanced example in which we move the maestro thread to another process.
  *    Not many users need it (maybe only one, actually), but this example is also a regression test.
- * 
+ *
  *    This example is in C++ because we use C++11 threads to ensure that the feature is working as
  *    expected. You can still use that feature from a C code.
  */
index 47107f0..05da543 100644 (file)
@@ -21,7 +21,7 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(bugged1_liveness, "my log messages");
 
-int r=0; 
+int r=0;
 int cs=0;
 
 #ifdef GARBAGE_STACK
@@ -43,15 +43,15 @@ static int coordinator(int argc, char *argv[])
   xbt_dynar_t requests = xbt_dynar_new(sizeof(char *), NULL);
   char *req;
 
-  while(1){  
+  while(1){
     MSG_task_receive(&task, "coordinator");
-    const char *kind = MSG_task_get_name(task); 
-    if (!strcmp(kind, "request")) {    
+    const char *kind = MSG_task_get_name(task);
+    if (!strcmp(kind, "request")) {
       req = MSG_task_get_data(task);
-      if (CS_used) {           
+      if (CS_used) {
         XBT_INFO("CS already used. Queue the request.");
         xbt_dynar_push(requests, &req);
-      } else {               
+      } else {
         if(strcmp(req, "1") != 0){
           XBT_INFO("CS idle. Grant immediatly");
           answer = MSG_task_create("grant", 0, 1000, NULL);
@@ -130,7 +130,7 @@ static int client(int argc, char *argv[])
       r=0;
       XBT_INFO("Propositions changed : r=0, cs=0");
     }
-    
+
   }
   return 0;
 }
index c24c967..eaf06f4 100644 (file)
@@ -10,4 +10,4 @@
 int predR(void);
 int predCS(void);
 
-#endif 
+#endif
index 2310f28..67e91ac 100644 (file)
@@ -28,7 +28,7 @@ static int coordinator(int argc, char *argv[])
     const char *kind = MSG_task_get_name(task); //is it a request or a release?
     if (!strcmp(kind, "request")) {     // that's a request
       char *req = MSG_task_get_data(task);
-      if (CS_used) { 
+      if (CS_used) {
         XBT_INFO("CS already used.");
         msg_task_t answer = MSG_task_create("not grant", 0, 1000, NULL);
         MSG_task_send(answer, req);
index b8b2c53..7729c38 100644 (file)
@@ -5,7 +5,7 @@
 
 /******************** Non-deterministic message ordering  *********************/
 /* This example implements one process which receives messages from two other */
-/* processes. There is no bug on it, it is just provided to test the soundness*/ 
+/* processes. There is no bug on it, it is just provided to test the soundness*/
 /* of the state space reduction with DPOR, if the maximum depth (defined with */
 /* --cfg=model-check/max_depth:) is reached.                                  */
 /******************************************************************************/
index 9e1de6d..a7b4d59 100644 (file)
@@ -7,7 +7,7 @@
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Property test");
 
-static void test_host(const char*hostname) 
+static void test_host(const char*hostname)
 {
   msg_host_t thehost = MSG_host_by_name(hostname);
   xbt_dict_t props = MSG_host_get_properties(thehost);
index aa8d556..d91e546 100644 (file)
@@ -11,7 +11,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_semaphore_example, "Messages specific for this
 msg_sem_t sem;
 
 static int peer(int argc, char* argv[]){
-  int i = 0; 
+  int i = 0;
   while(i < argc) {
     double wait_time = xbt_str_parse_double(argv[i],"Invalid wait time: %s");
     i++;
index 1d9c75c..a0b20a0 100644 (file)
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
              sg_host_route_latency(hosts[0], hosts[1]));
     XBT_INFO("Jupiter: speed=%.0f", sg_host_speed(hosts[0])* sg_host_get_available_speed(hosts[0]));
     XBT_INFO("Tremblay: speed=%.0f", sg_host_speed(hosts[1])* sg_host_get_available_speed(hosts[1]));
-     
+
     unsigned int ctr;
     SD_task_t task;
     xbt_dynar_foreach(changed_tasks, ctr, task) {
index 6baccb0..176bd08 100644 (file)
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
   char *tracefilename;
   char *last = strrchr(argv[2], '.');
   tracefilename = bprintf("%.*s.trace", (int) (last == NULL ? strlen(argv[2]) : last - argv[2]),argv[2]);
-  if (argc == 4) 
+  if (argc == 4)
     tracefilename = xbt_strdup(argv[3]);
 
   /* Display all the tasks */
index e3af541..ef3d029 100644 (file)
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
   if (!dax){
     XBT_ERROR("A problem occurred during DAX parsing (cycle or syntax). Do not continue this test");
     free(tracefilename);
-  
+
     exit(255);
   }
 
index 6dfc394..b5d73b4 100644 (file)
@@ -1,6 +1,6 @@
-/* Example of scatter communication, accepting a large amount of processes. 
+/* Example of scatter communication, accepting a large amount of processes.
  * This based the experiment of Fig. 4 in http://hal.inria.fr/hal-00650233/
- * That experiment is a comparison to the LogOPSim simulator, that takes 
+ * That experiment is a comparison to the LogOPSim simulator, that takes
  * GOAL files as an input, thus the file name. But there is no actual link
  * to the GOAL formalism beside of this.
  */
index 530bf3e..ad4f682 100644 (file)
@@ -37,7 +37,7 @@ void nodeShow(DGNode* nd){
 /*
   if(nd->verified==1) fprintf(stderr,"%ld.%s\t: usable.",nd->id,nd->name);
   else if(nd->verified==0)  fprintf(stderr,"%ld.%s\t: unusable.",nd->id,nd->name);
-  else  fprintf(stderr,"%ld.%s\t: notverified.",nd->id,nd->name);   
+  else  fprintf(stderr,"%ld.%s\t: notverified.",nd->id,nd->name);
 */
 }
 
@@ -83,7 +83,7 @@ int AttachNode(DGraph* dg, DGNode* nd) {
       }
       memcpy( &(tmpnd->inArc[ tmpnd->inDegree]), nd->inArc, nd->inDegree*sizeof( DGArc *));
       tmpnd->inDegree += nd->inDegree;
-    }   
+    }
     if ( nd->outDegree > 0 ) {
       tmpnd->maxOutDegree += nd->maxOutDegree;
       ar =(DGArc **) calloc(tmpnd->maxOutDegree,sizeof(DGArc*));
@@ -96,7 +96,7 @@ int AttachNode(DGraph* dg, DGNode* nd) {
       memcpy( &(tmpnd->outArc[tmpnd->outDegree]),nd->outArc,nd->outDegree*sizeof( DGArc *));
       tmpnd->outDegree += nd->outDegree;
     }
-    free(nd); 
+    free(nd);
     return i;
   }
   nd->id = dg->numNodes;
index 55b29dd..7dacc29 100644 (file)
@@ -1,10 +1,10 @@
 /*************************************************************************
- *                                                                       * 
+ *                                                                       *
  *    N  A  S   P A R A L L E L   B E N C H M A R K S  3.3     *
  *                                     *
  *                  D T       *
  *                                     *
- ************************************************************************* 
+ *************************************************************************
  *                                     *
  *   This benchmark is part of the NAS Parallel Benchmark 3.3 suite.   *
  *                                     *
@@ -31,7 +31,7 @@
  *     E-mail:  npb@nas.nasa.gov                   *
  *     Fax:   (650) 604-3957                     *
  *                                     *
- ************************************************************************* 
+ *************************************************************************
  *                                     *
  *   Author: M. Frumkin         *       *
  *                                     *
@@ -263,7 +263,7 @@ static DGraph *buildWH(const char cls){
     numPrevLayerNodes=numLayerNodes;
   }
   source=newNode((char*)"Source");
-  AttachNode(dg,source);   
+  AttachNode(dg,source);
   for(i=0;i<numPrevLayerNodes;i++){
     nd=dg->node[firstLayerNode+i];
     ar=newArc(source,nd);
@@ -323,7 +323,7 @@ static DGraph *buildBH(const char cls){
     numPrevLayerNodes=numLayerNodes;
   }
   sink=newNode((char*)"Sink");
-  AttachNode(dg,sink);   
+  AttachNode(dg,sink);
   for(i=0;i<numPrevLayerNodes;i++){
     nd=dg->node[firstLayerNode+i];
     ar=newArc(nd,sink);
@@ -428,7 +428,7 @@ static Arr* WindowFilter(Arr *a, Arr* b,int w){
   int i=0,j=0,k=0;
   double rms0=0.0,rms1=0.0,rmsm1=0.0;
   double weight=((double) (w+1))/(w+2);
+
   w+=1;
   if(timer_on){
     timer_clear(w);
index 8dde5cb..24257dc 100644 (file)
@@ -24,7 +24,7 @@ int main(int argc, char **argv) {
   int    m;
   int    mk=16;
   int    nk = (int)(pow(2,mk)),
-         nq=10, 
+         nq=10,
          np, node, no_nodes, i, ik, kk, l, k, nit, no_large_nodes, np_add, k_offset;
   int    verified;
   char   size[500]; // mind the size of the string to represent a big number
index e29b87c..7314dee 100644 (file)
@@ -1,42 +1,42 @@
 /*************************************************************************
- *                                                                       * 
+ *                                                                       *
  *        N  A  S     P A R A L L E L     B E N C H M A R K S  3.3       *
- *                                                                       * 
- *                                  I S                                  * 
- *                                                                       * 
- ************************************************************************* 
- *                                                                       * 
+ *                                                                       *
+ *                                  I S                                  *
+ *                                                                       *
+ *************************************************************************
+ *                                                                       *
  *   This benchmark is part of the NAS Parallel Benchmark 3.3 suite.     *
- *   It is described in NAS Technical Report 95-020.                     * 
- *                                                                       * 
- *   Permission to use, copy, distribute and modify this software        * 
- *   for any purpose with or without fee is hereby granted.  We          * 
- *   request, however, that all derived work reference the NAS           * 
+ *   It is described in NAS Technical Report 95-020.                     *
+ *                                                                       *
+ *   Permission to use, copy, distribute and modify this software        *
+ *   for any purpose with or without fee is hereby granted.  We          *
+ *   request, however, that all derived work reference the NAS           *
  *   Parallel Benchmarks 3.3. This software is provided "as is"          *
- *   without express or implied warranty.                                * 
- *                                                                       * 
+ *   without express or implied warranty.                                *
+ *                                                                       *
  *   Information on NPB 3.3, including the technical report, the         *
- *   original specifications, source code, results and information       * 
- *   on how to submit new results, is available at:                      * 
- *                                                                       * 
- *          http://www.nas.nasa.gov/Software/NPB                         * 
- *                                                                       * 
- *   Send comments or suggestions to  npb@nas.nasa.gov                   * 
- *   Send bug reports to              npb-bugs@nas.nasa.gov              * 
- *                                                                       * 
- *         NAS Parallel Benchmarks Group                                 * 
- *         NASA Ames Research Center                                     * 
- *         Mail Stop: T27A-1                                             * 
- *         Moffett Field, CA   94035-1000                                * 
- *                                                                       * 
- *         E-mail:  npb@nas.nasa.gov                                     * 
- *         Fax:     (650) 604-3957                                       * 
- *                                                                       * 
- ************************************************************************* 
- *                                                                       * 
- *   Author: M. Yarrow                                                   * 
- *           H. Jin                                                      * 
- *                                                                       * 
+ *   original specifications, source code, results and information       *
+ *   on how to submit new results, is available at:                      *
+ *                                                                       *
+ *          http://www.nas.nasa.gov/Software/NPB                         *
+ *                                                                       *
+ *   Send comments or suggestions to  npb@nas.nasa.gov                   *
+ *   Send bug reports to              npb-bugs@nas.nasa.gov              *
+ *                                                                       *
+ *         NAS Parallel Benchmarks Group                                 *
+ *         NASA Ames Research Center                                     *
+ *         Mail Stop: T27A-1                                             *
+ *         Moffett Field, CA   94035-1000                                *
+ *                                                                       *
+ *         E-mail:  npb@nas.nasa.gov                                     *
+ *         Fax:     (650) 604-3957                                       *
+ *                                                                       *
+ *************************************************************************
+ *                                                                       *
+ *   Author: M. Yarrow                                                   *
+ *           H. Jin                                                      *
+ *                                                                       *
  *************************************************************************/
 
 #include "smpi/mpi.h"
@@ -221,7 +221,7 @@ static void rank( global_data* gd, int iteration )
   INT_TYPE    min_key_val, max_key_val;
   INT_TYPE    *key_buff_ptr;
 
-/*  Iteration alteration of keys */  
+/*  Iteration alteration of keys */
   if(gd->my_rank == 0){
     gd->key_array[iteration] = iteration;
     gd->key_array[iteration+MAX_ITERATIONS] = max_key - iteration;
@@ -579,7 +579,7 @@ int main( int argc, char **argv )
              1220703125.00 ),   /* Random number gen mult */
              1220703125.00 );   /* Random number gen mult */
 
-/*  Do one interation for free (i.e., untimed) to guarantee initialization of  
+/*  Do one interation for free (i.e., untimed) to guarantee initialization of
     all data and code pages and respective tables */
   rank(gd, 1 );
 
index 51cc923..90091d7 100644 (file)
@@ -72,7 +72,7 @@ static int alltoall_mpi(int argc, char *argv[])
   XBT_INFO("alltoall for rank %d", rank);
   int* out=malloc(1000*size*sizeof(int));
   int* in=malloc(1000*size*sizeof(int));
-  MPI_Alltoall(out, 1000, MPI_INT,in, 1000, MPI_INT, MPI_COMM_WORLD); 
+  MPI_Alltoall(out, 1000, MPI_INT,in, 1000, MPI_INT, MPI_COMM_WORLD);
 
   XBT_INFO("after alltoall %d", rank);
   free(out);
index 6aff62b..8cafe9f 100644 (file)
@@ -262,7 +262,7 @@ public:
    * This blocks the calling actor until the actor on which we call join() is terminated
    */
   void join();
-  
+
   // Static methods on all actors:
 
   /** Ask kindly to all actors to die. Only the issuer will survive. */
index ab1dd5e..6f9d6ce 100644 (file)
@@ -145,7 +145,7 @@ public class Host {
    * The external load (coming from an availability trace) is not taken in account.
    *
    * @return      The number of tasks currently running on a host.
-   */ 
+   */
   public native int getLoad();
 
 
index 62c36fd..fdd13dd 100644 (file)
@@ -26,7 +26,7 @@ namespace s4u {
  * Rendez-vous point for network communications, similar to URLs on
  * which you could post and retrieve data. Actually, the mailboxes are
  * not involved in the communication once it starts, but only to find
- * the contact with which you want to communicate. 
+ * the contact with which you want to communicate.
 
  * Here are some mechanisms similar to the mailbox in other
  * communication systems: The phone number, which allows the caller to
@@ -93,8 +93,8 @@ namespace s4u {
  * starts to flow as soon as the sender posts it, even if the receiver
  * did not post its recv() yet. This can obviously lead to bad
  * simulation timings, as the simulated communications do not start at
- * the exact same time than the real ones. 
- * 
+ * the exact same time than the real ones.
+ *
  * If the simulation timings are very important to you, you can
  * declare a specific receiver to a given mailbox (with the function
  * setReceiver()). That way, any send() posted to that mailbox will
index b317441..27efe34 100644 (file)
@@ -121,8 +121,8 @@ XBT_PUBLIC(void) SD_task_schedulel(SD_task_t task, int count, ...);
 
 /** @} */
 
-/** @addtogroup SD_task_dependency_api 
- * 
+/** @addtogroup SD_task_dependency_api
+ *
  *  This section describes the functions for managing the dependencies between the tasks.
  *
  *  @see SD_task_api
index 11c67ee..39b5483 100644 (file)
@@ -561,8 +561,8 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Put,( void *origin_addr, int origin_count, MPI_Dat
     MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win));
 MPI_CALL(XBT_PUBLIC(int), MPI_Accumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
     int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win));
-MPI_CALL(XBT_PUBLIC(int), MPI_Get_accumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, 
-    void* result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, 
+MPI_CALL(XBT_PUBLIC(int), MPI_Get_accumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
+    void* result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
     int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win));
 
 MPI_CALL(XBT_PUBLIC(int), MPI_Rget,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank,
@@ -571,8 +571,8 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Rput,( void *origin_addr, int origin_count, MPI_Da
     MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request* request));
 MPI_CALL(XBT_PUBLIC(int), MPI_Raccumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
     int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request));
-MPI_CALL(XBT_PUBLIC(int), MPI_Rget_accumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype, 
-    void* result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, 
+MPI_CALL(XBT_PUBLIC(int), MPI_Rget_accumulate,( void *origin_addr, int origin_count, MPI_Datatype origin_datatype,
+    void* result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp,
     int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request* request));
 
 MPI_CALL(XBT_PUBLIC(int), MPI_Fetch_and_op,( void *origin_addr, void* result_addr, MPI_Datatype datatype,
@@ -603,9 +603,9 @@ typedef void MPI_Handler_function(MPI_Comm*, int*, ...);
 typedef void* MPI_Errhandler;
 
 typedef void MPI_Comm_errhandler_function(MPI_Comm *, int *, ...);
-typedef int MPI_Grequest_query_function(void *extra_state, MPI_Status *status); 
-typedef int MPI_Grequest_free_function(void *extra_state); 
-typedef int MPI_Grequest_cancel_function(void *extra_state, int complete); 
+typedef int MPI_Grequest_query_function(void *extra_state, MPI_Status *status);
+typedef int MPI_Grequest_free_function(void *extra_state);
+typedef int MPI_Grequest_cancel_function(void *extra_state, int complete);
 #define MPI_DUP_FN MPI_Comm_dup
 
 #define MPI_WIN_DUP_FN ((MPI_Win_copy_attr_function*)MPI_DUP_FN)
@@ -723,7 +723,7 @@ MPI_CALL(XBT_PUBLIC(int), MPI_Win_set_errhandler, (MPI_Win win, MPI_Errhandler e
 MPI_CALL(XBT_PUBLIC(int), MPI_Type_get_envelope,(MPI_Datatype datatype,int *num_integers,int *num_addresses,
                             int *num_datatypes, int *combiner));
 MPI_CALL(XBT_PUBLIC(int), MPI_Type_get_contents,(MPI_Datatype datatype, int max_integers, int max_addresses,
-                            int max_datatypes, int* array_of_integers, MPI_Aint* array_of_addresses, 
+                            int max_datatypes, int* array_of_integers, MPI_Aint* array_of_addresses,
                             MPI_Datatype *array_of_datatypes));
 MPI_CALL(XBT_PUBLIC(int), MPI_Type_create_darray,(int size, int rank, int ndims, int* array_of_gsizes,
                             int* array_of_distribs, int* array_of_dargs, int* array_of_psizes,
@@ -866,14 +866,14 @@ XBT_PUBLIC(void) smpi_sample_1(int global, const char *file, int line, int iters
 XBT_PUBLIC(int) smpi_sample_2(int global, const char *file, int line);
 XBT_PUBLIC(void) smpi_sample_3(int global, const char *file, int line);
 
-/** 
- * Need a public setter for SMPI copy_callback function, so users can define 
+/**
+ * Need a public setter for SMPI copy_callback function, so users can define
  * their own while still using default SIMIX_copy_callback for MSG copies.
  */
 XBT_PUBLIC(void) smpi_comm_set_copy_data_callback(void (*callback) (smx_activity_t, void*, size_t));
 
 
-/** 
+/**
  * Functions for call location tracing. These functions will be
  * called from the user's application! (With the __FILE__ and __LINE__ values
  * passed as parameters.)
@@ -961,7 +961,7 @@ static void __attribute__((destructor)) __postfini_##name(void) { \
 
 #define SMPI_VARGET_GLOBAL(name) name[smpi_process_index()]
 
-/** 
+/**
  * This is used for the old privatization method, i.e., on old
  * machines that do not yet support privatization via mmap
  */
index 1ba708f..2d0d94e 100644 (file)
@@ -78,7 +78,7 @@ XBT_PUBLIC(void) xbt_automaton_transition_set_source(xbt_automaton_transition_t
 XBT_PUBLIC(void) xbt_automaton_transition_set_destination(xbt_automaton_transition_t t, xbt_automaton_state_t dst);
 XBT_PUBLIC(xbt_dynar_t) xbt_automaton_state_get_out_transitions(xbt_automaton_state_t s);
 XBT_PUBLIC(xbt_dynar_t) xbt_automaton_state_get_in_transitions(xbt_automaton_state_t s);
-XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_state_exists(xbt_automaton_t a, char *id); 
+XBT_PUBLIC(xbt_automaton_state_t) xbt_automaton_state_exists(xbt_automaton_t a, char *id);
 XBT_PUBLIC(void) xbt_automaton_display(xbt_automaton_t a);
 XBT_PUBLIC(void) xbt_automaton_exp_label_display(xbt_automaton_exp_label_t l);
 
index 108003c..68ea79e 100644 (file)
 #  define XBT_PUBLIC_CLASS            class __declspec(dllimport)
 #  define XBT_PRIVATE
 
-#elif defined(__ELF__) 
+#elif defined(__ELF__)
 #  define XBT_PUBLIC(type)            __attribute__((visibility("default"))) type
 #  define XBT_EXPORT_NO_IMPORT(type)  __attribute__((visibility("default"))) type
 #  define XBT_IMPORT_NO_EXPORT(type)  __attribute__((visibility("default"))) type
index cf7a3ec..c006453 100644 (file)
@@ -36,10 +36,10 @@ XBT_PUBLIC(void) xbt_test_suite_push(xbt_test_suite_t suite, const char *name, t
  * It is a coma (,) separated list of directives. They are applied from left to right.
  *
  * Each of them of form:
- * 
+ *
  * [-|+]suitename[:unitname[:testname]]
- * 
- * * First char: 
+ *
+ * * First char:
  *   if it's a '-', the directive disables something
  *   if it's a '+', the directive enables something
  *   By default, everything is enabled, but you can disable a suite and reenable some parts
@@ -54,24 +54,24 @@ XBT_PUBLIC(void) xbt_test_dump(char *selection);
 /* Cleanup the mess */
 XBT_PUBLIC(void) xbt_test_exit();
 
-/** 
+/**
  * @addtogroup XBT_cunit
  * @brief Unit testing implementation (see @ref inside_tests_add_units)
- *  
+ *
  * This module is mainly intended to allow the tests of SimGrid itself and may lack the level of genericity that you
  * would expect as a user. Only use it in external projects at your own risk (but it works rather well for us). We play
  * with the idea of migrating to an external solution for our unit tests, possibly offering more features, but having
  * absolutely no dependencies is a nice feature of SimGrid (and this code is sufficient to cover our needs, actually,
  * so why should we bother switching?)
- * 
+ *
  * Unit testing is not intended to write integration tests.
  * Please refer to \ref inside_tests_add_integration for that instead.
  *
- * @{ 
+ * @{
  */
 /** @brief Provide information about the suite declared in this file
  *  @hideinitializer
- * 
+ *
  * Actually, this macro is only used by the script extracting the test units, but that should be transparent for you.
  *
  * @param suite_name the short name of this suite, to be used in the --tests argument of testall afterward. Avoid
@@ -101,15 +101,15 @@ XBT_PUBLIC(void) xbt_test_exit();
 XBT_PUBLIC(void) _xbt_test_add(const char *file, int line, const char *fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
 XBT_PUBLIC(void) _xbt_test_fail(const char *file, int line, const char *fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
 XBT_PUBLIC(void) _xbt_test_log(const char *file, int line, const char *fmt, ...) XBT_ATTRIB_PRINTF(3, 4);
-/** @brief Declare that a new test begins (printf-like parameters, describing the test) 
+/** @brief Declare that a new test begins (printf-like parameters, describing the test)
  *  @hideinitializer */
 #define xbt_test_add(...)       _xbt_test_add(__FILE__, __LINE__, __VA_ARGS__)
-/** @brief Declare that the lastly started test failed (printf-like parameters, describing failure cause) 
+/** @brief Declare that the lastly started test failed (printf-like parameters, describing failure cause)
  *  @hideinitializer */
 #define xbt_test_fail(...)      _xbt_test_fail(__FILE__, __LINE__, __VA_ARGS__)
 /** @brief The lastly started test is actually an assert
- *  @hideinitializer 
- * 
+ *  @hideinitializer
+ *
  * - If provided a uniq parameter, this is assumed to be a condition that is expected to be true
  * - If provided more parameters, the first one is a condition, and the other ones are printf-like arguments that are
  *   to be displayed when the condition fails.
index 747e318..86751e8 100644 (file)
@@ -19,7 +19,7 @@ SG_BEGIN_DECL()
   * @brief DynArr are dynamically sized vector which may contain any type of variables.
   *
   * These are the SimGrid version of the dynamically size arrays, which all C programmer recode one day or another.
-  *  
+  *
   * For performance concerns, the content of DynArr must be homogeneous (in contrary to dictionnaries -- see the
   * \ref XBT_dict section). You thus have to provide the function which will be used to free the content at
   * structure creation (of type void_f_pvoid_t).
@@ -40,7 +40,7 @@ SG_BEGIN_DECL()
   * \until xbt_dynar_free
   *
   * \section XBT_dynar_exptr Example with pointed data
-  * 
+  *
   * \skip test_dynar_string
   * \skip dynar_t
   * \until s2
@@ -147,7 +147,7 @@ XBT_PUBLIC(void *) xbt_dynar_pop_ptr(xbt_dynar_t const dynar);
  *  @{
  */
 
-  /** @brief Quick retrieval of scalar content 
+  /** @brief Quick retrieval of scalar content
    *  @hideinitializer */
 #  define xbt_dynar_get_as(dynar,idx,type) \
           (*(type*)xbt_dynar_get_ptr((dynar),(idx)))
@@ -155,19 +155,19 @@ XBT_PUBLIC(void *) xbt_dynar_pop_ptr(xbt_dynar_t const dynar);
  *  @hideinitializer */
 #  define xbt_dynar_set_as(dynar,idx,type,val) \
          (*(type*)xbt_dynar_set_at_ptr((dynar),(idx))) = val
-  /** @brief Quick retrieval of scalar content 
+  /** @brief Quick retrieval of scalar content
    *  @hideinitializer */
 #  define xbt_dynar_getlast_as(dynar,type) \
           (*(type*)xbt_dynar_get_ptr((dynar),xbt_dynar_length(dynar)-1))
-  /** @brief Quick retrieval of scalar content 
+  /** @brief Quick retrieval of scalar content
    *  @hideinitializer */
 #  define xbt_dynar_getfirst_as(dynar,type) \
           (*(type*)xbt_dynar_get_ptr((dynar),0))
-  /** @brief Quick insertion of scalar content 
+  /** @brief Quick insertion of scalar content
    *  @hideinitializer */
 #  define xbt_dynar_insert_at_as(dynar,idx,type,value) \
           *(type*)xbt_dynar_insert_at_ptr(dynar,idx)=value
-  /** @brief Quick insertion of scalar content 
+  /** @brief Quick insertion of scalar content
    *  @hideinitializer */
 #  define xbt_dynar_push_as(dynar,type,value) \
           *(type*)xbt_dynar_push_ptr(dynar)=value
@@ -190,7 +190,7 @@ XBT_PUBLIC(void *) xbt_dynar_pop_ptr(xbt_dynar_t const dynar);
 
 XBT_PUBLIC(void) xbt_dynar_cursor_rm(xbt_dynar_t dynar, unsigned int *const cursor);
 
-/* 
+/*
  * \warning DO NOT USE THIS STRUCTURE DIRECTLY! Instead, use the public interface:
  *          This was made public to allow:
  *           - the inlining of the foreach elements
@@ -222,8 +222,8 @@ static inline int _xbt_dynar_cursor_get(const xbt_dynar_t dynar, unsigned int id
   return TRUE;
 }
 
-/** @brief Iterates over the whole dynar. 
- * 
+/** @brief Iterates over the whole dynar.
+ *
  *  @param _dynar what to iterate over
  *  @param _cursor an integer used as cursor
  *  @param _data
@@ -238,7 +238,7 @@ xbt_dynar_foreach (dyn,cpt,str) {
   printf("Seen %s\n",str);
 }
 \endcode
- * 
+ *
  * Note that underneath, that's a simple for loop with no real black  magic involved. It's perfectly safe to interrupt
  * a foreach with a break or a return statement.
  */
index ea18bc0..511f47a 100644 (file)
@@ -62,7 +62,7 @@ class ThrowPoint {
  *  You are not expected to inherit from it. Instead of you use should
  *  @ref XBT_THROW an exception which will throw a subclass of your original
  *  exception with those additional features.
- * 
+ *
  *  However, you can try `dynamic_cast` an exception to this type in order to
  *  get contextual information about the exception.
  */
index a6be428..be33e86 100644 (file)
 
 /** \defgroup XBT_log_cats Existing log categories
  *  \ingroup XBT_log
- *  \brief (automatically extracted) 
+ *  \brief (automatically extracted)
  *
  *  This is the list of all existing log categories in SimGrid.
  *  This list is automatically extracted from the source code by the tools/doxygen/xbt_log_extract_hierarchy.pl utility.
  *
- *  It should thus contain every categories that are defined in the SimGrid library. 
+ *  It should thus contain every categories that are defined in the SimGrid library.
  *  If you want to see the one defined in your code in addition, provide `--help-logs` on the command line of your simulator.
  */
 
@@ -150,14 +150,14 @@ typedef enum {
  * \param desc string describing the purpose of this category
  * \hideinitializer
  *
- * Defines a new subcategory of the parent. 
+ * Defines a new subcategory of the parent.
  */
 #define XBT_LOG_NEW_SUBCATEGORY(catName, parent, desc)    \
   XBT_LOG_EXTERNAL_CATEGORY(parent);                      \
   XBT_LOG_NEW_SUBCATEGORY_helper(catName, parent, desc)   \
 
 /**
- * \ingroup XBT_log  
+ * \ingroup XBT_log
  * \param catName name of new category
  * \param desc string describing the purpose of this category
  * \hideinitializer
@@ -168,7 +168,7 @@ typedef enum {
    XBT_LOG_NEW_SUBCATEGORY_helper(catName, XBT_LOG_ROOT_CAT, desc)
 
 /**
- * \ingroup XBT_log  
+ * \ingroup XBT_log
  * \param cname name of the cat
  * \hideinitializer
  *
@@ -183,7 +183,7 @@ typedef enum {
 #endif
 
 /**
- * \ingroup XBT_log  
+ * \ingroup XBT_log
  * \param cname name of the cat
  * \param desc string describing the purpose of this category
  * \hideinitializer
@@ -196,7 +196,7 @@ typedef enum {
     XBT_LOG_DEFAULT_CATEGORY(cname)
 
 /**
- * \ingroup XBT_log  
+ * \ingroup XBT_log
  * \param cname name of the cat
  * \param parent name of the parent
  * \param desc string describing the purpose of this category
@@ -210,7 +210,7 @@ typedef enum {
     XBT_LOG_DEFAULT_CATEGORY(cname)
 
 /**
- * \ingroup XBT_log  
+ * \ingroup XBT_log
  * \param cname name of the cat
  * \hideinitializer
  *
@@ -283,7 +283,7 @@ struct xbt_log_event_s {
 XBT_PUBLIC(void) xbt_log_threshold_set(xbt_log_category_t cat, e_xbt_log_priority_t thresholdPriority);
 
 /**
- * \ingroup XBT_log_implem  
+ * \ingroup XBT_log_implem
  * \param cat the category (not only its name, but the variable)
  * \param app the appender
  *
@@ -291,7 +291,7 @@ XBT_PUBLIC(void) xbt_log_threshold_set(xbt_log_category_t cat, e_xbt_log_priorit
  */
 XBT_PUBLIC(void) xbt_log_appender_set(xbt_log_category_t cat, xbt_log_appender_t app);
 /**
- * \ingroup XBT_log_implem  
+ * \ingroup XBT_log_implem
  * \param cat the category (not only its name, but the variable)
  * \param lay the layout
  *
@@ -300,7 +300,7 @@ XBT_PUBLIC(void) xbt_log_appender_set(xbt_log_category_t cat, xbt_log_appender_t
 XBT_PUBLIC(void) xbt_log_layout_set(xbt_log_category_t cat, xbt_log_layout_t lay);
 
 /**
- * \ingroup XBT_log_implem  
+ * \ingroup XBT_log_implem
  * \param cat the category (not only its name, but the variable)
  * \param additivity whether logging actions must be passed to parent.
  *
@@ -309,7 +309,7 @@ XBT_PUBLIC(void) xbt_log_layout_set(xbt_log_category_t cat, xbt_log_layout_t lay
  */
 XBT_PUBLIC(void) xbt_log_additivity_set(xbt_log_category_t cat, int additivity);
 
-/** @brief create a new simple layout 
+/** @brief create a new simple layout
  *
  * This layout is not as flexible as the pattern one
  */
@@ -343,7 +343,7 @@ extern xbt_log_layout_t xbt_log_default_layout;
 /* ********************** */
 
 /**
- * \ingroup XBT_log 
+ * \ingroup XBT_log
  * \param catName name of the category
  * \param priority minimal priority to be enabled to return true (must be #e_xbt_log_priority_t)
  * \hideinitializer
index e607e10..d0b0f36 100644 (file)
@@ -15,7 +15,7 @@ SG_BEGIN_DECL()
 
 /** @addtogroup XBT_mallocator
  *  @brief The mallocator system
- * 
+ *
  *  This section describes the API to a mallocator.
  *  A mallocator allows you to recycle the objects you don't need anymore  instead of freeing them. A mallocator is a
  *  stack which stores the unused objects  or a given type. If you often need to malloc() / free() objects of a certain
index 89a8434..905b12c 100644 (file)
@@ -16,7 +16,7 @@
 SG_BEGIN_DECL()
 
 /** \addtogroup XBT_parmap
-  * \ingroup XBT_misc  
+  * \ingroup XBT_misc
   * \brief Parallel map.
   *
   * A function is applied to all elements of a dynar in parallel with n worker threads.
index 5c1ff35..0f25e2b 100644 (file)
 
 SG_BEGIN_DECL()
 
-/** 
+/**
  * @addtogroup XBT_swag
  * @brief a O(1) set based on linked lists
- * 
+ *
  *  Warning, this module is done to be efficient and performs tons of cast and dirty things. So make sure you know what
  *  you are doing while using it.
  *  It is basically a fifo but with restrictions so that it can be used as a set. Any operation (add, remove, belongs)
@@ -29,7 +29,7 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_swag_type Swag types
     @ingroup XBT_swag
 
-    Specific set. 
+    Specific set.
 
     These typedefs are public so that the compiler can do his job but believe me, you don't want to try to play with
     those structs directly. Use them as an abstract datatype.
@@ -39,7 +39,7 @@ typedef struct xbt_swag_hookup {
   void *next;
   void *prev;
 } s_xbt_swag_hookup_t;
-/**< This type should be added to a type that is to be used in a swag. 
+/**< This type should be added to a type that is to be used in a swag.
  *
  *  Whenever a new object with this struct is created, all fields have to be set to NULL
  *
@@ -78,9 +78,9 @@ typedef struct xbt_swag* xbt_swag_t;
 /**< A typical swag */
 /* @} */
 
-/** @defgroup XBT_swag_func SWAG functions 
+/** @defgroup XBT_swag_func SWAG functions
  *  @ingroup XBT_swag
+
  *  @{
  */
 
@@ -136,7 +136,7 @@ static inline void *xbt_swag_getFirst(xbt_swag_t swag)
  * \defgroup XBT_swag_curs Swag cursor
  * @ingroup XBT_swag
 
- * Iterates over the whole swag. 
+ * Iterates over the whole swag.
  *
  * @{ */
 
@@ -157,13 +157,13 @@ static inline void *xbt_swag_getFirst(xbt_swag_t swag)
        (obj)=(decltype(obj)) xbt_swag_getNext((obj),(swag)->offset))
 #endif
 /**
- * @brief A safe swag iterator 
+ * @brief A safe swag iterator
  * @param obj the indice of the loop
  * @param obj_next the object that is right after (if any) \a obj in the swag
  * @param swag what to iterate over
  * @hideinitializer
 
-    You can safely modify the \a swag while using this loop. 
+    You can safely modify the \a swag while using this loop.
     Well, safely... Err. You can remove \a obj without having any trouble at least.  */
 
 #ifndef __cplusplus
index 8890263..fa4c014 100644 (file)
@@ -17,10 +17,10 @@ typedef pthread_key_t xbt_os_thread_key_t;
 
 /** @addtogroup XBT_thread
  *  @brief Thread portability layer
- * 
+ *
  *  This section describes the thread portability layer. It defines types and functions very close to the pthread API,
  *  but it's portable to windows too.
- * 
+ *
  *  @{
  */
 
index 47f33be..e7b2c24 100644 (file)
@@ -13,7 +13,7 @@
 
 SG_BEGIN_DECL()
 
-/** @brief get time in seconds 
+/** @brief get time in seconds
  *
  * gives  the  number  of  seconds since the Epoch (00:00:00 UTC, January 1, 1970).
  */
index 2676d37..3f41bfd 100644 (file)
@@ -141,7 +141,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_on(JNIEnv *env, jobject jhost)
 
 JNIEXPORT void JNICALL Java_org_simgrid_msg_Host_off(JNIEnv *env, jobject jhost) {
   msg_host_t host = jhost_get_native(env, jhost);
-  MSG_host_off(host); 
+  MSG_host_off(host);
 }
 
 JNIEXPORT jint JNICALL Java_org_simgrid_msg_Host_getCount(JNIEnv * env, jclass cls) {
index 26c64da..c33ba63 100644 (file)
@@ -25,7 +25,7 @@ SG_BEGIN_DECL()
 JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostStateDeclare(JNIEnv * env, jclass cls, jstring js)
 {
   const char *s = env->GetStringUTFChars(js, 0);
-  TRACE_host_state_declare(s);  
+  TRACE_host_state_declare(s);
   env->ReleaseStringUTFChars(js, s);
 }
 
@@ -36,7 +36,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostStateDeclareValue (JNIEn
   const char *value = env->GetStringUTFChars(js_value, 0);
   const char *color = env->GetStringUTFChars(js_color, 0);
 
-  TRACE_host_state_declare_value(state, value, color);  
+  TRACE_host_state_declare_value(state, value, color);
 
   env->ReleaseStringUTFChars(js_state, state);
   env->ReleaseStringUTFChars(js_value, value);
@@ -50,7 +50,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostSetState (JNIEnv *env, j
   const char *state = env->GetStringUTFChars(js_state, 0);
   const char *value = env->GetStringUTFChars(js_value, 0);
 
-  TRACE_host_set_state(host, state, value);  
+  TRACE_host_set_state(host, state, value);
 
   env->ReleaseStringUTFChars(js_host, host);
   env->ReleaseStringUTFChars(js_state, state);
@@ -64,7 +64,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostPushState (JNIEnv *env,
   const char *state = env->GetStringUTFChars(js_state, 0);
   const char *value = env->GetStringUTFChars(js_value, 0);
 
-  TRACE_host_push_state(host, state, value);  
+  TRACE_host_push_state(host, state, value);
 
   env->ReleaseStringUTFChars(js_host, host);
   env->ReleaseStringUTFChars(js_state, state);
@@ -77,7 +77,7 @@ JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_hostPopState (JNIEnv *env, j
   const char *host = env->GetStringUTFChars(js_host, 0);
   const char *state = env->GetStringUTFChars(js_state, 0);
 
-  TRACE_host_pop_state(host, state);  
+  TRACE_host_pop_state(host, state);
 
   env->ReleaseStringUTFChars(js_host, host);
   env->ReleaseStringUTFChars(js_state, state);
index df54f3f..c02d921 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (c) 2010-2016. The SimGrid Team.
- * All rights reserved.                                                     
+ * All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -40,7 +40,7 @@ const char* sglua_tostring(lua_State* L, int index) {
       snprintf(buff, 4, "nil");
       break;
 
-    case LUA_TNUMBER: 
+    case LUA_TNUMBER:
       snprintf(buff, 64, "%.3f", lua_tonumber(L, index));
       break;
 
@@ -84,7 +84,7 @@ static int sglua_dump_table(lua_State* L) {
     if (lua_istable(L, i)) {
       lua_pushnil(L); /* table nil */
 
-      //lua_next pops the topmost element from the stack and 
+      //lua_next pops the topmost element from the stack and
       //gets the next pair from the table
       while (lua_next(L, -1)) { /* table key val  */
         // we need to copy here, as a cast from "Number" to "String"
index 91b854f..846d2b0 100644 (file)
@@ -69,7 +69,7 @@ static int critical(lua_State* L) {
  * @brief Dumps a lua table with XBT_DEBUG
  *
  * This function can be called from within lua via "simgrid.dump(table)". It will
- * then dump the table via XBT_DEBUG 
+ * then dump the table via XBT_DEBUG
  */
 static int dump(lua_State* L) {
   int argc = lua_gettop(L);
@@ -78,7 +78,7 @@ static int dump(lua_State* L) {
     if (lua_istable(L, i)) {
       lua_pushnil(L); /* table nil */
 
-      //lua_next pops the topmost element from the stack and 
+      //lua_next pops the topmost element from the stack and
       //gets the next pair from the table at the specified index
       while (lua_next(L, i)) { /* table key val  */
         // we need to copy here, as a cast from "Number" to "String"
index 3f5864c..0834db9 100644 (file)
@@ -24,7 +24,7 @@
 
 SG_BEGIN_DECL()
 
-/********************************** Configuration of MC **************************************/  
+/********************************** Configuration of MC **************************************/
 extern XBT_PUBLIC(int) _sg_do_model_check;
 extern XBT_PRIVATE int _sg_do_model_check_record;
 extern XBT_PRIVATE int _sg_mc_checkpoint;
index 9a1ffb3..7365bfa 100644 (file)
@@ -18,10 +18,10 @@ class Action;
 }
 }
 
-/** @addtogroup SURF_lmm 
- * @details 
+/** @addtogroup SURF_lmm
+ * @details
  * A linear maxmin solver to resolve inequations systems.
- * 
+ *
  * Most SimGrid model rely on a "fluid/steady-state" modeling that simulate the sharing of resources between actions at
  * relatively coarse-grain.  Such sharing is generally done by solving a set of linear inequations. Let's take an
  * example and assume we have the variables \f$x_1\f$, \f$x_2\f$, \f$x_3\f$, and \f$x_4\f$ . Let's say that \f$x_1\f$
@@ -44,7 +44,7 @@ class Action;
  * This is called *max-min fairness* and is the most commonly used objective in SimGrid. Another possibility is to
  * maximize \f$\sum_if(x_i)\f$, where \f$f\f$ is a strictly increasing concave function.
  *
- * Constraint: 
+ * Constraint:
  *  - bound (set)
  *  - shared (set)
  *  - usage (computed)
@@ -56,7 +56,7 @@ class Action;
  *
  * Element:
  *  - value (set)
- * 
+ *
  * A possible system could be:
  * - three variables: `var1`, `var2`, `var3`
  * - two constraints: `cons1`, `cons2`
@@ -65,19 +65,19 @@ class Action;
  *  - `elem2` linking `var2` and `cons1`
  *  - `elem3` linking `var2` and `cons2`
  *  - `elem4` linking `var3` and `cons2`
- * 
+ *
  * And the corresponding inequations will be:
- * 
+ *
  *     var1.value <= var1.bound
  *     var2.value <= var2.bound
  *     var3.value <= var3.bound
  *     var1.weight * var1.value * elem1.value + var2.weight * var2.value * elem2.value <= cons1.bound
  *     var2.weight * var2.value * elem3.value + var3.weight * var3.value * elem4.value <= cons2.bound
- * 
+ *
  * where `var1.value`, `var2.value` and `var3.value` are the unknown values.
- * 
- * If a constraint is not shared, the sum is replaced by a max. 
- * For example, a third non-shared constraint `cons3` and the associated elements `elem5` and `elem6` could write as: 
+ *
+ * If a constraint is not shared, the sum is replaced by a max.
+ * For example, a third non-shared constraint `cons3` and the associated elements `elem5` and `elem6` could write as:
  *
  *     max( var1.weight * var1.value * elem5.value  ,  var3.weight * var3.value * elem6.value ) <= cons3.bound
  *
@@ -99,28 +99,28 @@ class Action;
  * (lmm_solve()) activates it when appropriate. It is possible that the variable is again disabled, e.g. to model the
  * pausing of an action.
  *
- * Concurrency limit and maximum 
- * 
- * We call concurrency, the number of variables that can be enabled at any time for each constraint. 
+ * Concurrency limit and maximum
+ *
+ * We call concurrency, the number of variables that can be enabled at any time for each constraint.
  * From a model perspective, this "concurrency" often represents the number of actions that actually compete for one
  * constraint.
  * The LMM solver is able to limit the concurrency for each constraint, and to monitor its maximum value.
- * 
+ *
  * One may want to limit the concurrency of constraints for essentially three reasons:
  *  - Keep LMM system in a size that can be solved (it does not react very well with tens of thousands of variables per
  *    constraint)
- *  - Stay within parameters where the fluid model is accurate enough.      
+ *  - Stay within parameters where the fluid model is accurate enough.
  *  - Model serialization effects
  *
  * The concurrency limit can also be set to a negative value to disable concurrency limit. This can improve performance
  * slightly.
- * 
+ *
  * Overall, each constraint contains three fields related to concurrency:
  *  - concurrency_limit which is the limit enforced by the solver
  *  - concurrency_current which is the current concurrency
- *  - concurrency_maximum which is the observed maximum concurrency 
+ *  - concurrency_maximum which is the observed maximum concurrency
  *
- * Variables also have one field related to concurrency: concurrency_share. 
+ * Variables also have one field related to concurrency: concurrency_share.
  * In effect, in some cases, one variable is involved multiple times (i.e. two elements) in a constraint.
  * For example, cross-traffic is modeled using 2 elements per constraint.
  * concurrency_share formally corresponds to the maximum number of elements that associate the variable and any given
@@ -130,7 +130,7 @@ class Action;
 XBT_PUBLIC_DATA(double) sg_maxmin_precision;
 XBT_PUBLIC_DATA(double) sg_surf_precision;
 XBT_PUBLIC_DATA(int) sg_concurrency_limit;
+
 static inline void double_update(double *variable, double value, double precision)
 {
   //printf("Updating %g -= %g +- %g\n",*variable,value,precision);
@@ -172,7 +172,7 @@ XBT_PUBLIC(void) lmm_system_free(lmm_system_t sys);
  * @brief Create a new Linear MaxMin constraint
  * @param sys The system in which we add a constraint
  * @param id Data associated to the constraint (e.g.: a network link)
- * @param bound_value The bound value of the constraint 
+ * @param bound_value The bound value of the constraint
  */
 XBT_PUBLIC(lmm_constraint_t) lmm_constraint_new(lmm_system_t sys, void *id,double bound_value);
 
@@ -323,7 +323,7 @@ XBT_PUBLIC(double) lmm_get_cnst_weight_from_var(lmm_system_t sys, lmm_variable_t
 XBT_PUBLIC(int) lmm_get_number_of_cnst_from_var(lmm_system_t sys, lmm_variable_t var);
 
 /**
- * @brief Get a var associated to a constraint 
+ * @brief Get a var associated to a constraint
  * @details Get the first variable of the next variable of elem if elem is not NULL
  * @param sys The system associated to the variable (not used)
  * @param cnst A constraint
@@ -356,7 +356,7 @@ XBT_PUBLIC(lmm_constraint_t) lmm_get_first_active_constraint(lmm_system_t sys);
  * @brief Get the next active constraint of a constraint in a system
  * @param sys A system
  * @param cnst An active constraint of the system
- * 
+ *
  * @return The next active constraint
  */
 XBT_PUBLIC(lmm_constraint_t) lmm_get_next_active_constraint(lmm_system_t sys, lmm_constraint_t cnst);
index 78f726e..6afb858 100644 (file)
@@ -126,9 +126,9 @@ static void print_timestamp(PajeEvent* event) {
   /* prevent 0.0000 in the trace - this was the behavior before the transition to c++ */
   if (event->timestamp < 1e-12)
     stream << 0;
-  else 
+  else
     stream << event->timestamp;
-}  
+}
 
 /* internal do the instrumentation module */
 static void insert_into_buffer (PajeEvent* tbi)
index acb89e3..2eb9030 100644 (file)
@@ -136,7 +136,7 @@ type_t PJ_type_container_new (const char *name, type_t father)
 }
 
 type_t PJ_type_event_new (const char *name, type_t father)
-{ 
+{
   if (name == nullptr){
     THROWF (tracing_error, 0, "can't create an event type with a nullptr name");
   }
index 6eb6044..9d10c4b 100644 (file)
@@ -101,7 +101,7 @@ class s_container;
 typedef s_container *container_t;
 
 class s_container {
-  public: 
+  public:
   sg_netpoint_t netpoint;
   char *name;     /* Unique name of this container */
   char *id;       /* Unique id of this container */
@@ -136,7 +136,7 @@ class DefineContainerEvent : public PajeEvent
 
 //--------------------------------------------------
 
-class DefineVariableTypeEvent : public PajeEvent 
+class DefineVariableTypeEvent : public PajeEvent
 {
   public:
   type_t type;
@@ -154,7 +154,7 @@ class DefineStateTypeEvent : public PajeEvent  {
 
 class DefineEventTypeEvent : public PajeEvent  {
   type_t type;
-  public: 
+  public:
   DefineEventTypeEvent(type_t type);
   void print() override;
 };
@@ -216,7 +216,7 @@ class SubVariableEvent : public PajeEvent  {
   public:
   container_t container;
   type_t type;
-  double value; 
+  double value;
   public:
   SubVariableEvent(double timestamp, container_t container, type_t type, double value);
   void print() override;
index fa39f6c..057d46e 100644 (file)
@@ -3,7 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "src/internal_config.h" 
+#include "src/internal_config.h"
 
 #include "xbt/parmap.h"
 
@@ -23,12 +23,12 @@ class RawContextFactory;
 
 /** @brief Fast context switching inspired from SystemV ucontexts.
   *
-  * The main difference to the System V context is that Raw Contexts are much faster because they don't 
+  * The main difference to the System V context is that Raw Contexts are much faster because they don't
   * preserve the signal mask when switching. This saves a system call (at least on Linux) on each context switch.
   */
 class RawContext : public Context {
 protected:
-  void* stack_ = nullptr; 
+  void* stack_ = nullptr;
   /** pointer to top the stack stack */
   void* stack_top_ = nullptr;
 public:
index 64fc01e..015a60b 100644 (file)
@@ -106,7 +106,7 @@ void ObjectInformation::remove_global_variable(const char* name)
     int cmp = current_var.name.compare(name);
 
     if (cmp == 0) {
-  
+
       // Find the whole range:
       size_type first = cursor;
       while (first != 0 && this->global_variables[first - 1].name == name)
@@ -115,12 +115,12 @@ void ObjectInformation::remove_global_variable(const char* name)
       size_type last = cursor;
       while (last != size - 1 && this->global_variables[last + 1].name == name)
         last++;
-  
+
       // Remove the whole range:
       this->global_variables.erase(
         this->global_variables.begin() + first,
         this->global_variables.begin() + last + 1);
-  
+
       return;
     } else if (cmp < 0)
       first = cursor + 1;
index 6173971..bfebc40 100644 (file)
@@ -83,7 +83,7 @@ public:
    *
    * We need to efficiently find the function from any given instruction
    * address inside its range. This index is sorted by low_pc
-   * 
+   *
    * The entries are sorted by low_pc and a binary search can be used to look
    * them up. In order to have a better cache locality, we only keep the
    * information we need for the lookup in this vector. We could probably
index feef524..56c33d4 100644 (file)
@@ -224,7 +224,7 @@ XBT_TEST_SUITE("mc_page_store", "Page store");
 XBT_TEST_UNIT("base", test_mc_page_store, "Test adding/removing pages in the store")
 {
   using simgrid::mc::PageStore;
-  
+
   xbt_test_add("Init");
   std::size_t pagesize = (size_t) getpagesize();
   std::unique_ptr<PageStore> store
index bb0a85d..19c2e5e 100644 (file)
@@ -153,7 +153,7 @@ public:
       this->refresh_malloc_info();
     return this->heap_info.data();
   }
-  
+
   void clear_cache()
   {
     this->cache_flags_ = Process::cache_none;
index 7884740..3fbfe3e 100644 (file)
@@ -145,6 +145,6 @@ RegionSnapshot sparse_region(RegionType region_type,
   region.page_data(std::move(page_data));
   return region;
 }
-  
+
 }
 }
index cc135f4..8fd9e60 100644 (file)
@@ -210,7 +210,7 @@ public:
     page_numbers_.clear();
     privatized_regions_.clear();
   }
-  
+
   void flat_data(Buffer data)
   {
     storage_type_ = StorageType::Flat;
index 4256b56..36d4952 100644 (file)
@@ -335,6 +335,6 @@ Checker* createSafetyChecker(Session& session)
 {
   return new SafetyChecker(session);
 }
-  
+
 }
 }
index cc77840..e4fa6e4 100644 (file)
@@ -439,7 +439,7 @@ static std::vector<s_mc_snapshot_stack_t> take_snapshot_stacks(simgrid::mc::Snap
 static void snapshot_handle_ignore(simgrid::mc::Snapshot* snapshot)
 {
   xbt_assert(snapshot->process());
-  
+
   // Copy the memory:
   for (auto const& region : mc_model_checker->process().ignored_regions()) {
     s_mc_snapshot_ignored_data_t ignored_data;
@@ -612,7 +612,7 @@ void restore_snapshot_fds(simgrid::mc::Snapshot* snapshot)
   xbt_die("FD snapshot not implemented in client/server mode.");
 
   for (auto const& fd : snapshot->current_fds) {
-    
+
     int new_fd = open(fd.filename.c_str(), fd.flags);
     if (new_fd < 0)
       xbt_die("Could not reopen the file %s fo restoring the file descriptor", fd.filename.c_str());
index dcc9339..fb58628 100644 (file)
@@ -36,7 +36,7 @@ void TRACE_msg_task_create(msg_task_t task)
   static std::atomic_ullong counter{0};
   task->counter = counter++;
   task->category = nullptr;
-  
+
   if(MC_is_active())
     MC_ignore_heap(&(task->counter), sizeof(task->counter));
 
index e188b59..a5089f6 100644 (file)
@@ -15,7 +15,7 @@ SG_BEGIN_DECL()
  *
  *     \include simgrid.dtd
  *
- * Here is a small example of such a platform 
+ * Here is a small example of such a platform
  *
  *     \include msg/masterslave/deployment_masterslave.xml
  *
@@ -30,8 +30,8 @@ void MSG_launch_application(const char *file)
 /** \ingroup msg_simulation
  * \brief Registers the main function of a process in a global table.
  *
- * Registers a code function in a global table. 
- * This table is then used by #MSG_launch_application. 
+ * Registers a code function in a global table.
+ * This table is then used by #MSG_launch_application.
  * \param name the reference name of the function.
  * \param code the function (must have the same prototype than the main function of any C program: int ..(int argc, char *argv[]))
  */
index 1c3ea9b..1a62573 100644 (file)
@@ -25,7 +25,7 @@ SG_BEGIN_DECL()
  *
  *     \include simgrid.dtd
  *
- * Here is a small example of such a platform 
+ * Here is a small example of such a platform
  *
  *     \include small_platform.xml
  *
index 3e2eda2..77c1b3d 100644 (file)
@@ -124,13 +124,13 @@ msg_error_t MSG_process_sleep(double nb_sec)
   }
   catch(xbt_ex& e) {
     if (e.category == cancel_error) {
-      XBT_DEBUG("According to the JAVA API, a sleep call should only deal with HostFailureException, I'm lost."); 
+      XBT_DEBUG("According to the JAVA API, a sleep call should only deal with HostFailureException, I'm lost.");
       // adsein: MSG_TASK_CANCELED is assigned when someone kills the process that made the sleep, this is not
       // correct. For instance, when the node is turned off, the error should be MSG_HOST_FAILURE, which is by the way
       // and according to the JAVA document, the only exception that can be triggered by MSG_Process_sleep call.
       // To avoid possible impacts in the code, I just raised a host_failure exception for the moment in the JAVA code
       // and did not change anythings at the C level.
-      // See comment in the jmsg_process.c file, function JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_sleep(JNIEnv *env, jclass cls, jlong jmillis, jint jnanos) 
+      // See comment in the jmsg_process.c file, function JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_sleep(JNIEnv *env, jclass cls, jlong jmillis, jint jnanos)
       status = MSG_TASK_CANCELED;
     } else
       throw;
index edab20d..f8e8cd7 100644 (file)
@@ -20,7 +20,7 @@ int sg_storage_max_file_descriptors = 1024;
 
 /** @addtogroup m_host_management
  * (#msg_host_t) and the functions for managing it.
- *  
+ *
  *  A <em>location</em> (or <em>host</em>) is any possible place where  a process may run. Thus it may be represented
  *  as a <em>physical resource with computing capabilities</em>, some <em>mailboxes</em> to enable running process to
  *  communicate with remote ones, and some <em>private data</em> that can be only accessed by local process.
index 547e39c..c168cff 100644 (file)
@@ -183,14 +183,14 @@ void Comm::cancel()
 
 bool Comm::test() {
   xbt_assert(state_ == inited || state_ == started || state_ == finished);
-  
-  if (state_ == finished) 
+
+  if (state_ == finished)
     xbt_die("Don't call test on a finished comm.");
-  
+
   if (state_ == inited) {
     this->start();
   }
-  
+
   if(simcall_comm_test(pimpl_)){
     state_ = finished;
     pimpl_->unref();
index 98b4e6b..709276c 100644 (file)
@@ -74,14 +74,14 @@ std::cv_status ConditionVariable::wait_until(std::unique_lock<Mutex>& lock, doub
     timeout = timeout_time - now;
   return this->wait_for(lock, timeout);
 }
-  
+
 /**
  * Notify functions
  */
 void ConditionVariable::notify_one() {
    simcall_cond_signal(cond_);
 }
+
 void ConditionVariable::notify_all() {
   simcall_cond_broadcast(cond_);
 }
index a1cf532..8ee524a 100644 (file)
@@ -266,8 +266,8 @@ xbt_dict_t Host::mountedStoragesAsDict()
  */
 void Host::attachedStorages(std::vector<const char*>* storages)
 {
-  simgrid::simix::kernelImmediate([this, storages] { 
-     this->pimpl_->getAttachedStorageList(storages); 
+  simgrid::simix::kernelImmediate([this, storages] {
+     this->pimpl_->getAttachedStorageList(storages);
   });
 }
 
index cc41601..e5e368a 100644 (file)
@@ -50,7 +50,7 @@
 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 
 /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
- * if you want the limit (max/min) macros for int types. 
+ * if you want the limit (max/min) macros for int types.
  */
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS 1
@@ -67,7 +67,7 @@ typedef uint32_t flex_uint32_t;
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
+typedef unsigned char flex_uint8_t;
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 
@@ -193,7 +193,7 @@ extern FILE *dax_in, *dax_out;
 
     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
      *       access to the local variable yy_act. Since yyless() is a macro, it would break
-     *       existing scanners that call yyless() from OUTSIDE dax_lex. 
+     *       existing scanners that call yyless() from OUTSIDE dax_lex.
      *       One obvious solution it to make yy_act a global. I tried that, and saw
      *       a 5% performance hit in a non-dax_lineno scanner, because yy_act is
      *       normally declared as a register variable-- so it is not worth it.
@@ -212,7 +212,7 @@ extern FILE *dax_in, *dax_out;
                     if ( *p == '\n' )\
                         --dax_lineno;\
             }while(0)
-    
+
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
   do \
@@ -269,7 +269,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-    
+
   /* Whether to try to fill the input buffer when we reach the
    * end of it.
    */
@@ -1237,13 +1237,13 @@ static yyconst flex_int16_t yy_chk[2195] =
 /* Table of booleans, true if rule could match eol. */
 static yyconst flex_int32_t yy_rule_can_match_eol[141] =
     {   0,
-0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 
-    0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 
-    1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 
-    0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 
+0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,
+    0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1,
+    1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1,
     0,     };
 
 static yy_state_type yy_last_accepting_state;
@@ -1266,13 +1266,13 @@ char *dax_text;
  * FleXML is Copyright (C) 1999-2005 Kristoffer Rose.  All rights reserved.
  * FleXML is Copyright (C) 2003-2013 Martin Quinson.  All rights reserved.
  * (1.9.6).
- * 
+ *
  * There are two, intertwined parts to this program, part A and part B.
  *
  * Part A
  * ------
- * 
- * Some parts, here collectively called "Part A", are found in the 
+ *
+ * Some parts, here collectively called "Part A", are found in the
  * FleXML package.  They are Copyright (C) 1999-2005 Kristoffer Rose
  * and Copyright (C) 2003-2013 Martin Quinson. All rights reserved.
  *
@@ -1290,20 +1290,20 @@ char *dax_text;
  * Notice that these are explicit rights granted to you for files
  * generated by the FleXML system.  For your rights in connection with
  * the FleXML system itself please consult the GNU General Public License.
- * 
+ *
  * Part B
  * ------
- * 
- * The other parts, here collectively called "Part B", and which came 
- * from the DTD used by FleXML to generate this program, can be 
+ *
+ * The other parts, here collectively called "Part B", and which came
+ * from the DTD used by FleXML to generate this program, can be
  * distributed (or not, as the case may be) under the terms of whoever
- * wrote them, provided these terms respect and obey the two conditions 
+ * wrote them, provided these terms respect and obey the two conditions
  * above under the heading "Part A".
  *
  * The author of and contributors to FleXML specifically disclaim
- * any copyright interest in "Part B", unless "Part B" was written 
+ * any copyright interest in "Part B", unless "Part B" was written
  * by the author of or contributors to FleXML.
- * 
+ *
  */
 
 /* Version strings. */
@@ -1316,7 +1316,7 @@ const char dax__flexml_version[] = "1.9.6";
 #include <assert.h>
 #include <stdarg.h>
 #include <ctype.h>
-     
+
 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)
 # ifndef __STRICT_ANSI__
 #  include <io.h>
@@ -1325,7 +1325,7 @@ const char dax__flexml_version[] = "1.9.6";
 #else
 # include <unistd.h>
 #endif
-     
+
 #ifndef FLEXML_INDEXSTACKSIZE
 #define FLEXML_INDEXSTACKSIZE 1000
 #endif
@@ -1525,7 +1525,7 @@ static void pushbuffer(int p)
 {
     ck_ilimit();
     indexstack[inext++] = p;
-    indexstack[inext++] = bnext;    
+    indexstack[inext++] = bnext;
 }
 
 static int popbuffer(void)
@@ -1663,7 +1663,7 @@ extern int dax_wrap (void );
 #endif
 
 #ifndef YY_NO_UNPUT
-    
+
 #endif
 
 #ifndef yytext_ptr
@@ -1687,11 +1687,11 @@ static int input (void );
         static int yy_start_stack_ptr = 0;
         static int yy_start_stack_depth = 0;
         static int *yy_start_stack = NULL;
-    
+
     static void yy_push_state (int _new_state );
-    
+
     static void yy_pop_state (void );
-    
+
 /* Amount of stuff to slurp up with each read. */
 #ifndef YY_READ_BUF_SIZE
 #ifdef __ia64__
@@ -1799,7 +1799,7 @@ YY_DECL
   yy_state_type yy_current_state;
   char *yy_cp, *yy_bp;
   int yy_act;
-    
+
   if ( !(yy_init) )
     {
     (yy_init) = 1;
@@ -1939,7 +1939,7 @@ yy_find_action:
       yy_size_t yyl;
       for ( yyl = 0; yyl < dax_leng; ++yyl )
         if ( dax_text[yyl] == '\n' )
-             
+
     dax_lineno++;
 ;
       }
@@ -2004,7 +2004,7 @@ SKIP;
 case 11:
 /* rule 11 can match eol */
 YY_RULE_SETUP
-SET(ROOT_dax__adag); 
+SET(ROOT_dax__adag);
   YY_BREAK
 case 12:
 /* rule 12 can match eol */
@@ -3099,7 +3099,7 @@ static int yy_get_next_buffer (void)
 {
   yy_state_type yy_current_state;
   char *yy_cp;
-    
+
   yy_current_state = (yy_start);
 
   for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
@@ -3163,7 +3163,7 @@ static int yy_get_next_buffer (void)
 
 {
   int c;
-    
+
   *(yy_c_buf_p) = (yy_hold_char);
 
   if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -3225,7 +3225,7 @@ static int yy_get_next_buffer (void)
   (yy_hold_char) = *++(yy_c_buf_p);
 
   if ( c == '\n' )
-       
+
     dax_lineno++;
 ;
 
@@ -3235,12 +3235,12 @@ static int yy_get_next_buffer (void)
 
 /** Immediately switch to a different input stream.
  * @param input_file A readable stream.
- * 
+ *
  * @note This function does not reset the start condition to @c INITIAL .
  */
     void dax_restart  (FILE * input_file )
 {
-    
+
   if ( ! YY_CURRENT_BUFFER ){
         dax_ensure_buffer_stack ();
     YY_CURRENT_BUFFER_LVALUE =
@@ -3253,11 +3253,11 @@ static int yy_get_next_buffer (void)
 
 /** Switch to a different input buffer.
  * @param new_buffer The new input buffer.
- * 
+ *
  */
     void dax__switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 {
-    
+
   /* TODO. We should be able to replace this entire function body
    * with
    *    dax_pop_buffer_state();
@@ -3297,13 +3297,13 @@ static void dax__load_buffer_state  (void)
 /** Allocate and initialize an input buffer state.
  * @param file A readable stream.
  * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE.
- * 
+ *
  * @return the allocated buffer state.
  */
     YY_BUFFER_STATE dax__create_buffer  (FILE * file, int  size )
 {
   YY_BUFFER_STATE b;
-    
+
   b = (YY_BUFFER_STATE) dax_alloc(sizeof( struct yy_buffer_state )  );
   if ( ! b )
     YY_FATAL_ERROR( "out of dynamic memory in dax__create_buffer()" );
@@ -3326,11 +3326,11 @@ static void dax__load_buffer_state  (void)
 
 /** Destroy the buffer.
  * @param b a buffer created with dax__create_buffer()
- * 
+ *
  */
     void dax__delete_buffer (YY_BUFFER_STATE  b )
 {
-    
+
   if ( ! b )
     return;
 
@@ -3351,7 +3351,7 @@ static void dax__load_buffer_state  (void)
 
 {
   int oerrno = errno;
-    
+
   dax__flush_buffer(b );
 
   b->yy_input_file = file;
@@ -3367,13 +3367,13 @@ static void dax__load_buffer_state  (void)
     }
 
         b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-    
+
   errno = oerrno;
 }
 
 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * 
+ *
  */
     void dax__flush_buffer (YY_BUFFER_STATE  b )
 {
@@ -3402,7 +3402,7 @@ static void dax__load_buffer_state  (void)
  *  the current state. This function will allocate the stack
  *  if necessary.
  *  @param new_buffer The new state.
- *  
+ *
  */
 void dax_push_buffer_state (YY_BUFFER_STATE new_buffer )
 {
@@ -3432,7 +3432,7 @@ void dax_push_buffer_state (YY_BUFFER_STATE new_buffer )
 
 /** Removes and deletes the top of the stack, if present.
  *  The next element becomes the new top.
- *  
+ *
  */
 void dax_pop_buffer_state (void)
 {
@@ -3456,7 +3456,7 @@ void dax_pop_buffer_state (void)
 static void dax_ensure_buffer_stack (void)
 {
   yy_size_t num_to_alloc;
-    
+
   if (!(yy_buffer_stack)) {
 
     /* First allocation is just for 2 elements, since we don't know if this
@@ -3469,9 +3469,9 @@ static void dax_ensure_buffer_stack (void)
                 );
     if ( ! (yy_buffer_stack) )
       YY_FATAL_ERROR( "out of dynamic memory in dax_ensure_buffer_stack()" );
-                  
+
     memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-        
+
     (yy_buffer_stack_max) = num_to_alloc;
     (yy_buffer_stack_top) = 0;
     return;
@@ -3499,13 +3499,13 @@ static void dax_ensure_buffer_stack (void)
 /** Setup the input buffer state to scan directly from a user-specified character buffer.
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
- * 
- * @return the newly allocated buffer state object. 
+ *
+ * @return the newly allocated buffer state object.
  */
 YY_BUFFER_STATE dax__scan_buffer  (char * base, yy_size_t  size )
 {
   YY_BUFFER_STATE b;
-    
+
   if ( size < 2 ||
        base[size-2] != YY_END_OF_BUFFER_CHAR ||
        base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -3534,14 +3534,14 @@ YY_BUFFER_STATE dax__scan_buffer  (char * base, yy_size_t  size )
 /** Setup the input buffer state to scan a string. The next call to dax_lex() will
  * scan from a @e copy of @a str.
  * @param yystr a NUL-terminated string to scan
- * 
+ *
  * @return the newly allocated buffer state object.
  * @note If you want to scan bytes that may contain NUL values, then use
  *       dax__scan_bytes() instead.
  */
 YY_BUFFER_STATE dax__scan_string (yyconst char * yystr )
 {
-    
+
   return dax__scan_bytes(yystr,strlen(yystr) );
 }
 
@@ -3549,7 +3549,7 @@ YY_BUFFER_STATE dax__scan_string (yyconst char * yystr )
  * scan from a @e copy of @a bytes.
  * @param yybytes the byte buffer to scan
  * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
- * 
+ *
  * @return the newly allocated buffer state object.
  */
 YY_BUFFER_STATE dax__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len )
@@ -3558,7 +3558,7 @@ YY_BUFFER_STATE dax__scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_le
   char *buf;
   yy_size_t n;
   yy_size_t i;
-    
+
   /* Get memory for full buffer, including space for trailing EOB's. */
   n = _yybytes_len + 2;
   buf = (char *) dax_alloc(n  );
@@ -3644,16 +3644,16 @@ static void yy_fatal_error (yyconst char* msg )
 /* Accessor  methods (get/set functions) to struct members. */
 
 /** Get the current line number.
- * 
+ *
  */
 int dax_get_lineno  (void)
 {
-        
+
     return dax_lineno;
 }
 
 /** Get the input stream.
- * 
+ *
  */
 FILE *dax_get_in  (void)
 {
@@ -3661,7 +3661,7 @@ FILE *dax_get_in  (void)
 }
 
 /** Get the output stream.
- * 
+ *
  */
 FILE *dax_get_out  (void)
 {
@@ -3669,7 +3669,7 @@ FILE *dax_get_out  (void)
 }
 
 /** Get the length of the current token.
- * 
+ *
  */
 yy_size_t dax_get_leng  (void)
 {
@@ -3677,7 +3677,7 @@ yy_size_t dax_get_leng  (void)
 }
 
 /** Get the current token.
- * 
+ *
  */
 
 char *dax_get_text  (void)
@@ -3687,18 +3687,18 @@ char *dax_get_text  (void)
 
 /** Set the current line number.
  * @param _line_number line number
- * 
+ *
  */
 void dax_set_lineno (int  _line_number )
 {
-    
+
     dax_lineno = _line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
  * @param _in_str A readable stream.
- * 
+ *
  * @see dax__switch_to_buffer
  */
 void dax_set_in (FILE *  _in_str )
@@ -3729,7 +3729,7 @@ static int yy_init_globals (void)
 
     /* We do not touch dax_lineno unless the option is enabled. */
     dax_lineno =  1;
-    
+
     (yy_buffer_stack) = 0;
     (yy_buffer_stack_top) = 0;
     (yy_buffer_stack_max) = 0;
@@ -3759,7 +3759,7 @@ static int yy_init_globals (void)
 /* dax_lex_destroy is for both reentrant and non-reentrant scanners. */
 int dax_lex_destroy  (void)
 {
-    
+
     /* Pop the buffer stack, destroying each element. */
   while(YY_CURRENT_BUFFER){
     dax__delete_buffer(YY_CURRENT_BUFFER  );
@@ -3789,7 +3789,7 @@ int dax_lex_destroy  (void)
 #ifndef yytext_ptr
 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
 {
-    
+
   int i;
   for ( i = 0; i < n; ++i )
     s1[i] = s2[i];
@@ -3814,7 +3814,7 @@ void *dax_alloc (yy_size_t  size )
 
 void *dax_realloc  (void * ptr, yy_size_t  size )
 {
-    
+
   /* The cast to (char *) in the following accommodates both
    * implementations that use char* generic pointers, and those
    * that use void* generic pointers.  It works with the latter
index 5552c33..b300c56 100644 (file)
@@ -4,13 +4,13 @@
  * FleXML is Copyright (C) 1999-2005 Kristoffer Rose.  All rights reserved.
  * FleXML is Copyright (C) 2003-2013 Martin Quinson.  All rights reserved.
  * (1.9.6).
- * 
+ *
  * There are two, intertwined parts to this program, part A and part B.
  *
  * Part A
  * ------
- * 
- * Some parts, here collectively called "Part A", are found in the 
+ *
+ * Some parts, here collectively called "Part A", are found in the
  * FleXML package.  They are Copyright (C) 1999-2005 Kristoffer Rose
  * and Copyright (C) 2003-2013 Martin Quinson. All rights reserved.
  *
  * Notice that these are explicit rights granted to you for files
  * generated by the FleXML system.  For your rights in connection with
  * the FleXML system itself please consult the GNU General Public License.
- * 
+ *
  * Part B
  * ------
- * 
- * The other parts, here collectively called "Part B", and which came 
- * from the DTD used by FleXML to generate this program, can be 
+ *
+ * The other parts, here collectively called "Part B", and which came
+ * from the DTD used by FleXML to generate this program, can be
  * distributed (or not, as the case may be) under the terms of whoever
- * wrote them, provided these terms respect and obey the two conditions 
+ * wrote them, provided these terms respect and obey the two conditions
  * above under the heading "Part A".
  *
  * The author of and contributors to FleXML specifically disclaim
- * any copyright interest in "Part B", unless "Part B" was written 
+ * any copyright interest in "Part B", unless "Part B" was written
  * by the author of or contributors to FleXML.
- * 
+ *
  */
 
 #ifndef _FLEXML_dax_H
index eae376c..e642431 100644 (file)
@@ -154,7 +154,7 @@ static void dax_task_free(void *task)
 }
 
 /** @brief loads a DAX file describing a DAG
- * 
+ *
  * See https://confluence.pegasus.isi.edu/display/pegasus/WorkflowGenerator for more details.
  */
 xbt_dynar_t SD_daxload(const char *filename)
index 2fbb3d3..619fcb1 100644 (file)
@@ -23,7 +23,7 @@ static void dot_task_p_free(void *task) {
 }
 
 /** @brief loads a DOT file describing a DAG
- * 
+ *
  * See http://www.graphviz.org/doc/info/lang.html  for more details.
  * The size attribute of a node describes:
  *   - for a compute task: the amount of flops to execute
index e57a89d..8ea5cc1 100644 (file)
@@ -133,7 +133,7 @@ SD_task_t SD_task_create_comp_par_amdahl(const char *name, void *data, double fl
 
 /** @brief create a complex data redistribution task that can then be  auto-scheduled
  *
- * Auto-scheduling mean that the task can be used with SD_task_schedulev(). 
+ * Auto-scheduling mean that the task can be used with SD_task_schedulev().
  * This allows to specify the task costs at creation, and decouple them from the scheduling process where you just
  * specify which resource should communicate.
  *
index 8ddc525..ff40e0c 100644 (file)
@@ -468,11 +468,11 @@ void sg_config_init(int *argc, char **argv)
     xbt_cfg_register_string("smpi/lat-factor",
         "65472:11.6436;15424:3.48845;9376:2.59299;5776:2.18796;3484:1.88101;1426:1.61075;732:1.9503;257:1.95341;0:2.01467", nullptr, "Latency factors for smpi.");
     xbt_cfg_register_alias("smpi/lat-factor","smpi/lat_factor");
-    
+
     xbt_cfg_register_string("smpi/IB-penalty-factors", "0.965;0.925;1.35", nullptr,
         "Correction factor to communications using Infiniband model with contention (default value based on Stampede cluster profiling)");
     xbt_cfg_register_alias("smpi/IB-penalty-factors","smpi/IB_penalty_factors");
-    
+
 #if HAVE_SMPI
     xbt_cfg_register_double("smpi/host-speed", 20000.0, nullptr, "Speed of the host running the simulation (in flop/s). Used to bench the operations.");
     xbt_cfg_register_alias("smpi/host-speed","smpi/running_power");
index afef6c4..2c1ad74 100644 (file)
@@ -35,337 +35,337 @@ inline static R simcall(e_smx_simcall_t call, T const&... t)
   }
   return simgrid::simix::unmarshal<R>(self->simcall.result);
 }
-  
+
 inline static void simcall_BODY_process_kill(smx_actor_t process) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_process_kill(&SIMIX_process_self()->simcall, process);
     return simcall<void, smx_actor_t>(SIMCALL_PROCESS_KILL, process);
   }
-  
+
 inline static void simcall_BODY_process_killall(int reset_pid) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_process_killall(&SIMIX_process_self()->simcall, reset_pid);
     return simcall<void, int>(SIMCALL_PROCESS_KILLALL, reset_pid);
   }
-  
+
 inline static void simcall_BODY_process_cleanup(smx_actor_t process) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_process_cleanup(process);
     return simcall<void, smx_actor_t>(SIMCALL_PROCESS_CLEANUP, process);
   }
-  
+
 inline static void simcall_BODY_process_suspend(smx_actor_t process) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_process_suspend(&SIMIX_process_self()->simcall, process);
     return simcall<void, smx_actor_t>(SIMCALL_PROCESS_SUSPEND, process);
   }
-  
+
 inline static void simcall_BODY_process_resume(smx_actor_t process) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_process_resume(process);
     return simcall<void, smx_actor_t>(SIMCALL_PROCESS_RESUME, process);
   }
-  
+
 inline static void simcall_BODY_process_set_host(smx_actor_t process, sg_host_t dest) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_process_set_host(&SIMIX_process_self()->simcall, process, dest);
     return simcall<void, smx_actor_t, sg_host_t>(SIMCALL_PROCESS_SET_HOST, process, dest);
   }
-  
+
 inline static int simcall_BODY_process_is_suspended(smx_actor_t process) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_process_is_suspended(process);
     return simcall<int, smx_actor_t>(SIMCALL_PROCESS_IS_SUSPENDED, process);
   }
-  
+
 inline static int simcall_BODY_process_join(smx_actor_t process, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_process_join(&SIMIX_process_self()->simcall, process, timeout);
     return simcall<int, smx_actor_t, double>(SIMCALL_PROCESS_JOIN, process, timeout);
   }
-  
+
 inline static int simcall_BODY_process_sleep(double duration) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_process_sleep(&SIMIX_process_self()->simcall, duration);
     return simcall<int, double>(SIMCALL_PROCESS_SLEEP, duration);
   }
-  
+
 inline static smx_activity_t simcall_BODY_execution_start(const char* name, double flops_amount, double priority, double bound) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_execution_start(&SIMIX_process_self()->simcall, name, flops_amount, priority, bound);
     return simcall<smx_activity_t, const char*, double, double, double>(SIMCALL_EXECUTION_START, name, flops_amount, priority, bound);
   }
-  
+
 inline static smx_activity_t simcall_BODY_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_execution_parallel_start(name, host_nb, host_list, flops_amount, bytes_amount, amount, rate, timeout);
     return simcall<smx_activity_t, const char*, int, sg_host_t*, double*, double*, double, double, double>(SIMCALL_EXECUTION_PARALLEL_START, name, host_nb, host_list, flops_amount, bytes_amount, amount, rate, timeout);
   }
-  
+
 inline static void simcall_BODY_execution_cancel(smx_activity_t execution) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_execution_cancel(execution);
     return simcall<void, smx_activity_t>(SIMCALL_EXECUTION_CANCEL, execution);
   }
-  
+
 inline static void simcall_BODY_execution_set_priority(smx_activity_t execution, double priority) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_execution_set_priority(execution, priority);
     return simcall<void, smx_activity_t, double>(SIMCALL_EXECUTION_SET_PRIORITY, execution, priority);
   }
-  
+
 inline static void simcall_BODY_execution_set_bound(smx_activity_t execution, double bound) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_execution_set_bound(execution, bound);
     return simcall<void, smx_activity_t, double>(SIMCALL_EXECUTION_SET_BOUND, execution, bound);
   }
-  
+
 inline static int simcall_BODY_execution_wait(smx_activity_t execution) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_execution_wait(&SIMIX_process_self()->simcall, execution);
     return simcall<int, smx_activity_t>(SIMCALL_EXECUTION_WAIT, execution);
   }
-  
+
 inline static void simcall_BODY_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_process_on_exit(process, fun, data);
     return simcall<void, smx_actor_t, int_f_pvoid_pvoid_t, void*>(SIMCALL_PROCESS_ON_EXIT, process, fun, data);
   }
-  
+
 inline static void simcall_BODY_process_auto_restart_set(smx_actor_t process, int auto_restart) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_process_auto_restart_set(process, auto_restart);
     return simcall<void, smx_actor_t, int>(SIMCALL_PROCESS_AUTO_RESTART_SET, process, auto_restart);
   }
-  
+
 inline static smx_actor_t simcall_BODY_process_restart(smx_actor_t process) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_process_restart(&SIMIX_process_self()->simcall, process);
     return simcall<smx_actor_t, smx_actor_t>(SIMCALL_PROCESS_RESTART, process);
   }
-  
+
 inline static smx_activity_t simcall_BODY_comm_iprobe(smx_mailbox_t mbox, int type, int src, int tag, simix_match_func_t match_fun, void* data) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_iprobe(&SIMIX_process_self()->simcall, mbox, type, src, tag, match_fun, data);
     return simcall<smx_activity_t, smx_mailbox_t, int, int, int, simix_match_func_t, void*>(SIMCALL_COMM_IPROBE, mbox, type, src, tag, match_fun, data);
   }
-  
+
 inline static void simcall_BODY_comm_send(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_send(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
     return simcall<void, smx_actor_t, smx_mailbox_t, double, double, void*, size_t, simix_match_func_t, simix_copy_data_func_t, void*, double>(SIMCALL_COMM_SEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
   }
-  
+
 inline static smx_activity_t simcall_BODY_comm_isend(smx_actor_t sender, smx_mailbox_t mbox, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_isend(&SIMIX_process_self()->simcall, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
     return simcall<smx_activity_t, smx_actor_t, smx_mailbox_t, double, double, void*, size_t, simix_match_func_t, simix_clean_func_t, simix_copy_data_func_t, void*, int>(SIMCALL_COMM_ISEND, sender, mbox, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
   }
-  
+
 inline static void simcall_BODY_comm_recv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_recv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
     return simcall<void, smx_actor_t, smx_mailbox_t, void*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double, double>(SIMCALL_COMM_RECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
   }
-  
+
 inline static smx_activity_t simcall_BODY_comm_irecv(smx_actor_t receiver, smx_mailbox_t mbox, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_irecv(&SIMIX_process_self()->simcall, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
     return simcall<smx_activity_t, smx_actor_t, smx_mailbox_t, void*, size_t*, simix_match_func_t, simix_copy_data_func_t, void*, double>(SIMCALL_COMM_IRECV, receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
   }
-  
+
 inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_waitany(&SIMIX_process_self()->simcall, comms, timeout);
     return simcall<int, xbt_dynar_t, double>(SIMCALL_COMM_WAITANY, comms, timeout);
   }
-  
+
 inline static void simcall_BODY_comm_wait(smx_activity_t comm, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_wait(&SIMIX_process_self()->simcall, comm, timeout);
     return simcall<void, smx_activity_t, double>(SIMCALL_COMM_WAIT, comm, timeout);
   }
-  
+
 inline static int simcall_BODY_comm_test(smx_activity_t comm) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_test(&SIMIX_process_self()->simcall, comm);
     return simcall<int, smx_activity_t>(SIMCALL_COMM_TEST, comm);
   }
-  
+
 inline static int simcall_BODY_comm_testany(smx_activity_t* comms, size_t count) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_comm_testany(&SIMIX_process_self()->simcall, comms, count);
     return simcall<int, smx_activity_t*, size_t>(SIMCALL_COMM_TESTANY, comms, count);
   }
-  
+
 inline static smx_mutex_t simcall_BODY_mutex_init() {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_mutex_init(&SIMIX_process_self()->simcall);
     return simcall<smx_mutex_t>(SIMCALL_MUTEX_INIT);
   }
-  
+
 inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_mutex_lock(&SIMIX_process_self()->simcall, mutex);
     return simcall<void, smx_mutex_t>(SIMCALL_MUTEX_LOCK, mutex);
   }
-  
+
 inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_mutex_trylock(&SIMIX_process_self()->simcall, mutex);
     return simcall<int, smx_mutex_t>(SIMCALL_MUTEX_TRYLOCK, mutex);
   }
-  
+
 inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_mutex_unlock(&SIMIX_process_self()->simcall, mutex);
     return simcall<void, smx_mutex_t>(SIMCALL_MUTEX_UNLOCK, mutex);
   }
-  
+
 inline static smx_cond_t simcall_BODY_cond_init() {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_cond_init();
     return simcall<smx_cond_t>(SIMCALL_COND_INIT);
   }
-  
+
 inline static void simcall_BODY_cond_signal(smx_cond_t cond) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_cond_signal(cond);
     return simcall<void, smx_cond_t>(SIMCALL_COND_SIGNAL, cond);
   }
-  
+
 inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_cond_wait(&SIMIX_process_self()->simcall, cond, mutex);
     return simcall<void, smx_cond_t, smx_mutex_t>(SIMCALL_COND_WAIT, cond, mutex);
   }
-  
+
 inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_cond_wait_timeout(&SIMIX_process_self()->simcall, cond, mutex, timeout);
     return simcall<void, smx_cond_t, smx_mutex_t, double>(SIMCALL_COND_WAIT_TIMEOUT, cond, mutex, timeout);
   }
-  
+
 inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_cond_broadcast(cond);
     return simcall<void, smx_cond_t>(SIMCALL_COND_BROADCAST, cond);
   }
-  
+
 inline static smx_sem_t simcall_BODY_sem_init(unsigned int capacity) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_sem_init(capacity);
     return simcall<smx_sem_t, unsigned int>(SIMCALL_SEM_INIT, capacity);
   }
-  
+
 inline static void simcall_BODY_sem_release(smx_sem_t sem) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_sem_release(&SIMIX_process_self()->simcall, sem);
     return simcall<void, smx_sem_t>(SIMCALL_SEM_RELEASE, sem);
   }
-  
+
 inline static int simcall_BODY_sem_would_block(smx_sem_t sem) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_sem_would_block(&SIMIX_process_self()->simcall, sem);
     return simcall<int, smx_sem_t>(SIMCALL_SEM_WOULD_BLOCK, sem);
   }
-  
+
 inline static void simcall_BODY_sem_acquire(smx_sem_t sem) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_sem_acquire(&SIMIX_process_self()->simcall, sem);
     return simcall<void, smx_sem_t>(SIMCALL_SEM_ACQUIRE, sem);
   }
-  
+
 inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_sem_acquire_timeout(&SIMIX_process_self()->simcall, sem, timeout);
     return simcall<void, smx_sem_t, double>(SIMCALL_SEM_ACQUIRE_TIMEOUT, sem, timeout);
   }
-  
+
 inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_sem_get_capacity(&SIMIX_process_self()->simcall, sem);
     return simcall<int, smx_sem_t>(SIMCALL_SEM_GET_CAPACITY, sem);
   }
-  
+
 inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_read(&SIMIX_process_self()->simcall, fd, size, host);
     return simcall<sg_size_t, smx_file_t, sg_size_t, sg_host_t>(SIMCALL_FILE_READ, fd, size, host);
   }
-  
+
 inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_write(&SIMIX_process_self()->simcall, fd, size, host);
     return simcall<sg_size_t, smx_file_t, sg_size_t, sg_host_t>(SIMCALL_FILE_WRITE, fd, size, host);
   }
-  
+
 inline static smx_file_t simcall_BODY_file_open(const char* fullpath, sg_host_t host) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_open(&SIMIX_process_self()->simcall, fullpath, host);
     return simcall<smx_file_t, const char*, sg_host_t>(SIMCALL_FILE_OPEN, fullpath, host);
   }
-  
+
 inline static int simcall_BODY_file_close(smx_file_t fd, sg_host_t host) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_close(&SIMIX_process_self()->simcall, fd, host);
     return simcall<int, smx_file_t, sg_host_t>(SIMCALL_FILE_CLOSE, fd, host);
   }
-  
+
 inline static int simcall_BODY_file_unlink(smx_file_t fd, sg_host_t host) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_file_unlink(fd, host);
     return simcall<int, smx_file_t, sg_host_t>(SIMCALL_FILE_UNLINK, fd, host);
   }
-  
+
 inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_get_size(&SIMIX_process_self()->simcall, fd);
     return simcall<sg_size_t, smx_file_t>(SIMCALL_FILE_GET_SIZE, fd);
   }
-  
+
 inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_tell(&SIMIX_process_self()->simcall, fd);
     return simcall<sg_size_t, smx_file_t>(SIMCALL_FILE_TELL, fd);
   }
-  
+
 inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_seek(&SIMIX_process_self()->simcall, fd, offset, origin);
     return simcall<int, smx_file_t, sg_offset_t, int>(SIMCALL_FILE_SEEK, fd, offset, origin);
   }
-  
+
 inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_get_info(&SIMIX_process_self()->simcall, fd);
     return simcall<xbt_dynar_t, smx_file_t>(SIMCALL_FILE_GET_INFO, fd);
   }
-  
+
 inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_file_move(&SIMIX_process_self()->simcall, fd, fullpath);
     return simcall<int, smx_file_t, const char*>(SIMCALL_FILE_MOVE, fd, fullpath);
   }
-  
+
 inline static int simcall_BODY_mc_random(int min, int max) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_mc_random(&SIMIX_process_self()->simcall, min, max);
     return simcall<int, int, int>(SIMCALL_MC_RANDOM, min, max);
   }
-  
+
 inline static void simcall_BODY_set_category(smx_activity_t synchro, const char* category) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_set_category(synchro, category);
     return simcall<void, smx_activity_t, const char*>(SIMCALL_SET_CATEGORY, synchro, category);
   }
-  
+
 inline static void simcall_BODY_run_kernel(std::function<void()> const* code) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_run_kernel(code);
     return simcall<void, std::function<void()> const*>(SIMCALL_RUN_KERNEL, code);
   }
-  
+
 inline static void simcall_BODY_run_blocking(std::function<void()> const* code) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) SIMIX_run_blocking(code);
index c18c10e..e19ac64 100644 (file)
@@ -85,7 +85,7 @@ const char* simcall_names[] = {
 
 /** @private
  * @brief (in kernel mode) unpack the simcall and activate the handler
- * 
+ *
  * This function is generated from src/simix/simcalls.in
  */
 void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {
index b9911d1..5906e9d 100644 (file)
 #include <sys/mman.h>
 #endif
 
-#ifdef __MINGW32__ 
-#define _aligned_malloc __mingw_aligned_malloc 
-#define _aligned_free  __mingw_aligned_free 
-#endif //MINGW
+#ifdef __MINGW32__
+#define _aligned_malloc __mingw_aligned_malloc
+#define _aligned_free  __mingw_aligned_free
+#endif /*MINGW*/
 
 #if HAVE_VALGRIND_H
 # include <valgrind/valgrind.h>
@@ -271,7 +271,7 @@ int SIMIX_context_get_nthreads() {
  * \param nb_threads the number of threads to use
  */
 void SIMIX_context_set_nthreads(int nb_threads) {
-  if (nb_threads<=0) {  
+  if (nb_threads<=0) {
      nb_threads = xbt_os_get_numcores();
      XBT_INFO("Auto-setting contexts/nthreads to %d",nb_threads);
   }
index 6f02d13..6511f0c 100644 (file)
@@ -38,7 +38,7 @@
 #include "src/mc/remote/Client.hpp"
 #include "src/mc/remote/mc_protocol.h"
 #include <stdlib.h>
-#endif 
+#endif
 
 #include "src/mc/mc_record.h"
 
index 528ceda..1fbcb08 100644 (file)
@@ -280,7 +280,7 @@ smx_activity_t SIMIX_comm_iprobe(smx_actor_t dst_proc, smx_mailbox_t mbox, int t
   } else{
     this_comm = new simgrid::kernel::activity::CommImpl(SIMIX_COMM_RECEIVE);
     smx_type = SIMIX_COMM_SEND;
-  } 
+  }
   smx_activity_t other_synchro=nullptr;
   if (mbox->permanent_receiver != nullptr && not mbox->done_comm_queue.empty()) {
     XBT_DEBUG("first check in the permanent recv mailbox, to see if we already got something");
@@ -410,7 +410,7 @@ void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t synchros, d
 
   if (MC_is_active() || MC_record_replay_is_active()){
     if (timeout > 0.0)
-      xbt_die("Timeout not implemented for waitany in the model-checker"); 
+      xbt_die("Timeout not implemented for waitany in the model-checker");
     int idx = SIMCALL_GET_MC_VALUE(simcall);
     synchro = xbt_dynar_get_as(synchros, idx, smx_activity_t);
     synchro->simcalls.push_back(simcall);
@@ -419,7 +419,7 @@ void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t synchros, d
     SIMIX_comm_finish(synchro);
     return;
   }
-  
+
   if (timeout < 0.0){
     simcall->timer = NULL;
   } else {
@@ -429,7 +429,7 @@ void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t synchros, d
       SIMIX_simcall_answer(simcall);
     });
   }
-  
+
   xbt_dynar_foreach(synchros, cursor, synchro){
     /* associate this simcall to the the synchro */
     synchro->simcalls.push_back(simcall);
index 2095a4c..c063d08 100644 (file)
@@ -157,7 +157,7 @@ bool MutexImpl::try_lock(smx_actor_t issuer)
 
 /** Unlock a mutex for a process
  *
- * Unlocks the mutex and gives it to a process waiting for it. 
+ * Unlocks the mutex and gives it to a process waiting for it.
  * If the unlocker is not the owner of the mutex nothing happens.
  * If there are no process waiting, it sets the mutex as free.
  */
@@ -293,14 +293,14 @@ static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout,
   synchro = SIMIX_synchro_wait(issuer->host, timeout);
   synchro->simcalls.push_front(simcall);
   issuer->waiting_synchro = synchro;
-  xbt_swag_insert(simcall->issuer, cond->sleeping);   
+  xbt_swag_insert(simcall->issuer, cond->sleeping);
   XBT_OUT();
 }
 
 /**
  * \brief Signalizes a condition.
  *
- * Signalizes a condition and wakes up a sleeping process. 
+ * Signalizes a condition and wakes up a sleeping process.
  * If there are no process sleeping, no action is done.
  * \param cond A condition
  */
@@ -313,7 +313,7 @@ void SIMIX_cond_signal(smx_cond_t cond)
 
   XBT_DEBUG("Signal condition %p", cond);
 
-  /* If there are processes waiting for the condition choose one and try 
+  /* If there are processes waiting for the condition choose one and try
      to make it acquire the mutex */
   if ((proc = (smx_actor_t) xbt_swag_extract(cond->sleeping))) {
 
@@ -496,7 +496,7 @@ void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem)
 void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout)
 {
   XBT_IN("(%p)",simcall);
-  _SIMIX_sem_wait(sem, timeout, simcall->issuer, simcall);  
+  _SIMIX_sem_wait(sem, timeout, simcall->issuer, simcall);
   XBT_OUT();
 }
 int simcall_HANDLER_sem_would_block(smx_simcall_t simcall, smx_sem_t sem) {
index 786b0af..724373c 100644 (file)
@@ -101,7 +101,7 @@ static int is_2dmesh(int num, int *i, int *j)
  * comm: communication
  * Descrp: Function realizes the allgather operation using the 2dmesh
  * algorithm. Allgather ommunication occurs first in the x dimension then in
- * the y dimension.  The communication in each dimension follows 
+ * the y dimension.  The communication in each dimension follows
  * "simple"
  * Auther: Ahmad Faraj
 ****************************************************************************/
@@ -144,7 +144,7 @@ Coll_allgather_2dmesh::allgather(void *send_buff, int send_count, MPI_Datatype
 
   req_ptr = req;
 
-  // do local allgather/local copy 
+  // do local allgather/local copy
   recv_offset = rank * block_size;
   Datatype::copy(send_buff, send_count, send_type, (char *)recv_buff + recv_offset,
                  recv_count, recv_type);
index b97d22a..58927c9 100644 (file)
@@ -137,12 +137,12 @@ int Coll_allgather_3dmesh::allgather(void *send_buff, int send_count,
 
   req_ptr = req;
 
-  // do local allgather/local copy 
+  // do local allgather/local copy
   recv_offset = rank * block_size;
   Datatype::copy(send_buff, send_count, send_type, (char *)recv_buff + recv_offset,
                  recv_count, recv_type);
 
-  // do rowwise comm 
+  // do rowwise comm
   for (i = 0; i < Y; i++) {
     src = i + my_row_base;
     if (src == rank)
index ed4744e..c4785d2 100644 (file)
@@ -33,9 +33,9 @@ Coll_allgather_NTSLR_NB::allgather(void *sbuf, int scount, MPI_Datatype stype,
 
   // irregular case use default MPI fucntions
   if (scount * sextent != rcount * rextent) {
-    XBT_WARN("MPI_allgather_NTSLR_NB use default MPI_allgather.");  
+    XBT_WARN("MPI_allgather_NTSLR_NB use default MPI_allgather.");
     Coll_allgather_default::allgather(sbuf, scount, stype, rbuf, rcount, rtype, comm);
-    return MPI_SUCCESS;    
+    return MPI_SUCCESS;
   }
 
   // topo non-specific
index 72ecd14..a4a4b5e 100644 (file)
@@ -30,9 +30,9 @@ Coll_allgather_NTSLR::allgather(void *sbuf, int scount, MPI_Datatype stype,
 
   // irregular case use default MPI fucntions
   if (scount * sextent != rcount * rextent) {
-    XBT_WARN("MPI_allgather_NTSLR use default MPI_allgather.");  
+    XBT_WARN("MPI_allgather_NTSLR use default MPI_allgather.");
     Coll_allgather_default::allgather(sbuf, scount, stype, rbuf, rcount, rtype, comm);
-    return MPI_SUCCESS;    
+    return MPI_SUCCESS;
   }
 
   // topo non-specific
index 366f74f..91eb582 100644 (file)
@@ -47,7 +47,7 @@ int Coll_allgather_SMP_NTS::allgather(void *sbuf, int scount,
   if (comm_size <= num_core) {
     XBT_WARN("MPI_allgather_SMP_NTS use default MPI_allgather.");
     Coll_allgather_default::allgather(sbuf, scount, stype, rbuf, rcount, rtype, comm);
-    return MPI_SUCCESS;    
+    return MPI_SUCCESS;
   }
 
   // the last SMP node may have fewer number of running processes than all others
@@ -78,7 +78,7 @@ int Coll_allgather_SMP_NTS::allgather(void *sbuf, int scount,
 
   }
 
-  // INTER-SMP-ALLGATHER 
+  // INTER-SMP-ALLGATHER
   // Every root of each SMP node post INTER-Sendrecv, then do INTRA-Bcast for each receiving message
   // Use logical ring algorithm
 
index f2fd8b8..f9b53fe 100644 (file)
@@ -65,7 +65,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *         algorithm.
  * Auther: MPICH
  * Comment: Original bruck algorithm from MPICH is slightly modified by
- *          Ahmad Faraj.  
+ *          Ahmad Faraj.
  ****************************************************************************/
 
 namespace simgrid{
@@ -92,7 +92,7 @@ int Coll_allgather_bruck::allgather(void *send_buff, int send_count,
   char *send_ptr = (char *) send_buff;
   char *recv_ptr = (char *) recv_buff;
 
-  // get size of the communicator, followed by rank 
+  // get size of the communicator, followed by rank
   num_procs = comm->size();
   rank = comm->rank();
 
index 740c911..e30e455 100644 (file)
@@ -44,7 +44,7 @@ int Coll_allgather_mvapich2_smp::allgather(void *sendbuf,int sendcnt, MPI_Dataty
 {
     int rank, size;
     int local_rank, local_size;
-    int leader_comm_size = 0; 
+    int leader_comm_size = 0;
     int mpi_errno = MPI_SUCCESS;
     MPI_Aint recvtype_extent = 0;  /* Datatype extent */
     MPI_Comm shmem_comm, leader_comm;
@@ -55,7 +55,7 @@ int Coll_allgather_mvapich2_smp::allgather(void *sendbuf,int sendcnt, MPI_Dataty
 
   if (not comm->is_uniform() || not comm->is_blocked())
     THROWF(arg_error,0, "allgather MVAPICH2 smp algorithm can't be used with irregular deployment. Please insure that processes deployed on the same node are contiguous and that each node has the same number of processes");
-  
+
     if (recvcnt == 0) {
         return MPI_SUCCESS;
     }
@@ -65,7 +65,7 @@ int Coll_allgather_mvapich2_smp::allgather(void *sendbuf,int sendcnt, MPI_Dataty
 
     /* extract the rank,size information for the intra-node communicator */
     recvtype_extent=recvtype->get_extent();
-    
+
     shmem_comm = comm->get_intra_comm();
     local_rank = shmem_comm->rank();
     local_size = shmem_comm->size();
@@ -82,20 +82,20 @@ int Coll_allgather_mvapich2_smp::allgather(void *sendbuf,int sendcnt, MPI_Dataty
     /*If there is just one node, after gather itself,
      * root has all the data and it can do bcast*/
     if(local_rank == 0) {
-        mpi_errno = Colls::gather(sendbuf, sendcnt,sendtype, 
-                                    (void*)((char*)recvbuf + (rank * recvcnt * recvtype_extent)), 
+        mpi_errno = Colls::gather(sendbuf, sendcnt,sendtype,
+                                    (void*)((char*)recvbuf + (rank * recvcnt * recvtype_extent)),
                                      recvcnt, recvtype,
                                      0, shmem_comm);
     } else {
-        /*Since in allgather all the processes could have 
+        /*Since in allgather all the processes could have
          * its own data in place*/
         if(sendbuf == MPI_IN_PLACE) {
-            mpi_errno = Colls::gather((void*)((char*)recvbuf + (rank * recvcnt * recvtype_extent)), 
-                                         recvcnt , recvtype, 
+            mpi_errno = Colls::gather((void*)((char*)recvbuf + (rank * recvcnt * recvtype_extent)),
+                                         recvcnt , recvtype,
                                          recvbuf, recvcnt, recvtype,
                                          0, shmem_comm);
         } else {
-            mpi_errno = Colls::gather(sendbuf, sendcnt,sendtype, 
+            mpi_errno = Colls::gather(sendbuf, sendcnt,sendtype,
                                          recvbuf, recvcnt, recvtype,
                                          0, shmem_comm);
         }
@@ -130,7 +130,7 @@ int Coll_allgather_mvapich2_smp::allgather(void *sendbuf,int sendcnt, MPI_Dataty
 
             mpi_errno = Colls::allgatherv(sendbuf,
                                        (recvcnt*local_size),
-                                       recvtype, 
+                                       recvtype,
                                        recvbuf, recvcnts,
                                        displs, recvtype,
                                        leader_comm);
@@ -138,10 +138,10 @@ int Coll_allgather_mvapich2_smp::allgather(void *sendbuf,int sendcnt, MPI_Dataty
             xbt_free(recvcnts);
         } else {
         void* sendtmpbuf=((char*)recvbuf)+recvtype->get_extent()*(recvcnt*local_size)*leader_comm->rank();
-        
-          
 
-            mpi_errno = Coll_allgather_mpich::allgather(sendtmpbuf, 
+
+
+            mpi_errno = Coll_allgather_mpich::allgather(sendtmpbuf,
                                                (recvcnt*local_size),
                                                recvtype,
                                                recvbuf, (recvcnt*local_size), recvtype,
index cb350c6..4f2707e 100644 (file)
  * Returns:      MPI_SUCCESS or error code
  *
  * Description:  Neighbor Exchange algorithm for allgather.
- *               Described by Chen et.al. in 
- *               "Performance Evaluation of Allgather Algorithms on 
+ *               Described by Chen et.al. in
+ *               "Performance Evaluation of Allgather Algorithms on
  *                Terascale Linux Cluster with Fast Ethernet",
- *               Proceedings of the Eighth International Conference on 
+ *               Proceedings of the Eighth International Conference on
  *               High-Performance Computing inn Asia-Pacific Region
  *               (HPCASIA'05), 2005
- * 
+ *
  *               Rank r exchanges message with one of its neighbors and
  *               forwards the data further in the next step.
  *
  *               No additional memory requirements.
- * 
+ *
  * Limitations:  Algorithm works only on even number of processes.
  *               For odd number of processes we switch to ring algorithm.
- * 
+ *
  * Example on 6 nodes:
  *  Initial state
  *    #     0      1      2      3      4      5
  *         [4]    [4]    [4]    [4]    [4]    [4]
  *         [5]    [5]    [5]    [5]    [5]    [5]
  */
+
  #include "../colls_private.h"
 
 namespace simgrid{
 namespace smpi{
 
-int 
+int
 Coll_allgather_ompi_neighborexchange::allgather(void *sbuf, int scount,
                                                  MPI_Datatype sdtype,
                                                  void* rbuf, int rcount,
@@ -88,7 +88,7 @@ Coll_allgather_ompi_neighborexchange::allgather(void *sbuf, int scount,
 
    if (size % 2) {
       XBT_DEBUG(
-                   "coll:tuned:allgather_intra_neighborexchange WARNING: odd size %d, switching to ring algorithm", 
+                   "coll:tuned:allgather_intra_neighborexchange WARNING: odd size %d, switching to ring algorithm",
                    size);
       return Coll_allgather_ring::allgather(sbuf, scount, sdtype,
                                                   rbuf, rcount, rdtype,
@@ -112,7 +112,7 @@ Coll_allgather_ompi_neighborexchange::allgather(void *sbuf, int scount,
    if (MPI_IN_PLACE != sbuf) {
       tmpsend = (char*) sbuf;
       Datatype::copy (tmpsend, scount, sdtype, tmprecv, rcount, rdtype);
-   } 
+   }
 
    /* Determine neighbors, order in which blocks will arrive, etc. */
    even_rank = not(rank % 2);
@@ -134,8 +134,8 @@ Coll_allgather_ompi_neighborexchange::allgather(void *sbuf, int scount,
 
    /* Communication loop:
       - First step is special: exchange a single block with neighbor[0].
-      - Rest of the steps: 
-        update recv_data_from according to offset, and 
+      - Rest of the steps:
+        update recv_data_from according to offset, and
         exchange two blocks with appropriate neighbor.
         the send location becomes previous receve location.
    */
@@ -157,15 +157,15 @@ Coll_allgather_ompi_neighborexchange::allgather(void *sbuf, int scount,
 
    for (i = 1; i < (size / 2); i++) {
       const int i_parity = i % 2;
-      recv_data_from[i_parity] = 
+      recv_data_from[i_parity] =
          (recv_data_from[i_parity] + offset_at_step[i_parity] + size) % size;
 
       tmprecv = (char*)rbuf + recv_data_from[i_parity] * rcount * rext;
       tmpsend = (char*)rbuf + send_data_from * rcount * rext;
-      
+
       /* Sendreceive */
-      Request::sendrecv(tmpsend, 2 * rcount, rdtype, 
-                                     neighbor[i_parity], 
+      Request::sendrecv(tmpsend, 2 * rcount, rdtype,
+                                     neighbor[i_parity],
                                      COLL_TAG_ALLGATHER,
                                      tmprecv, 2 * rcount, rdtype,
                                      neighbor[i_parity],
index 44dc246..1c028e8 100644 (file)
@@ -32,7 +32,7 @@ Coll_allgather_rdb::allgather(void *sbuf, int send_count,
   char *send_ptr = (char *) sbuf;
   char *recv_ptr = (char *) rbuf;
 
-  // get size of the communicator, followed by rank 
+  // get size of the communicator, followed by rank
   unsigned int num_procs = comm->size();
   unsigned int rank = comm->rank();
 
index 2311385..1c50923 100644 (file)
@@ -28,7 +28,7 @@ Coll_allgather_rhv::allgather(void *sbuf, int send_count,
   unsigned int mask;
   int curr_count;
 
-  // get size of the communicator, followed by rank 
+  // get size of the communicator, followed by rank
   unsigned int num_procs = comm->size();
 
   if((num_procs&(num_procs-1)))
@@ -45,10 +45,10 @@ Coll_allgather_rhv::allgather(void *sbuf, int send_count,
   recv_chunk = r_extent * recv_count;
 
   if (send_chunk != recv_chunk) {
-    XBT_WARN("MPI_allgather_rhv use default MPI_allgather.");  
+    XBT_WARN("MPI_allgather_rhv use default MPI_allgather.");
     Coll_allgather_default::allgather(sbuf, send_count, send_type, rbuf, recv_count,
                               recv_type, comm);
-    return MPI_SUCCESS;        
+    return MPI_SUCCESS;
   }
 
   // compute starting offset location to perform local copy
index 030733b..42dad10 100644 (file)
@@ -67,7 +67,7 @@ int Coll_allgather_smp_simple::allgather(void *send_buf, int scount,
 
   }
 
-  // INTER-SMP-ALLGATHER 
+  // INTER-SMP-ALLGATHER
   // Every root of each SMP node post INTER-Sendrecv, then do INTRA-Bcast for each receiving message
 
 
@@ -86,7 +86,7 @@ int Coll_allgather_smp_simple::allgather(void *send_buf, int scount,
       src = ((inter_rank - i + inter_comm_size) % inter_comm_size) * num_core;
       //send_offset = (rank * sextent * scount);
       recv_offset = (src * sextent * scount);
-      //      Request::sendrecv((recv_buf+send_offset), (scount * num_core), stype, dst, tag, 
+      //      Request::sendrecv((recv_buf+send_offset), (scount * num_core), stype, dst, tag,
       //             (recv_buf+recv_offset), (rcount * num_core), rtype, src, tag, comm, &status);
       //MPIC_Isend((recv_buf+send_offset), (scount * num_core), stype, dst, tag, comm, req_ptr++);
       *(req_ptr++) = Request::irecv(((char *) recv_buf + recv_offset), (rcount * num_core), rtype,
@@ -98,7 +98,7 @@ int Coll_allgather_smp_simple::allgather(void *send_buf, int scount,
       //src = ((inter_rank-i+inter_comm_size)%inter_comm_size) * num_core;
       send_offset = (rank * sextent * scount);
       //recv_offset = (src * sextent * scount);
-      //      Request::sendrecv((recv_buf+send_offset), (scount * num_core), stype, dst, tag, 
+      //      Request::sendrecv((recv_buf+send_offset), (scount * num_core), stype, dst, tag,
       //             (recv_buf+recv_offset), (rcount * num_core), rtype, src, tag, comm, &status);
       *(req_ptr++) = Request::isend(((char *) recv_buf + send_offset), (scount * num_core), stype,
                 dst, tag, comm);
index ff68e9d..3874163 100644 (file)
@@ -33,7 +33,7 @@
  *                in Multiport Message-Passing Systems"
  * Note:         Unlike in case of allgather implementation, we relay on
  *               indexed datatype to select buffers appropriately.
- *               The only additional memory requirement is for creation of 
+ *               The only additional memory requirement is for creation of
  *               temporary datatypes.
  * Example on 7 nodes (memory lay out need not be in-order)
  *   Initial set up:
@@ -55,7 +55,7 @@
  *         [ ]    [ ]    [ ]    [ ]    [5]    [5]    [ ]
  *         [ ]    [ ]    [ ]    [ ]    [ ]    [6]    [6]
  *   Step 1: send message to (rank - 2^1), receive message from (rank + 2^1).
- *           message contains all blocks from (rank) .. (rank + 2^2) with 
+ *           message contains all blocks from (rank) .. (rank + 2^2) with
  *           wrap around.
  *    #     0      1      2      3      4      5      6
  *         [0]    [ ]    [ ]    [ ]    [0]    [0]    [0]
@@ -66,7 +66,7 @@
  *         [ ]    [ ]    [5]    [5]    [5]    [5]    [ ]
  *         [ ]    [ ]    [ ]    [6]    [6]    [6]    [6]
  *   Step 2: send message to (rank - 2^2), receive message from (rank + 2^2).
- *           message size is "all remaining blocks" 
+ *           message size is "all remaining blocks"
  *    #     0      1      2      3      4      5      6
  *         [0]    [0]    [0]    [0]    [0]    [0]    [0]
  *         [1]    [1]    [1]    [1]    [1]    [1]    [1]
@@ -83,7 +83,7 @@ namespace smpi{
 int Coll_allgatherv_ompi_bruck::allgatherv(void *sbuf, int scount,
                                            MPI_Datatype sdtype,
                                            void *rbuf, int *rcounts,
-                                           int *rdispls, 
+                                           int *rdispls,
                                            MPI_Datatype rdtype,
                                            MPI_Comm comm)
 {
@@ -100,31 +100,31 @@ int Coll_allgatherv_ompi_bruck::allgatherv(void *sbuf, int scount,
 
    XBT_DEBUG(
                 "coll:tuned:allgather_ompi_bruck rank %d", rank);
-   
+
    sdtype->extent(&slb, &sext);
 
    rdtype->extent(&rlb, &rext);
 
    /* Initialization step:
-      - if send buffer is not MPI_IN_PLACE, copy send buffer to block rank of 
+      - if send buffer is not MPI_IN_PLACE, copy send buffer to block rank of
         the receive buffer.
    */
    tmprecv = (char*) rbuf + rdispls[rank] * rext;
    if (MPI_IN_PLACE != sbuf) {
       tmpsend = (char*) sbuf;
-      Datatype::copy(tmpsend, scount, sdtype, 
+      Datatype::copy(tmpsend, scount, sdtype,
                             tmprecv, rcounts[rank], rdtype);
    }
-   
+
    /* Communication step:
       At every step i, rank r:
       - doubles the distance
       - sends message with blockcount blocks, (rbuf[rank] .. rbuf[rank + 2^i])
         to rank (r - distance)
-      - receives message of blockcount blocks, 
-        (rbuf[r + distance] ... rbuf[(r+distance) + 2^i]) from 
+      - receives message of blockcount blocks,
+        (rbuf[r + distance] ... rbuf[(r+distance) + 2^i]) from
         rank (r + distance)
-      - blockcount doubles until the last step when only the remaining data is 
+      - blockcount doubles until the last step when only the remaining data is
       exchanged.
    */
    new_rcounts = (int*) calloc(4*size, sizeof(int));
@@ -139,7 +139,7 @@ int Coll_allgatherv_ompi_bruck::allgatherv(void *sbuf, int scount,
 
       if (distance <= (size >> 1)) {
          blockcount = distance;
-      } else { 
+      } else {
          blockcount = size - distance;
       }
 
@@ -152,7 +152,7 @@ int Coll_allgatherv_ompi_bruck::allgatherv(void *sbuf, int scount,
           new_rcounts[i] = rcounts[tmp_rrank];
           new_rdispls[i] = rdispls[tmp_rrank];
       }
-      Datatype::create_indexed(blockcount, new_scounts, new_sdispls, 
+      Datatype::create_indexed(blockcount, new_scounts, new_sdispls,
                                     rdtype, &new_sdtype);
       Datatype::create_indexed(blockcount, new_rcounts, new_rdispls,
                                     rdtype, &new_rdtype);
index 3a4b71d..e88c188 100644 (file)
  * Accepts:      Same arguments as MPI_Allgatherv
  * Returns:      MPI_SUCCESS or error code
  *
- * Description:  Neighbor Exchange algorithm for allgather adapted for 
+ * Description:  Neighbor Exchange algorithm for allgather adapted for
  *               allgatherv.
- *               Described by Chen et.al. in 
- *               "Performance Evaluation of Allgather Algorithms on 
+ *               Described by Chen et.al. in
+ *               "Performance Evaluation of Allgather Algorithms on
  *                Terascale Linux Cluster with Fast Ethernet",
- *               Proceedings of the Eighth International Conference on 
+ *               Proceedings of the Eighth International Conference on
  *               High-Performance Computing inn Asia-Pacific Region
  *               (HPCASIA'05), 2005
- * 
+ *
  *               Rank r exchanges message with one of its neighbors and
  *               forwards the data further in the next step.
  *
  *               No additional memory requirements.
- * 
+ *
  * Limitations:  Algorithm works only on even number of processes.
  *               For odd number of processes we switch to ring algorithm.
- * 
+ *
  * Example on 6 nodes:
  *  Initial state
  *    #     0      1      2      3      4      5
  *         [4]    [4]    [4]    [4]    [4]    [4]
  *         [5]    [5]    [5]    [5]    [5]    [5]
  */
+
  #include "../colls_private.h"
+
 namespace simgrid{
 namespace smpi{
 
-int 
+int
 Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
                                                   MPI_Datatype sdtype,
                                                   void* rbuf, int *rcounts, int *rdispls,
@@ -78,7 +78,7 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
     int line = -1;
     int rank, size;
     int neighbor[2], offset_at_step[2], recv_data_from[2], send_data_from;
-  
+
     int i, even_rank;
     int err = 0;
     ptrdiff_t slb, rlb, sext, rext;
@@ -90,10 +90,10 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
 
     if (size % 2) {
         XBT_DEBUG(
-                     "coll:tuned:allgatherv_ompi_neighborexchange WARNING: odd size %d, switching to ring algorithm", 
+                     "coll:tuned:allgatherv_ompi_neighborexchange WARNING: odd size %d, switching to ring algorithm",
                      size);
         return Coll_allgatherv_ring::allgatherv(sbuf, scount, sdtype,
-                                                     rbuf, rcounts, 
+                                                     rbuf, rcounts,
                                                      rdispls, rdtype,
                                                      comm);
     }
@@ -108,16 +108,16 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
     if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
 
     /* Initialization step:
-       - if send buffer is not MPI_IN_PLACE, copy send buffer to 
+       - if send buffer is not MPI_IN_PLACE, copy send buffer to
        the appropriate block of receive buffer
     */
     tmprecv = (char*) rbuf + rdispls[rank] * rext;
     if (MPI_IN_PLACE != sbuf) {
         tmpsend = (char*) sbuf;
-        err = Datatype::copy(tmpsend, scount, sdtype, 
+        err = Datatype::copy(tmpsend, scount, sdtype,
                               tmprecv, rcounts[rank], rdtype);
         if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl;  }
-    } 
+    }
 
     /* Determine neighbors, order in which blocks will arrive, etc. */
     even_rank = !(rank % 2);
@@ -139,8 +139,8 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
 
     /* Communication loop:
        - First step is special: exchange a single block with neighbor[0].
-       - Rest of the steps: 
-       update recv_data_from according to offset, and 
+       - Rest of the steps:
+       update recv_data_from according to offset, and
        exchange two blocks with appropriate neighbor.
        the send location becomes previous receve location.
        Note, we need to create indexed datatype to send and receive these
@@ -148,16 +148,16 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
     */
     tmprecv = (char*)rbuf + rdispls[neighbor[0]] * rext;
     tmpsend = (char*)rbuf + rdispls[rank] * rext;
-    Request::sendrecv(tmpsend, rcounts[rank], rdtype, 
+    Request::sendrecv(tmpsend, rcounts[rank], rdtype,
                                    neighbor[0], COLL_TAG_ALLGATHERV,
-                                   tmprecv, rcounts[neighbor[0]], rdtype, 
+                                   tmprecv, rcounts[neighbor[0]], rdtype,
                                    neighbor[0], COLL_TAG_ALLGATHERV,
                                    comm, MPI_STATUS_IGNORE);
 
 
 
-  
-   
+
+
     /* Determine initial sending counts and displacements*/
     if (even_rank) {
         send_data_from = rank;
@@ -169,7 +169,7 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
         MPI_Datatype new_rdtype, new_sdtype;
         int new_scounts[2], new_sdispls[2], new_rcounts[2], new_rdispls[2];
         const int i_parity = i % 2;
-        recv_data_from[i_parity] = 
+        recv_data_from[i_parity] =
             (recv_data_from[i_parity] + offset_at_step[i_parity] + size) % size;
 
         /* Create new indexed types for sending and receiving.
@@ -177,12 +177,12 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
            We are receiving data from ranks (recv_data_from[i_parity]) and
            (recv_data_from[i_parity]+1).
         */
-        
+
         new_scounts[0] = rcounts[send_data_from];
         new_scounts[1] = rcounts[(send_data_from + 1)];
         new_sdispls[0] = rdispls[send_data_from];
         new_sdispls[1] = rdispls[(send_data_from + 1)];
-        err = Datatype::create_indexed(2, new_scounts, new_sdispls, rdtype, 
+        err = Datatype::create_indexed(2, new_scounts, new_sdispls, rdtype,
                                       &new_sdtype);
         if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
         new_sdtype->commit();
@@ -191,14 +191,14 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
         new_rcounts[1] = rcounts[(recv_data_from[i_parity] + 1)];
         new_rdispls[0] = rdispls[recv_data_from[i_parity]];
         new_rdispls[1] = rdispls[(recv_data_from[i_parity] + 1)];
-        err = Datatype::create_indexed(2, new_rcounts, new_rdispls, rdtype, 
+        err = Datatype::create_indexed(2, new_rcounts, new_rdispls, rdtype,
                                       &new_rdtype);
         if (MPI_SUCCESS != err) { line = __LINE__; goto err_hndl; }
         new_rdtype->commit();
-      
+
         tmprecv = (char*)rbuf;
         tmpsend = (char*)rbuf;
-      
+
         /* Sendreceive */
         Request::sendrecv(tmpsend, 1, new_sdtype, neighbor[i_parity],
                                        COLL_TAG_ALLGATHERV,
@@ -207,7 +207,7 @@ Coll_allgatherv_ompi_neighborexchange::allgatherv(void *sbuf, int scount,
                                        comm, MPI_STATUS_IGNORE);
 
         send_data_from = recv_data_from[i_parity];
-      
+
         Datatype::unref(new_sdtype);
         Datatype::unref(new_rdtype);
     }
index ee91331..8f4e17e 100644 (file)
@@ -94,7 +94,7 @@ Coll_allgatherv_ring::allgatherv(void *send_buff, int send_count,
   for (i = 1; i < num_procs; i++) {
     src = (rank - i + num_procs) % num_procs;
     dst = (rank + i) % num_procs;
-    
+
     Request::sendrecv(sendptr, send_count, send_type, dst, tag,
                  recvptr + recv_disps[src] * extent, recv_counts[src], recv_type,
                  src, tag, comm, &status);
index 1b9f5af..c9e10ab 100644 (file)
@@ -6,8 +6,8 @@
 
 #include "../colls_private.h"
 
-/* IMPLEMENTED BY PITCH PATARASUK 
-   Non-topoloty-specific all-reduce operation designed bandwidth optimally 
+/* IMPLEMENTED BY PITCH PATARASUK
+   Non-topoloty-specific all-reduce operation designed bandwidth optimally
    Bug fixing by Xin Yuan, 04/04/2008
 */
 
@@ -41,10 +41,10 @@ Coll_allreduce_lr::allreduce(void *sbuf, void *rbuf, int rcount,
   if (rcount < size) {
     XBT_WARN("MPI_allreduce_lr use default MPI_allreduce.");
     Coll_allreduce_default::allreduce(sbuf, rbuf, rcount, dtype, op, comm);
-    return MPI_SUCCESS; 
+    return MPI_SUCCESS;
   }
 
-  /* when communication size is not divisible by number of process: 
+  /* when communication size is not divisible by number of process:
      call the native implementation for the remain chunk at the end of the operation */
   if (rcount % size != 0) {
     remainder = rcount % size;
@@ -62,7 +62,7 @@ Coll_allreduce_lr::allreduce(void *sbuf, void *rbuf, int rcount,
   /* our ALL-REDUCE implementation
      1. copy (partial of)send_buf to recv_buf
      2. use logical ring reduce-scatter
-     3. use logical ring all-gather 
+     3. use logical ring all-gather
    */
 
   // copy partial data
@@ -95,7 +95,7 @@ Coll_allreduce_lr::allreduce(void *sbuf, void *rbuf, int rcount,
                  ((rank + size - 1) % size), tag + i, comm, &status);
   }
 
-  /* when communication size is not divisible by number of process: 
+  /* when communication size is not divisible by number of process:
      call the native implementation for the remain chunk at the end of the operation */
   if (remainder_flag) {
     return Colls::allreduce((char *) sbuf + remainder_offset,
index c20f819..730307b 100644 (file)
@@ -52,8 +52,8 @@ extern int (*MV2_Allreduce_intra_function)( void *sendbuf,
     int count,
     MPI_Datatype datatype,
     MPI_Op op, MPI_Comm comm);
-    
-    
+
+
 namespace simgrid{
 namespace smpi{
 static  int MPIR_Allreduce_reduce_p2p_MV2( void *sendbuf,
@@ -76,7 +76,7 @@ static  int MPIR_Allreduce_reduce_shmem_MV2( void *sendbuf,
   return MPI_SUCCESS;
 }
 
-    
+
 /* general two level allreduce helper function */
 int Coll_allreduce_mvapich2_two_level::allreduce(void *sendbuf,
                              void *recvbuf,
@@ -95,11 +95,11 @@ int Coll_allreduce_mvapich2_two_level::allreduce(void *sendbuf,
       MV2_Allreduce_intra_function = Coll_allreduce_mpich::allreduce;
     if(MV2_Allreducection==NULL)
       MV2_Allreducection = Coll_allreduce_rdb::allreduce;
-    
+
     if(comm->get_leaders_comm()==MPI_COMM_NULL){
       comm->init_smp();
     }
-  
+
     if (count == 0) {
         return MPI_SUCCESS;
     }
@@ -122,7 +122,7 @@ int Coll_allreduce_mvapich2_two_level::allreduce(void *sendbuf,
 
     /* Doing the shared memory gather and reduction by the leader */
     if (local_rank == 0) {
-        if ((MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_shmem_MV2) || 
+        if ((MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_shmem_MV2) ||
               (MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_p2p_MV2) ) {
         mpi_errno =
         MV2_Allreduce_intra_function(sendbuf, recvbuf, count, datatype,
@@ -151,7 +151,7 @@ int Coll_allreduce_mvapich2_two_level::allreduce(void *sendbuf,
         }
     } else {
         /* insert the first reduce here */
-        if ((MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_shmem_MV2) || 
+        if ((MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_shmem_MV2) ||
               (MV2_Allreduce_intra_function == &MPIR_Allreduce_reduce_p2p_MV2) ) {
         mpi_errno =
         MV2_Allreduce_intra_function(sendbuf, recvbuf, count, datatype,
index f4f2357..2736daf 100644 (file)
  *   Accepts:        Same as MPI_Allreduce(), segment size
  *   Returns:        MPI_SUCCESS or error code
  *
- *   Description:    Implements pipelined ring algorithm for allreduce: 
+ *   Description:    Implements pipelined ring algorithm for allreduce:
  *                   user supplies suggested segment size for the pipelining of
  *                   reduce operation.
- *                   The segment size determines the number of phases, np, for 
- *                   the algorithm execution.  
- *                   The message is automatically divided into blocks of 
+ *                   The segment size determines the number of phases, np, for
+ *                   the algorithm execution.
+ *                   The message is automatically divided into blocks of
  *                   approximately  (count / (np * segcount)) elements.
- *                   At the end of reduction phase, allgather like step is 
+ *                   At the end of reduction phase, allgather like step is
  *                   executed.
  *                   Algorithm requires (np + 1)*(N - 1) steps.
  *
- *   Limitations:    The algorithm DOES NOT preserve order of operations so it 
+ *   Limitations:    The algorithm DOES NOT preserve order of operations so it
  *                   can be used only for commutative operations.
- *                   In addition, algorithm cannot work if the total size is 
+ *                   In addition, algorithm cannot work if the total size is
  *                   less than size * segment size.
  *         Example on 3 nodes with 2 phases
  *         Initial state
- *   #      0              1             2 
+ *   #      0              1             2
  *        [00a]          [10a]         [20a]
  *        [00b]          [10b]         [20b]
  *        [01a]          [11a]         [21a]
@@ -88,9 +88,9 @@
  *        [02b]          [12b]         [22b]
  *
  *        COMPUTATION PHASE 0 (a)
- *         Step 0: rank r sends block ra to rank (r+1) and receives bloc (r-1)a 
+ *         Step 0: rank r sends block ra to rank (r+1) and receives bloc (r-1)a
  *                 from rank (r-1) [with wraparound].
- *    #     0              1             2  
+ *    #     0              1             2
  *        [00a]        [00a+10a]       [20a]
  *        [00b]          [10b]         [20b]
  *        [01a]          [11a]       [11a+21a]
  *      [22a+02a]        [12a]         [22a]
  *        [02b]          [12b]         [22b]
  *
- *         Step 1: rank r sends block (r-1)a to rank (r+1) and receives bloc 
+ *         Step 1: rank r sends block (r-1)a to rank (r+1) and receives bloc
  *                 (r-2)a from rank (r-1) [with wraparound].
- *    #     0              1             2  
+ *    #     0              1             2
  *        [00a]        [00a+10a]   [00a+10a+20a]
  *        [00b]          [10b]         [20b]
  *    [11a+21a+01a]      [11a]       [11a+21a]
  *        [01b]          [11b]         [21b]
  *      [22a+02a]    [22a+02a+12a]     [22a]
- *        [02b]          [12b]         [22b] 
+ *        [02b]          [12b]         [22b]
  *
  *        COMPUTATION PHASE 1 (b)
- *         Step 0: rank r sends block rb to rank (r+1) and receives bloc (r-1)b 
+ *         Step 0: rank r sends block rb to rank (r+1) and receives bloc (r-1)b
  *                 from rank (r-1) [with wraparound].
- *    #     0              1             2  
+ *    #     0              1             2
  *        [00a]        [00a+10a]       [20a]
  *        [00b]        [00b+10b]       [20b]
  *        [01a]          [11a]       [11a+21a]
  *      [22a+02a]        [12a]         [22a]
  *      [22b+02b]        [12b]         [22b]
  *
- *         Step 1: rank r sends block (r-1)b to rank (r+1) and receives bloc 
+ *         Step 1: rank r sends block (r-1)b to rank (r+1) and receives bloc
  *                 (r-2)b from rank (r-1) [with wraparound].
- *    #     0              1             2  
+ *    #     0              1             2
  *        [00a]        [00a+10a]   [00a+10a+20a]
  *        [00b]          [10b]     [0bb+10b+20b]
  *    [11a+21a+01a]      [11a]       [11a+21a]
  *    [11b+21b+01b]      [11b]         [21b]
  *      [22a+02a]    [22a+02a+12a]     [22a]
- *        [02b]      [22b+01b+12b]     [22b] 
+ *        [02b]      [22b+01b+12b]     [22b]
+ *
  *
- *         
  *        DISTRIBUTION PHASE: ring ALLGATHER with ranks shifted by 1 (same as
  *         in regular ring algorithm.
  *
  */
+
 #define COLL_TUNED_COMPUTED_SEGCOUNT(SEGSIZE, TYPELNG, SEGCOUNT)        \
     if( ((SEGSIZE) >= (TYPELNG)) &&                                     \
         ((SEGSIZE) < ((TYPELNG) * (SEGCOUNT))) ) {                      \
         if( residual > ((TYPELNG) >> 1) )                               \
             (SEGCOUNT)++;                                               \
     }                                                                   \
-    
+
 #define COLL_TUNED_COMPUTE_BLOCKCOUNT( COUNT, NUM_BLOCKS, SPLIT_INDEX,       \
                                        EARLY_BLOCK_COUNT, LATE_BLOCK_COUNT ) \
     EARLY_BLOCK_COUNT = LATE_BLOCK_COUNT = COUNT / NUM_BLOCKS;               \
 
 namespace simgrid{
 namespace smpi{
-int 
+int
 Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
                                                MPI_Datatype dtype,
                                                MPI_Op op,
-                                               MPI_Comm comm) 
+                                               MPI_Comm comm)
 {
    int ret = MPI_SUCCESS;
    int line;
    int k, recv_from, send_to;
-   int early_blockcount, late_blockcount, split_rank; 
+   int early_blockcount, late_blockcount, split_rank;
    int segcount, max_segcount;
    int num_phases, phase;
    int block_count;
@@ -191,7 +191,7 @@ Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
       }
       return MPI_SUCCESS;
    }
-   
+
    /* Determine segment count based on the suggested segment size */
    extent = dtype->get_extent();
    if (MPI_SUCCESS != ret) { line = __LINE__; goto error_hndl; }
@@ -205,27 +205,27 @@ Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
    /* Special case for count less than size * segcount - use regular ring */
    if (count < size * segcount) {
       XBT_DEBUG( "coll:tuned:allreduce_ring_segmented rank %d/%d, count %d, switching to regular ring", rank, size, count);
-      return (Coll_allreduce_lr::allreduce(sbuf, rbuf, count, dtype, op, 
+      return (Coll_allreduce_lr::allreduce(sbuf, rbuf, count, dtype, op,
                                                    comm));
    }
 
    /* Determine the number of phases of the algorithm */
    num_phases = count / (size * segcount);
-   if ((count % (size * segcount) >= size) && 
+   if ((count % (size * segcount) >= size) &&
        (count % (size * segcount) > ((size * segcount) / 2))) {
       num_phases++;
    }
 
-   /* Determine the number of elements per block and corresponding 
+   /* Determine the number of elements per block and corresponding
       block sizes.
       The blocks are divided into "early" and "late" ones:
-      blocks 0 .. (split_rank - 1) are "early" and 
+      blocks 0 .. (split_rank - 1) are "early" and
       blocks (split_rank) .. (size - 1) are "late".
       Early blocks are at most 1 element larger than the late ones.
       Note, these blocks will be split into num_phases segments,
       out of the largest one will have max_segcount elements.
     */
-   COLL_TUNED_COMPUTE_BLOCKCOUNT( count, size, split_rank, 
+   COLL_TUNED_COMPUTE_BLOCKCOUNT( count, size, split_rank,
                                   early_blockcount, late_blockcount )
    COLL_TUNED_COMPUTE_BLOCKCOUNT( early_blockcount, num_phases, inbi,
                                   max_segcount, k)
@@ -250,7 +250,7 @@ Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
       ptrdiff_t phase_offset;
       int early_phase_segcount, late_phase_segcount, split_phase, phase_count;
 
-      /* 
+      /*
          For each of the remote nodes:
          - post irecv for block (r-1)
          - send block (r)
@@ -269,7 +269,7 @@ Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
       */
       send_to = (rank + 1) % size;
       recv_from = (rank + size - 1) % size;
-      
+
       inbi = 0;
       /* Initialize first receive from the neighbor on the left */
       reqs[inbi] = Request::irecv(inbuf[inbi], max_segcount, dtype, recv_from,
@@ -277,8 +277,8 @@ Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
       /* Send first block (my block) to the neighbor on the right:
          - compute my block and phase offset
          - send data */
-      block_offset = ((rank < split_rank)? 
-                      (rank * early_blockcount) : 
+      block_offset = ((rank < split_rank)?
+                      (rank * early_blockcount) :
                       (rank * late_blockcount + split_rank));
       block_count = ((rank < split_rank)? early_blockcount : late_blockcount);
       COLL_TUNED_COMPUTE_BLOCKCOUNT(block_count, num_phases, split_phase,
@@ -286,39 +286,39 @@ Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
       phase_count = ((phase < split_phase)?
                      (early_phase_segcount) : (late_phase_segcount));
       phase_offset = ((phase < split_phase)?
-                      (phase * early_phase_segcount) : 
+                      (phase * early_phase_segcount) :
                       (phase * late_phase_segcount + split_phase));
       tmpsend = ((char*)rbuf) + (block_offset + phase_offset) * extent;
       Request::send(tmpsend, phase_count, dtype, send_to,
                               666, comm);
-      
+
       for (k = 2; k < size; k++) {
          const int prevblock = (rank + size - k + 1) % size;
-         
+
          inbi = inbi ^ 0x1;
-         
+
          /* Post irecv for the current block */
          reqs[inbi] = Request::irecv(inbuf[inbi], max_segcount, dtype, recv_from,
                                666, comm);
          if (MPI_SUCCESS != ret) { line = __LINE__; goto error_hndl; }
-         
+
          /* Wait on previous block to arrive */
          Request::wait(&reqs[inbi ^ 0x1], MPI_STATUS_IGNORE);
-         
+
          /* Apply operation on previous block: result goes to rbuf
             rbuf[prevblock] = inbuf[inbi ^ 0x1] (op) rbuf[prevblock]
          */
          block_offset = ((prevblock < split_rank)?
                          (prevblock * early_blockcount) :
                          (prevblock * late_blockcount + split_rank));
-         block_count = ((prevblock < split_rank)? 
+         block_count = ((prevblock < split_rank)?
                         early_blockcount : late_blockcount);
          COLL_TUNED_COMPUTE_BLOCKCOUNT(block_count, num_phases, split_phase,
                                        early_phase_segcount, late_phase_segcount)
          phase_count = ((phase < split_phase)?
                         (early_phase_segcount) : (late_phase_segcount));
          phase_offset = ((phase < split_phase)?
-                         (phase * early_phase_segcount) : 
+                         (phase * early_phase_segcount) :
                          (phase * late_phase_segcount + split_phase));
          tmprecv = ((char*)rbuf) + (block_offset + phase_offset) * extent;
          if(op!=MPI_OP_NULL) op->apply( inbuf[inbi ^ 0x1], tmprecv, &phase_count, dtype);
@@ -326,25 +326,25 @@ Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
          Request::send(tmprecv, phase_count, dtype, send_to,
                               666, comm);
       }
-      
+
       /* Wait on the last block to arrive */
       Request::wait(&reqs[inbi], MPI_STATUS_IGNORE);
 
-      
-      /* Apply operation on the last block (from neighbor (rank + 1) 
+
+      /* Apply operation on the last block (from neighbor (rank + 1)
          rbuf[rank+1] = inbuf[inbi] (op) rbuf[rank + 1] */
       recv_from = (rank + 1) % size;
       block_offset = ((recv_from < split_rank)?
                       (recv_from * early_blockcount) :
                       (recv_from * late_blockcount + split_rank));
-      block_count = ((recv_from < split_rank)? 
+      block_count = ((recv_from < split_rank)?
                      early_blockcount : late_blockcount);
       COLL_TUNED_COMPUTE_BLOCKCOUNT(block_count, num_phases, split_phase,
                                     early_phase_segcount, late_phase_segcount)
       phase_count = ((phase < split_phase)?
                      (early_phase_segcount) : (late_phase_segcount));
       phase_offset = ((phase < split_phase)?
-                      (phase * early_phase_segcount) : 
+                      (phase * early_phase_segcount) :
                       (phase * late_phase_segcount + split_phase));
       tmprecv = ((char*)rbuf) + (block_offset + phase_offset) * extent;
       if(op!=MPI_OP_NULL) op->apply( inbuf[inbi], tmprecv, &phase_count, dtype);
@@ -356,15 +356,15 @@ Coll_allreduce_ompi_ring_segmented::allreduce(void *sbuf, void *rbuf, int count,
    for (k = 0; k < size - 1; k++) {
       const int recv_data_from = (rank + size - k) % size;
       const int send_data_from = (rank + 1 + size - k) % size;
-      const int send_block_offset = 
+      const int send_block_offset =
          ((send_data_from < split_rank)?
           (send_data_from * early_blockcount) :
           (send_data_from * late_blockcount + split_rank));
-      const int recv_block_offset = 
+      const int recv_block_offset =
          ((recv_data_from < split_rank)?
           (recv_data_from * early_blockcount) :
           (recv_data_from * late_blockcount + split_rank));
-      block_count = ((send_data_from < split_rank)? 
+      block_count = ((send_data_from < split_rank)?
                      early_blockcount : late_blockcount);
 
       tmprecv = (char*)rbuf + recv_block_offset * extent;
index 43a65f1..9cfbf1a 100644 (file)
@@ -39,10 +39,10 @@ int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
   // processes of rank < 2*rem send their data to
   // (rank+1). These even-numbered processes no longer
   // participate in the algorithm until the very end. The
-  // remaining processes form a nice power-of-two. 
+  // remaining processes form a nice power-of-two.
 
   if (rank < 2 * rem) {
-    // even       
+    // even
     if (rank % 2 == 0) {
 
       Request::send(rbuff, count, dtype, rank + 1, tag, comm);
@@ -59,12 +59,12 @@ int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
       // the operation is commutative or not.
        if(op!=MPI_OP_NULL) op->apply( tmp_buf, rbuff, &count, dtype);
 
-      // change the rank 
+      // change the rank
       newrank = rank / 2;
     }
   }
 
-  else                          // rank >= 2 * rem 
+  else                          // rank >= 2 * rem
     newrank = rank - rem;
 
   // If op is user-defined or count is less than pof2, use
@@ -74,12 +74,12 @@ int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
   // datatypes on one process and derived on another as long as
   // the type maps are the same. Breaking up derived
   // datatypes to do the reduce-scatter is tricky, therefore
-  // using recursive doubling in that case.) 
+  // using recursive doubling in that case.)
 
   if (newrank != -1) {
     // do a reduce-scatter followed by allgather. for the
     // reduce-scatter, calculate the count that each process receives
-    // and the displacement within the buffer 
+    // and the displacement within the buffer
 
     cnts = (int *) xbt_malloc(pof2 * sizeof(int));
     disps = (int *) xbt_malloc(pof2 * sizeof(int));
@@ -97,7 +97,7 @@ int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
     last_idx = pof2;
     while (mask < pof2) {
       newdst = newrank ^ mask;
-      // find real rank of dest 
+      // find real rank of dest
       dst = (newdst < rem) ? newdst * 2 + 1 : newdst + rem;
 
       send_cnt = recv_cnt = 0;
@@ -115,31 +115,31 @@ int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
           recv_cnt += cnts[i];
       }
 
-      // Send data from recvbuf. Recv into tmp_buf 
+      // Send data from recvbuf. Recv into tmp_buf
       Request::sendrecv((char *) rbuff + disps[send_idx] * extent, send_cnt,
                    dtype, dst, tag,
                    (char *) tmp_buf + disps[recv_idx] * extent, recv_cnt,
                    dtype, dst, tag, comm, &status);
 
       // tmp_buf contains data received in this step.
-      // recvbuf contains data accumulated so far 
+      // recvbuf contains data accumulated so far
 
       // This algorithm is used only for predefined ops
       // and predefined ops are always commutative.
       if(op!=MPI_OP_NULL) op->apply( (char *) tmp_buf + disps[recv_idx] * extent,
                         (char *) rbuff + disps[recv_idx] * extent, &recv_cnt, dtype);
 
-      // update send_idx for next iteration 
+      // update send_idx for next iteration
       send_idx = recv_idx;
       mask <<= 1;
 
       // update last_idx, but not in last iteration because the value
-      // is needed in the allgather step below. 
+      // is needed in the allgather step below.
       if (mask < pof2)
         last_idx = recv_idx + pof2 / mask;
     }
 
-    // now do the allgather 
+    // now do the allgather
 
     mask >>= 1;
     while (mask > 0) {
@@ -149,7 +149,7 @@ int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
 
       send_cnt = recv_cnt = 0;
       if (newrank < newdst) {
-        // update last_idx except on first iteration 
+        // update last_idx except on first iteration
         if (mask != pof2 / 2)
           last_idx = last_idx + pof2 / (mask * 2);
 
@@ -186,9 +186,9 @@ int Coll_allreduce_rab_rdb::allreduce(void *sbuff, void *rbuff, int count,
   // participate above.
 
   if (rank < 2 * rem) {
-    if (rank % 2)               // odd 
+    if (rank % 2)               // odd
       Request::send(rbuff, count, dtype, rank - 1, tag, comm);
-    else                        // even 
+    else                        // even
       Request::recv(rbuff, count, dtype, rank + 1, tag, comm, &status);
   }
 
index 4b99a24..8f26894 100644 (file)
@@ -63,7 +63,7 @@ int Coll_allreduce_rab1::allreduce(void *sbuff, void *rbuff,
       if(op!=MPI_OP_NULL) op->apply( tmp_buf, (char *) recv + recv_idx * extent, &recv_cnt,
                      dtype);
 
-      // update send_idx for next iteration 
+      // update send_idx for next iteration
       send_idx = recv_idx;
       mask >>= 1;
     }
@@ -97,7 +97,7 @@ int Coll_allreduce_rab1::allreduce(void *sbuff, void *rbuff,
       if(op!=MPI_OP_NULL) op->apply( tmp_buf, (char *) rbuff + recv_idx * extent, &recv_cnt,
                      dtype);
 
-      // update send_idx for next iteration 
+      // update send_idx for next iteration
       send_idx = recv_idx;
       mask >>= 1;
     }
index 910ed83..552698a 100644 (file)
@@ -47,10 +47,10 @@ int Coll_allreduce_rdb::allreduce(void *sbuff, void *rbuff, int count,
   // processes of rank < 2*rem send their data to
   // (rank+1). These even-numbered processes no longer
   // participate in the algorithm until the very end. The
-  // remaining processes form a nice power-of-two. 
+  // remaining processes form a nice power-of-two.
 
   if (rank < 2 * rem) {
-    // even       
+    // even
     if (rank % 2 == 0) {
 
       Request::send(rbuff, count, dtype, rank + 1, tag, comm);
@@ -67,12 +67,12 @@ int Coll_allreduce_rdb::allreduce(void *sbuff, void *rbuff, int count,
       // the operation is commutative or not.
       if(op!=MPI_OP_NULL) op->apply( tmp_buf, rbuff, &count, dtype);
 
-      // change the rank 
+      // change the rank
       newrank = rank / 2;
     }
   }
 
-  else                          // rank >= 2 * rem 
+  else                          // rank >= 2 * rem
     newrank = rank - rem;
 
   // If op is user-defined or count is less than pof2, use
@@ -82,22 +82,22 @@ int Coll_allreduce_rdb::allreduce(void *sbuff, void *rbuff, int count,
   // datatypes on one process and derived on another as long as
   // the type maps are the same. Breaking up derived
   // datatypes to do the reduce-scatter is tricky, therefore
-  // using recursive doubling in that case.) 
+  // using recursive doubling in that case.)
 
   if (newrank != -1) {
     mask = 0x1;
     while (mask < pof2) {
       newdst = newrank ^ mask;
-      // find real rank of dest 
+      // find real rank of dest
       dst = (newdst < rem) ? newdst * 2 + 1 : newdst + rem;
 
       // Send the most current data, which is in recvbuf. Recv
-      // into tmp_buf 
+      // into tmp_buf
       Request::sendrecv(rbuff, count, dtype, dst, tag, tmp_buf, count, dtype,
                    dst, tag, comm, &status);
 
       // tmp_buf contains data received in this step.
-      // recvbuf contains data accumulated so far 
+      // recvbuf contains data accumulated so far
 
       // op is commutative OR the order is already right
       // we assume it is commuttive op
@@ -120,9 +120,9 @@ int Coll_allreduce_rdb::allreduce(void *sbuff, void *rbuff, int count,
   // participate above.
 
   if (rank < 2 * rem) {
-    if (rank % 2)               // odd 
+    if (rank % 2)               // odd
       Request::send(rbuff, count, dtype, rank - 1, tag, comm);
-    else                        // even 
+    else                        // even
       Request::recv(rbuff, count, dtype, rank + 1, tag, comm, &status);
   }
 
index 4750e23..e372373 100644 (file)
@@ -5,16 +5,16 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.h"
-/* IMPLEMENTED BY PITCH PATARASUK 
-   Non-topoloty-specific (however, number of cores/node need to be changed) 
+/* IMPLEMENTED BY PITCH PATARASUK
+   Non-topoloty-specific (however, number of cores/node need to be changed)
    all-reduce operation designed for smp clusters
-   It uses 2-layer communication: binomial for both intra-communication 
+   It uses 2-layer communication: binomial for both intra-communication
    inter-communication
    The communication are done in a pipeline fashion */
 
 
 
-/* this is a default segment size for pipelining, 
+/* this is a default segment size for pipelining,
    but it is typically passed as a command line argument */
 int allreduce_smp_binomial_pipeline_segment_size = 4096;
 
@@ -113,7 +113,7 @@ int Coll_allreduce_smp_binomial_pipeline::allreduce(void *send_buf,
       }
     }
 
-    /* start binomial reduce inter-communication between each SMP nodes: 
+    /* start binomial reduce inter-communication between each SMP nodes:
        each node only have one process that can communicate to other nodes */
     if ((phase > 0) && (phase < (pipelength + 1))) {
       if (intra_rank == 0) {
@@ -138,7 +138,7 @@ int Coll_allreduce_smp_binomial_pipeline::allreduce(void *send_buf,
       }
     }
 
-    /* start binomial broadcast inter-communication between each SMP nodes: 
+    /* start binomial broadcast inter-communication between each SMP nodes:
        each node only have one process that can communicate to other nodes */
     if ((phase > 1) && (phase < (pipelength + 2))) {
       if (intra_rank == 0) {
index d3bc4a2..ff4e5d0 100644 (file)
@@ -5,10 +5,10 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.h"
-/* IMPLEMENTED BY PITCH PATARASUK 
-   Non-topoloty-specific (however, number of cores/node need to be changed) 
+/* IMPLEMENTED BY PITCH PATARASUK
+   Non-topoloty-specific (however, number of cores/node need to be changed)
    all-reduce operation designed for smp clusters
-   It uses 2-layer communication: binomial for both intra-communication 
+   It uses 2-layer communication: binomial for both intra-communication
    inter-communication*/
 
 
@@ -83,7 +83,7 @@ int Coll_allreduce_smp_binomial::allreduce(void *send_buf, void *recv_buf,
     mask <<= 1;
   }
 
-  /* start binomial reduce inter-communication between each SMP nodes: 
+  /* start binomial reduce inter-communication between each SMP nodes:
      each node only have one process that can communicate to other nodes */
   if (intra_rank == 0) {
     mask = 1;
@@ -103,7 +103,7 @@ int Coll_allreduce_smp_binomial::allreduce(void *send_buf, void *recv_buf,
     }
   }
 
-  /* start binomial broadcast inter-communication between each SMP nodes: 
+  /* start binomial broadcast inter-communication between each SMP nodes:
      each node only have one process that can communicate to other nodes */
   if (intra_rank == 0) {
     mask = 1;
index 35bde00..52453c2 100644 (file)
@@ -5,10 +5,10 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.h"
-/* IMPLEMENTED BY PITCH PATARASUK 
-   Non-topoloty-specific (however, number of cores/node need to be changed) 
+/* IMPLEMENTED BY PITCH PATARASUK
+   Non-topoloty-specific (however, number of cores/node need to be changed)
    all-reduce operation designed for smp clusters
-   It uses 2-layer communication: binomial for intra-communication 
+   It uses 2-layer communication: binomial for intra-communication
    and rdb for inter-communication*/
 
 
@@ -91,7 +91,7 @@ int Coll_allreduce_smp_rdb::allreduce(void *send_buf, void *recv_buf, int count,
   }                             /* end binomial reduce intra-communication */
 
 
-  /* start rdb (recursive doubling) all-reduce inter-communication 
+  /* start rdb (recursive doubling) all-reduce inter-communication
      between each SMP nodes : each node only have one process that can communicate
      to other nodes */
   if (intra_rank == 0) {
@@ -124,11 +124,11 @@ int Coll_allreduce_smp_rdb::allreduce(void *send_buf, void *recv_buf, int count,
       newrank = inter_rank - rem;
     }
 
-    /* example inter-communication RDB rank change algorithm 
+    /* example inter-communication RDB rank change algorithm
        0,4,8,12..36 <= true rank (assume 4 core per SMP)
        0123 4567 89 <= inter_rank
        1 3 4567 89 (1,3 got data from 0,2 : 0,2 will be idle until the end)
-       0 1 4567 89 
+       0 1 4567 89
        0 1 2345 67 => newrank
      */
 
@@ -148,8 +148,8 @@ int Coll_allreduce_smp_rdb::allreduce(void *send_buf, void *recv_buf, int count,
       }
     }
 
-    /* non pof2 case 
-       left-over processes (all even ranks: < 2 * rem) get the result    
+    /* non pof2 case
+       left-over processes (all even ranks: < 2 * rem) get the result
      */
     if (inter_rank < 2 * rem) {
       if (inter_rank % 2) {
index 8ed15d2..c0915a0 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-/* 
+/*
  * implemented by Pitch Patarasuk, 07/01/2007
  */
 #include "../colls_private.h"
index 7c476a3..062d5cb 100644 (file)
@@ -26,7 +26,7 @@
            algorithm. It actually performs allgather operation in x dimension
            then in the y dimension. Each node then extracts the needed data.
            The communication in each dimension follows "simple."
+
  * Auther: Ahmad Faraj
 
 ****************************************************************************/
index 723c5b6..9b1b1a2 100644 (file)
@@ -5,7 +5,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
  #include "../colls_private.h"
+
 /*Naive and simple basic alltoall implementation. */
 
 
index 7dbad24..6745252 100644 (file)
  * copyright file COPYRIGHT in the top level MVAPICH2 directory.
  *
  */
+
 //correct on stampede
 #define MV2_ALLTOALL_THROTTLE_FACTOR         4
+
 #include "../colls_private.h"
 namespace simgrid{
 namespace smpi{
@@ -59,16 +59,16 @@ int Coll_alltoall_mvapich2_scatter_dest::alltoall(
     int dst, rank;
     MPI_Request *reqarray;
     MPI_Status *starray;
-    
+
     if (recvcount == 0) return MPI_SUCCESS;
-    
+
     comm_size =  comm->size();
     rank = comm->rank();
-    
+
     /* Get extent of send and recv types */
     recvtype_extent = recvtype->get_extent();
     sendtype_extent = sendtype->get_extent();
-    
+
     /* Medium-size message. Use isend/irecv with scattered
      destinations. Use Tony Ladd's modification to post only
      a small number of isends/irecvs at a time. */
@@ -83,20 +83,20 @@ int Coll_alltoall_mvapich2_scatter_dest::alltoall(
      there are only a few isend/irecvs left)
      */
     int ii, ss, bblock;
-        
+
     //Stampede is configured with
     bblock = MV2_ALLTOALL_THROTTLE_FACTOR;//mv2_coll_param.alltoall_throttle_factor;
-    
+
     if (bblock >= comm_size) bblock = comm_size;
     /* If throttle_factor is n, each process posts n pairs of isend/irecv
      in each iteration. */
-    
+
     /* FIXME: This should use the memory macros (there are storage
      leaks here if there is an error, for example) */
     reqarray= (MPI_Request*)xbt_malloc(2*bblock*sizeof(MPI_Request));
-    
+
     starray=(MPI_Status *)xbt_malloc(2*bblock*sizeof(MPI_Status));
+
     for (ii=0; ii<comm_size; ii+=bblock) {
         ss = comm_size-ii < bblock ? comm_size-ii : bblock;
         /* do the communication -- post ss sends and receives: */
@@ -116,11 +116,11 @@ int Coll_alltoall_mvapich2_scatter_dest::alltoall(
                                           COLL_TAG_ALLTOALL, comm);
 
         }
-        
+
         /* ... then wait for them to finish: */
         Request::waitall(2*ss,reqarray,starray);
-        
-       
+
+
         /* --BEGIN ERROR HANDLING-- */
         if (mpi_errno == MPI_ERR_IN_STATUS) {
                 for (j=0; j<2*ss; j++) {
@@ -134,7 +134,7 @@ int Coll_alltoall_mvapich2_scatter_dest::alltoall(
     xbt_free(starray);
     xbt_free(reqarray);
     return (mpi_errno);
-    
+
 }
 }
 }
index 0a16b23..be4860d 100644 (file)
@@ -13,7 +13,7 @@
 
  * Return: int
 
- * inputs: 
+ * inputs:
     send_buff: send input buffer
     send_count: number of elements to send
     send_type: data type of elements being sent
@@ -25,7 +25,7 @@
  * Descrp: Function realizes the allgather operation using the recursive
            doubling algorithm.
 
- * Auther: MPICH / slightly modified by Ahmad Faraj.  
+ * Auther: MPICH / slightly modified by Ahmad Faraj.
 
  ****************************************************************************/
 namespace simgrid{
index 2d701eb..8c9bc29 100644 (file)
@@ -5,14 +5,14 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "../colls_private.h"
-/*  
+/*
  * Linear functions are copied from the basic coll module.  For
  * some small number of nodes and/or small data sizes they are just as
  * fast as tuned/tree based segmenting operations and as such may be
  * selected by the decision functions.  These are copied into this module
  * due to the way we select modules in V1. i.e. in V2 we will handle this
- * differently and so will not have to duplicate code.  
- * GEF Oct05 after asking Jeff.  
+ * differently and so will not have to duplicate code.
+ * GEF Oct05 after asking Jeff.
  */
 namespace simgrid{
 namespace smpi{
@@ -67,7 +67,7 @@ Coll_alltoallv_ompi_basic_linear::alltoallv(void *sbuf, int *scounts, int *sdisp
                                       );
         preq++;
         ++nreqs;
-        
+
     }
 
     /* Now post all sends */
index 2290059..ddc591b 100644 (file)
@@ -45,7 +45,7 @@ int Coll_alltoallv_ring::alltoallv(void* send_buff, int* send_counts, int* send_
   recv_chunk = recv_type->get_extent();
   int pof2 = ((num_procs != 0) && ((num_procs & (~num_procs + 1)) == num_procs));
   for (i = 0; i < num_procs; i++) {
-  
+
     if (pof2 == 1) {
       /* use exclusive-or algorithm */
       src = dst = rank ^ i;
index edf35d0..e5f743d 100644 (file)
@@ -19,7 +19,7 @@
  *
  * Additional copyrights may follow
  */
+
  /* -*- Mode: C; c-basic-offset:4 ; -*- */
 /*
  *
@@ -60,7 +60,7 @@ int Coll_barrier_mvapich2_pair::barrier(MPI_Comm comm)
     /*  N2_prev = greatest power of two < size of Comm  */
     for( N2_prev = 1; N2_prev <= size; N2_prev <<= 1 );
     N2_prev >>= 1;
-    
+
     int surfeit = size - N2_prev;
 
     /* Perform a combine-like operation */
index 94131da..12c3af3 100644 (file)
 
 
 /*
- * Barrier is ment to be a synchronous operation, as some BTLs can mark 
- * a request done before its passed to the NIC and progress might not be made 
- * elsewhere we cannot allow a process to exit the barrier until its last 
+ * Barrier is ment to be a synchronous operation, as some BTLs can mark
+ * a request done before its passed to the NIC and progress might not be made
+ * elsewhere we cannot allow a process to exit the barrier until its last
  * [round of] sends are completed.
  *
- * It is last round of sends rather than 'last' individual send as each pair of 
- * peers can use different channels/devices/btls and the receiver of one of 
+ * It is last round of sends rather than 'last' individual send as each pair of
+ * peers can use different channels/devices/btls and the receiver of one of
  * these sends might be forced to wait as the sender
- * leaves the collective and does not make progress until the next mpi call 
+ * leaves the collective and does not make progress until the next mpi call
  *
  */
 
@@ -60,38 +60,38 @@ int Coll_barrier_ompi_doublering::barrier(MPI_Comm comm)
     right = ((rank+1)%size);
 
     if (rank > 0) { /* receive message from the left */
-        Request::recv((void*)NULL, 0, MPI_BYTE, left, 
+        Request::recv((void*)NULL, 0, MPI_BYTE, left,
                                 COLL_TAG_BARRIER, comm,
                                 MPI_STATUS_IGNORE);
     }
 
     /* Send message to the right */
-    Request::send((void*)NULL, 0, MPI_BYTE, right, 
+    Request::send((void*)NULL, 0, MPI_BYTE, right,
                             COLL_TAG_BARRIER,
                              comm);
 
     /* root needs to receive from the last node */
     if (rank == 0) {
-        Request::recv((void*)NULL, 0, MPI_BYTE, left, 
+        Request::recv((void*)NULL, 0, MPI_BYTE, left,
                                 COLL_TAG_BARRIER, comm,
                                 MPI_STATUS_IGNORE);
     }
 
     /* Allow nodes to exit */
     if (rank > 0) { /* post Receive from left */
-        Request::recv((void*)NULL, 0, MPI_BYTE, left, 
+        Request::recv((void*)NULL, 0, MPI_BYTE, left,
                                 COLL_TAG_BARRIER, comm,
                                 MPI_STATUS_IGNORE);
     }
 
     /* send message to the right one */
-    Request::send((void*)NULL, 0, MPI_BYTE, right, 
+    Request::send((void*)NULL, 0, MPI_BYTE, right,
                             COLL_TAG_BARRIER,
                              comm);
+
     /* rank 0 post receive from the last node */
     if (rank == 0) {
-        Request::recv((void*)NULL, 0, MPI_BYTE, left, 
+        Request::recv((void*)NULL, 0, MPI_BYTE, left,
                                 COLL_TAG_BARRIER, comm,
                                 MPI_STATUS_IGNORE);
     }
@@ -113,7 +113,7 @@ int Coll_barrier_ompi_recursivedoubling::barrier(MPI_Comm comm)
     rank = comm->rank();
     size = comm->size();
     XBT_DEBUG(
-                 "ompi_coll_tuned_barrier_ompi_recursivedoubling rank %d", 
+                 "ompi_coll_tuned_barrier_ompi_recursivedoubling rank %d",
                  rank);
 
     /* do nearest power of 2 less than size calc */
@@ -163,7 +163,7 @@ int Coll_barrier_ompi_recursivedoubling::barrier(MPI_Comm comm)
         if (rank < (size - adjsize)) {
             /* send enter message to higher ranked node */
             remote = rank + adjsize;
-            Request::send((void*)NULL, 0, MPI_BYTE, remote, 
+            Request::send((void*)NULL, 0, MPI_BYTE, remote,
                                     COLL_TAG_BARRIER,
                                      comm);
 
@@ -190,14 +190,14 @@ int Coll_barrier_ompi_bruck::barrier(MPI_Comm comm)
                  "ompi_coll_tuned_barrier_ompi_bruck rank %d", rank);
 
     /* exchange data with rank-2^k and rank+2^k */
-    for (distance = 1; distance < size; distance <<= 1) { 
+    for (distance = 1; distance < size; distance <<= 1) {
         from = (rank + size - distance) % size;
         to   = (rank + distance) % size;
 
         /* send message to lower ranked node */
-        Request::sendrecv(NULL, 0, MPI_BYTE, to, 
+        Request::sendrecv(NULL, 0, MPI_BYTE, to,
                                               COLL_TAG_BARRIER,
-                                              NULL, 0, MPI_BYTE, from, 
+                                              NULL, 0, MPI_BYTE, from,
                                               COLL_TAG_BARRIER,
                                               comm, MPI_STATUS_IGNORE);
     }
@@ -220,9 +220,9 @@ int Coll_barrier_ompi_two_procs::barrier(MPI_Comm comm)
                  "ompi_coll_tuned_barrier_ompi_two_procs rank %d", remote);
     remote = (remote + 1) & 0x1;
 
-    Request::sendrecv(NULL, 0, MPI_BYTE, remote, 
+    Request::sendrecv(NULL, 0, MPI_BYTE, remote,
                                           COLL_TAG_BARRIER,
-                                          NULL, 0, MPI_BYTE, remote, 
+                                          NULL, 0, MPI_BYTE, remote,
                                           COLL_TAG_BARRIER,
                                           comm, MPI_STATUS_IGNORE);
     return (MPI_SUCCESS);
@@ -252,11 +252,11 @@ int Coll_barrier_ompi_basic_linear::barrier(MPI_Comm comm)
     /* All non-root send & receive zero-length message. */
 
     if (rank > 0) {
-        Request::send (NULL, 0, MPI_BYTE, 0, 
+        Request::send (NULL, 0, MPI_BYTE, 0,
                                  COLL_TAG_BARRIER,
                                   comm);
 
-        Request::recv (NULL, 0, MPI_BYTE, 0, 
+        Request::recv (NULL, 0, MPI_BYTE, 0,
                                  COLL_TAG_BARRIER,
                                  comm, MPI_STATUS_IGNORE);
     }
@@ -293,7 +293,7 @@ int Coll_barrier_ompi_basic_linear::barrier(MPI_Comm comm)
 
 /*
  * Another recursive doubling type algorithm, but in this case
- * we go up the tree and back down the tree.  
+ * we go up the tree and back down the tree.
  */
 int Coll_barrier_ompi_tree::barrier(MPI_Comm comm)
 {
@@ -303,7 +303,7 @@ int Coll_barrier_ompi_tree::barrier(MPI_Comm comm)
     rank = comm->rank();
     size = comm->size();
     XBT_DEBUG(
-                 "ompi_coll_tuned_barrier_ompi_tree %d", 
+                 "ompi_coll_tuned_barrier_ompi_tree %d",
                  rank);
 
     /* Find the nearest power of 2 of the communicator size. */
@@ -313,7 +313,7 @@ int Coll_barrier_ompi_tree::barrier(MPI_Comm comm)
         partner = rank ^ jump;
         if (!(partner & (jump-1)) && partner < size) {
             if (partner > rank) {
-                Request::recv (NULL, 0, MPI_BYTE, partner, 
+                Request::recv (NULL, 0, MPI_BYTE, partner,
                                          COLL_TAG_BARRIER, comm,
                                          MPI_STATUS_IGNORE);
             } else if (partner < rank) {
@@ -323,7 +323,7 @@ int Coll_barrier_ompi_tree::barrier(MPI_Comm comm)
             }
         }
     }
-    
+
     depth>>=1;
     for (jump = depth; jump>0; jump>>=1) {
         partner = rank ^ jump;
@@ -333,7 +333,7 @@ int Coll_barrier_ompi_tree::barrier(MPI_Comm comm)
                                          COLL_TAG_BARRIER,
                                           comm);
             } else if (partner < rank) {
-                Request::recv (NULL, 0, MPI_BYTE, partner, 
+                Request::recv (NULL, 0, MPI_BYTE, partner,
                                          COLL_TAG_BARRIER, comm,
                                          MPI_STATUS_IGNORE);
             }
index d91d728..9e1e974 100644 (file)
@@ -39,14 +39,14 @@ int Coll_bcast_NTSB::bcast(void *buf, int count, MPI_Datatype datatype,
 
   /* segment is segment size in number of elements (not bytes) */
   int segment = bcast_NTSB_segment_size_in_byte / extent;
-  segment =  segment == 0 ? 1 :segment; 
+  segment =  segment == 0 ? 1 :segment;
   /* pipeline length */
   int pipe_length = count / segment;
 
   /* use for buffer offset for sending and receiving data = segment size in byte */
   int increment = segment * extent;
 
-  /* if the input size is not divisible by segment size => 
+  /* if the input size is not divisible by segment size =>
      the small remainder will be done with native implementation */
   int remainder = count % segment;
 
index 64e97a4..df3cf2b 100644 (file)
@@ -8,7 +8,7 @@
 
 static int bcast_NTSL_segment_size_in_byte = 8192;
 
-/* Non-topology-specific pipelined linear-bcast function 
+/* Non-topology-specific pipelined linear-bcast function
    0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion
 */
 namespace simgrid{
@@ -37,14 +37,14 @@ int Coll_bcast_NTSL_Isend::bcast(void *buf, int count, MPI_Datatype datatype,
 
   /* segment is segment size in number of elements (not bytes) */
   int segment = bcast_NTSL_segment_size_in_byte / extent;
-  segment =  segment == 0 ? 1 :segment; 
+  segment =  segment == 0 ? 1 :segment;
   /* pipeline length */
   int pipe_length = count / segment;
 
   /* use for buffer offset for sending and receiving data = segment size in byte */
   int increment = segment * extent;
 
-  /* if the input size is not divisible by segment size => 
+  /* if the input size is not divisible by segment size =>
      the small remainder will be done with native implementation */
   int remainder = count % segment;
 
index 1f8e4fa..a9d3b83 100644 (file)
@@ -8,7 +8,7 @@
 
 static int bcast_NTSL_segment_size_in_byte = 8192;
 
-/* Non-topology-specific pipelined linear-bcast function 
+/* Non-topology-specific pipelined linear-bcast function
    0->1, 1->2 ,2->3, ....., ->last node : in a pipeline fashion
 */
 namespace simgrid{
@@ -37,14 +37,14 @@ int Coll_bcast_NTSL::bcast(void *buf, int count, MPI_Datatype datatype,
 
   /* segment is segment size in number of elements (not bytes) */
   int segment = extent == 0 ? 1 : (bcast_NTSL_segment_size_in_byte / extent);
-  segment =  segment == 0 ? 1 :segment; 
+  segment =  segment == 0 ? 1 :segment;
   /* pipeline length */
   int pipe_length = count / segment;
 
   /* use for buffer offset for sending and receiving data = segment size in byte */
   int increment = segment * extent;
 
-  /* if the input size is not divisible by segment size => 
+  /* if the input size is not divisible by segment size =>
      the small remainder will be done with native implementation */
   int remainder = count % segment;
 
index 801889e..f4eb6a2 100644 (file)
@@ -62,7 +62,7 @@ int Coll_bcast_SMP_binary::bcast(void *buf, int count,
     else if (rank == 0)
       Request::recv(buf, count, datatype, root, tag, comm, &status);
   }
-  // when a message is smaller than a block size => no pipeline 
+  // when a message is smaller than a block size => no pipeline
   if (count <= segment) {
     // case ROOT-of-each-SMP
     if (rank % host_num_core == 0) {
index 8c241b9..691706e 100644 (file)
@@ -38,7 +38,7 @@ int Coll_bcast_SMP_linear::bcast(void *buf, int count,
   }
 
   int segment = bcast_SMP_linear_segment_byte / extent;
-  segment =  segment == 0 ? 1 :segment; 
+  segment =  segment == 0 ? 1 :segment;
   int pipe_length = count / segment;
   int remainder = count % segment;
   int increment = segment * extent;
@@ -55,7 +55,7 @@ int Coll_bcast_SMP_linear::bcast(void *buf, int count,
   if (size <= num_core) {
     XBT_WARN("MPI_bcast_SMP_linear use default MPI_bcast.");
     Coll_bcast_default::bcast(buf, count, datatype, root, comm);
-    return MPI_SUCCESS;            
+    return MPI_SUCCESS;
   }
   // if root is not zero send to rank zero first
   if (root != 0) {
@@ -64,7 +64,7 @@ int Coll_bcast_SMP_linear::bcast(void *buf, int count,
     else if (rank == 0)
       Request::recv(buf, count, datatype, root, tag, comm, &status);
   }
-  // when a message is smaller than a block size => no pipeline 
+  // when a message is smaller than a block size => no pipeline
   if (count <= segment) {
     // case ROOT
     if (rank == 0) {
index 66da225..3256363 100644 (file)
@@ -62,14 +62,14 @@ int Coll_bcast_arrival_pattern_aware_wait::bcast(void *buf, int count,
 
   /* segment is segment size in number of elements (not bytes) */
   int segment = bcast_arrival_pattern_aware_wait_segment_size_in_byte / extent;
-  segment =  segment == 0 ? 1 :segment; 
+  segment =  segment == 0 ? 1 :segment;
   /* pipeline length */
   int pipe_length = count / segment;
 
   /* use for buffer offset for sending and receiving data = segment size in byte */
   int increment = segment * extent;
 
-  /* if the input size is not divisible by segment size => 
+  /* if the input size is not divisible by segment size =>
      the small remainder will be done with native implementation */
   int remainder = count % segment;
 
index b4202d3..102be48 100644 (file)
@@ -53,14 +53,14 @@ int Coll_bcast_arrival_pattern_aware::bcast(void *buf, int count,
 
   /* segment is segment size in number of elements (not bytes) */
   int segment = bcast_NTSL_segment_size_in_byte / extent;
-  segment =  segment == 0 ? 1 :segment; 
+  segment =  segment == 0 ? 1 :segment;
   /* pipeline length */
   int pipe_length = count / segment;
 
   /* use for buffer offset for sending and receiving data = segment size in byte */
   int increment = segment * extent;
 
-  /* if the input size is not divisible by segment size => 
+  /* if the input size is not divisible by segment size =>
      the small remainder will be done with native implementation */
   int remainder = count % segment;
 
@@ -347,7 +347,7 @@ int Coll_bcast_arrival_pattern_aware::bcast(void *buf, int count,
       }else{
           Request::waitall(pipe_length, recv_request_array, recv_status_array);
           }
-    
+
     }
 
     free(send_request_array);
index ccccf7a..3ecba94 100644 (file)
@@ -61,7 +61,7 @@ int Coll_bcast_arrival_scatter::bcast(void *buf, int count,
   if (count < size) {
     XBT_WARN("MPI_bcast_arrival_scatter use default MPI_bcast.");
     Colls::bcast(buf, count, datatype, root, comm);
-    return MPI_SUCCESS;        
+    return MPI_SUCCESS;
   }
 
 
@@ -193,7 +193,7 @@ int Coll_bcast_arrival_scatter::bcast(void *buf, int count,
              0, tag, comm, &status);
 
     /* at this point all nodes in this set perform all-gather operation */
-    
+
     to = (myordering == (total_nodes - 1)) ? header_buf[0] : header_buf[myordering + 1];
     from = (myordering == 0) ? header_buf[total_nodes - 1] : header_buf[myordering - 1];
 
index 3b5bf4b..f03eb3a 100644 (file)
@@ -21,7 +21,7 @@ Coll_bcast_flattree_pipeline::bcast(void *buff, int count,
   extent = data_type->get_extent();
 
   int segment = flattree_segment_in_byte / extent;
-  segment =  segment == 0 ? 1 :segment; 
+  segment =  segment == 0 ? 1 :segment;
   int pipe_length = count / segment;
   int increment = segment * extent;
   if (pipe_length==0) {
index 8ac87db..b0c0f31 100644 (file)
@@ -42,7 +42,7 @@ extern int (*MV2_Bcast_function) (void *buffer, int count, MPI_Datatype datatype
 
 extern int (*MV2_Bcast_intra_node_function) (void *buffer, int count, MPI_Datatype datatype,
                                       int root, MPI_Comm comm_ptr);
-                                      
+
 extern int zcpy_knomial_factor;
 extern int mv2_pipelined_zcpy_knomial_factor;
 extern int bcast_segment_size;
@@ -95,15 +95,15 @@ int Coll_bcast_mvapich2_inter_node::bcast(void *buffer,
     if (MV2_Bcast_function==NULL){
       MV2_Bcast_function=Coll_bcast_mpich::bcast;
     }
-    
+
     if (MV2_Bcast_intra_node_function==NULL){
       MV2_Bcast_intra_node_function= Coll_bcast_mpich::bcast;
     }
-    
+
     if(comm->get_leaders_comm()==MPI_COMM_NULL){
       comm->init_smp();
     }
-    
+
     shmem_comm = comm->get_intra_comm();
     local_rank = shmem_comm->rank();
     local_size = shmem_comm->size();
@@ -117,8 +117,8 @@ int Coll_bcast_mvapich2_inter_node::bcast(void *buffer,
     int* leaders_map = comm->get_leaders_map();
     leader_of_root = comm->group()->rank(leaders_map[root]);
     leader_root = leader_comm->group()->rank(leaders_map[root]);
-    
-    
+
+
     if (local_size > 1) {
         if ((local_rank == 0) && (root != rank) && (leader_root == global_rank)) {
             Request::recv(buffer, count, datatype, root,
@@ -184,15 +184,15 @@ int Coll_bcast_mvapich2_knomial_intra_node::bcast(void *buffer,
     if (MV2_Bcast_function==NULL){
       MV2_Bcast_function=Coll_bcast_mpich::bcast;
     }
-    
+
     if (MV2_Bcast_intra_node_function==NULL){
       MV2_Bcast_intra_node_function= Coll_bcast_mpich::bcast;
     }
-    
+
     if(comm->get_leaders_comm()==MPI_COMM_NULL){
       comm->init_smp();
     }
-    
+
     local_size = comm->size();
     rank = comm->rank();
 
@@ -254,7 +254,7 @@ int Coll_bcast_mvapich2_intra_node::bcast(void *buffer,
     int mpi_errno = MPI_SUCCESS;
     int comm_size;
     int two_level_bcast = 1;
-    size_t nbytes = 0; 
+    size_t nbytes = 0;
     int is_homogeneous, is_contig;
     MPI_Aint type_size;
     void *tmp_buf = NULL;
@@ -265,15 +265,15 @@ int Coll_bcast_mvapich2_intra_node::bcast(void *buffer,
     if (MV2_Bcast_function==NULL){
       MV2_Bcast_function=Coll_bcast_mpich::bcast;
     }
-    
+
     if (MV2_Bcast_intra_node_function==NULL){
       MV2_Bcast_intra_node_function= Coll_bcast_mpich::bcast;
     }
-    
+
     if(comm->get_leaders_comm()==MPI_COMM_NULL){
       comm->init_smp();
     }
-    
+
     comm_size = comm->size();
    // rank = comm->rank();
 /*
index 0e328ab..425fcab 100644 (file)
@@ -12,8 +12,8 @@
 namespace simgrid{
 namespace smpi{
 int Coll_bcast_ompi_pipeline::bcast( void* buffer,
-                                      int original_count, 
-                                      MPI_Datatype datatype, 
+                                      int original_count,
+                                      MPI_Datatype datatype,
                                       int root,
                                       MPI_Comm comm)
 {
@@ -22,7 +22,7 @@ int Coll_bcast_ompi_pipeline::bcast( void* buffer,
     size_t segsize =1024  << 7;
     //mca_coll_tuned_module_t *tuned_module = (mca_coll_tuned_module_t*) module;
     //mca_coll_tuned_comm_t *data = tuned_module->tuned_data;
-    
+
 //    return ompi_coll_tuned_bcast_intra_generic( buffer, count, datatype, root, comm, module,
 //                                                count_by_segment, data->cached_pipeline );
     ompi_coll_tree_t * tree = ompi_coll_tuned_topo_build_chain( 1, comm, root );
@@ -30,14 +30,14 @@ int Coll_bcast_ompi_pipeline::bcast( void* buffer,
     int rank, size;
     int segindex;
     int num_segments; /* Number of segments */
-    int sendcount;    /* number of elements sent in this segment */ 
+    int sendcount;    /* number of elements sent in this segment */
     size_t realsegsize;
     char *tmpbuf;
     ptrdiff_t extent;
     MPI_Request recv_reqs[2] = {MPI_REQUEST_NULL, MPI_REQUEST_NULL};
     MPI_Request *send_reqs = NULL;
     int req_index;
-    
+
     /**
      * Determine number of elements sent per operation.
      */
@@ -49,9 +49,9 @@ int Coll_bcast_ompi_pipeline::bcast( void* buffer,
 
 
     const double a_p16  = 3.2118e-6; /* [1 / byte] */
-    const double b_p16  = 8.7936;   
+    const double b_p16  = 8.7936;
     const double a_p64  = 2.3679e-6; /* [1 / byte] */
-    const double b_p64  = 1.1787;     
+    const double b_p64  = 1.1787;
     const double a_p128 = 1.6134e-6; /* [1 / byte] */
     const double b_p128 = 2.1102;
     size_t message_size;
@@ -60,13 +60,13 @@ int Coll_bcast_ompi_pipeline::bcast( void* buffer,
     message_size = type_size * (unsigned long)original_count;   /* needed for decision */
 
     if (size < (a_p128 * message_size + b_p128)) {
-            //Pipeline with 128KB segments 
+            //Pipeline with 128KB segments
             segsize = 1024  << 7;
     }else if (size < (a_p64 * message_size + b_p64)) {
-            // Pipeline with 64KB segments 
+            // Pipeline with 64KB segments
             segsize = 1024 << 6;
     }else if (size < (a_p16 * message_size + b_p16)) {
-            //Pipeline with 16KB segments 
+            //Pipeline with 16KB segments
             segsize = 1024 << 4;
     }
 
@@ -80,7 +80,7 @@ int Coll_bcast_ompi_pipeline::bcast( void* buffer,
     extent = datatype->get_extent();
     num_segments = (original_count + count_by_segment - 1) / count_by_segment;
     realsegsize = count_by_segment * extent;
-    
+
     /* Set the buffer pointers */
     tmpbuf = (char *) buffer;
 
@@ -90,7 +90,7 @@ int Coll_bcast_ompi_pipeline::bcast( void* buffer,
 
     /* Root code */
     if( rank == root ) {
-        /* 
+        /*
            For each segment:
            - send segment to all children.
              The last segment may have less elements than other segments.
@@ -100,26 +100,26 @@ int Coll_bcast_ompi_pipeline::bcast( void* buffer,
             if( segindex == (num_segments - 1) ) {
                 sendcount = original_count - segindex * count_by_segment;
             }
-            for( i = 0; i < tree->tree_nextsize; i++ ) { 
+            for( i = 0; i < tree->tree_nextsize; i++ ) {
                 send_reqs[i] = Request::isend(tmpbuf, sendcount, datatype,
-                                         tree->tree_next[i], 
+                                         tree->tree_next[i],
                                          COLL_TAG_BCAST, comm);
-           } 
+           }
 
             /* complete the sends before starting the next sends */
-            Request::waitall( tree->tree_nextsize, send_reqs, 
+            Request::waitall( tree->tree_nextsize, send_reqs,
                                          MPI_STATUSES_IGNORE );
 
             /* update tmp buffer */
             tmpbuf += realsegsize;
 
         }
-    } 
-    
+    }
+
     /* Intermediate nodes code */
-    else if( tree->tree_nextsize > 0 ) { 
-        /* 
-           Create the pipeline. 
+    else if( tree->tree_nextsize > 0 ) {
+        /*
+           Create the pipeline.
            1) Post the first receive
            2) For segments 1 .. num_segments
               - post new receive
@@ -133,31 +133,31 @@ int Coll_bcast_ompi_pipeline::bcast( void* buffer,
         recv_reqs[req_index]=Request::irecv(tmpbuf, count_by_segment, datatype,
                            tree->tree_prev, COLL_TAG_BCAST,
                            comm);
-        
+
         for( segindex = 1; segindex < num_segments; segindex++ ) {
-            
+
             req_index = req_index ^ 0x1;
-            
+
             /* post new irecv */
             recv_reqs[req_index]= Request::irecv( tmpbuf + realsegsize, count_by_segment,
-                                datatype, tree->tree_prev, 
+                                datatype, tree->tree_prev,
                                 COLL_TAG_BCAST,
                                 comm);
-            
+
             /* wait for and forward the previous segment to children */
-            Request::wait( &recv_reqs[req_index ^ 0x1], 
+            Request::wait( &recv_reqs[req_index ^ 0x1],
                                      MPI_STATUSES_IGNORE );
-            
-            for( i = 0; i < tree->tree_nextsize; i++ ) { 
+
+            for( i = 0; i < tree->tree_nextsize; i++ ) {
                 send_reqs[i]=Request::isend(tmpbuf, count_by_segment, datatype,
-                                         tree->tree_next[i], 
+                                         tree->tree_next[i],
                                          COLL_TAG_BCAST, comm );
-            } 
-            
+            }
+
             /* complete the sends before starting the next iteration */
-            Request::waitall( tree->tree_ne