Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot//simgrid/simgrid
authorsuter <frederic.suter@cc.in2p3.fr>
Thu, 8 May 2014 19:36:00 +0000 (21:36 +0200)
committersuter <frederic.suter@cc.in2p3.fr>
Thu, 8 May 2014 19:36:00 +0000 (21:36 +0200)
.gitignore
include/smpi/smpi.h
src/bindings/java/jmsg_host.c
src/smpi/smpi_bench.c

index 4a612b2..8081ef5 100644 (file)
@@ -256,36 +256,36 @@ examples/smpi/mc/bugged2
 src/replay/replay
 src/testall
 teshsuite/bug-17132/bug-17132
-teshsuite/smpi/allgather_coll
-teshsuite/smpi/allgatherv_coll
-teshsuite/smpi/allreduce_coll
-teshsuite/smpi/alltoall_coll
-teshsuite/smpi/alltoallv_coll
-teshsuite/smpi/barrier_coll
+teshsuite/smpi/allgather/allgather_coll
+teshsuite/smpi/allgatherv/allgatherv_coll
+teshsuite/smpi/allreduce/allreduce_coll
+teshsuite/smpi/alltoall/alltoall_coll
+teshsuite/smpi/alltoallv/alltoallv_coll
+teshsuite/smpi/barrier/barrier_coll
 teshsuite/smpi/bcast_coll
-teshsuite/smpi/gather_coll
+teshsuite/smpi/gather/gather_coll
 teshsuite/smpi/reduce_coll
 teshsuite/smpi/reduce_scatter_coll
 teshsuite/smpi/allreduce
-teshsuite/smpi/alltoall2
-teshsuite/smpi/alltoall_basic
+teshsuite/smpi/alltoall/alltoall2
+teshsuite/smpi/alltoall/alltoall_basic
 teshsuite/smpi/alltoallv
 teshsuite/smpi/bcast
 teshsuite/smpi/compute
 teshsuite/smpi/compute2
 teshsuite/smpi/compute3
 teshsuite/smpi/dsend
-teshsuite/smpi/hvector_test
-teshsuite/smpi/indexed_test
+teshsuite/smpi/hvector/hvector_test
+teshsuite/smpi/indexed/indexed_test
 teshsuite/smpi/pingpong
 teshsuite/smpi/reduce
 teshsuite/smpi/scatter
 teshsuite/smpi/shared
 teshsuite/smpi/smpi_sendrecv
 teshsuite/smpi/split
-teshsuite/smpi/struct_test
+teshsuite/smpi/struct/struct_test
 teshsuite/smpi/ttest01
-teshsuite/smpi/vector_test
+teshsuite/smpi/vector/vector_test
 teshsuite/smpi/mpich-test/*/*.out
 teshsuite/smpi/mpich-test/*/*.stdo
 teshsuite/smpi/mpich-test/coll/allgatherf
@@ -726,9 +726,14 @@ teshsuite/smpi/mpich3-test/pt2pt/sendrecv3
 teshsuite/smpi/mpich3-test/pt2pt/sendself
 teshsuite/smpi/mpich3-test/pt2pt/waitany-null
 teshsuite/smpi/mpich3-test/pt2pt/waittestnull
+teshsuite/smpi/mpich3-test/topo/cartcreates
+teshsuite/smpi/mpich3-test/topo/cartshift1
+teshsuite/smpi/mpich3-test/topo/cartsuball
+teshsuite/smpi/mpich3-test/topo/cartzero
 
 teshsuite/msg/host_on_off
 teshsuite/msg/process
+teshsuite/msg/process_join/process_join
 teshsuite/msg/storage/storage_basic
 teshsuite/msg/task_destroy_cancel
 teshsuite/msg/pid
@@ -737,13 +742,13 @@ teshsuite/msg/trace/test_trace_integration
 teshsuite/simix/check_defaults
 teshsuite/simix/stack_overflow
 teshsuite/simdag/availability/availability_test
-teshsuite/simdag/basic0
-teshsuite/simdag/basic1
-teshsuite/simdag/basic2
-teshsuite/simdag/basic3
-teshsuite/simdag/basic4
-teshsuite/simdag/basic5
-teshsuite/simdag/basic6
+teshsuite/simdag/basic/basic0
+teshsuite/simdag/basic/basic1
+teshsuite/simdag/basic/basic2
+teshsuite/simdag/basic/basic3
+teshsuite/simdag/basic/basic4
+teshsuite/simdag/basic/basic5
+teshsuite/simdag/basic/basic6
 teshsuite/simdag/incomplete
 teshsuite/simdag/network/mxn/test_intra_all2all
 teshsuite/simdag/network/mxn/test_intra_independent_comm
@@ -759,12 +764,23 @@ teshsuite/simdag/platforms/basic_tracing
 teshsuite/simdag/platforms/basic_link_test
 teshsuite/simdag/platforms/evaluate_get_route_time
 teshsuite/simdag/platforms/evaluate_parse_time
+teshsuite/simdag/platforms/graphicator
 teshsuite/simdag/partask/test_comp_only_par
 teshsuite/simdag/partask/test_comp_only_seq
-teshsuite/xbt/log_large_test
-teshsuite/xbt/parallel_log_crashtest
+teshsuite/surf/lmm_usage/lmm_usage
+teshsuite/surf/maxmin_bench/maxmin_bench
+teshsuite/surf/surf_usage/surf_usage
+teshsuite/surf/surf_usage/surf_usage2
+teshsuite/surf/trace_usage/trace_usage
+teshsuite/xbt/log_large/log_large_test
 teshsuite/xbt/mmalloc_test
-teshsuite/xbt/parmap_test
+teshsuite/xbt/graphxml_usage/graphxml_usage
+teshsuite/xbt/heap_bench/heap_bench
+teshsuite/xbt/log_usage/log_usage
+teshsuite/xbt/parallel_log/parallel_log_crashtest
+teshsuite/xbt/parmap_bench/parmap_bench
+teshsuite/xbt/parmap_test/parmap_test
+
 tools/tesh/tesh
 examples/msg/tracing/categories
 examples/msg/tracing/ms
@@ -778,7 +794,6 @@ test_rl
 test_sg
 examples/smpi/smpi_traced.trace
 examples/simdag/dot/simulate_dot
-teshsuite/simdag/platforms/graphicator
 
 #########################################
 ## touched files to track the dependencies of java examples
index c520980..f9ebc00 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef SMPI_H
 #define SMPI_H
 
+#include <unistd.h>
 #include <stddef.h>
 #include <sys/time.h>
 #include <xbt/misc.h>
@@ -708,6 +709,7 @@ XBT_PUBLIC(int) smpi_get_host_nb_pstates(void);
 XBT_PUBLIC(void) smpi_set_host_power_peak_at(int pstate_index);
 XBT_PUBLIC(double) smpi_get_host_consumed_energy(void);
 
+XBT_PUBLIC(int) smpi_usleep(useconds_t usecs);
 XBT_PUBLIC(unsigned int) smpi_sleep(unsigned int secs);
 XBT_PUBLIC(int) smpi_gettimeofday(struct timeval *tv, void* tz);
 XBT_PUBLIC(unsigned long long) smpi_rastro_resolution (void);
index 81ed7f7..a7d54a3 100644 (file)
@@ -69,11 +69,11 @@ Java_org_simgrid_msg_Host_getByName(JNIEnv * env, jclass cls,
   jobject jhost;                /* global reference to the java host instance returned  */
 
   /* get the C string from the java string */
-  const char *name = (*env)->GetStringUTFChars(env, jname, 0);
-  if (name == NULL) {
+  if (jname == NULL) {
        jxbt_throw_null(env,bprintf("No host can have a null name"));
        return NULL;
   }
+  const char *name = (*env)->GetStringUTFChars(env, jname, 0);
   /* get the host by name       (the hosts are created during the grid resolution) */
   host = MSG_get_host_by_name(name);
 
index 2cb5bb2..28ef158 100644 (file)
@@ -224,9 +224,28 @@ unsigned int smpi_sleep(unsigned int secs)
   simcall_host_execution_wait(action);
 
   smpi_bench_begin();
-  return secs;
+  return 0;
+}
+
+int smpi_usleep(useconds_t usecs)
+{
+  smx_action_t action;
+
+  smpi_bench_end();
+
+  double flops = (double) (usecs/1000000.0)*simcall_host_get_speed(SIMIX_host_self());
+  XBT_DEBUG("Sleep for: %f flops", flops);
+  action = simcall_host_execute("computation", SIMIX_host_self(), flops, 1, 0, 0);
+  #ifdef HAVE_TRACING
+    simcall_set_category (action, TRACE_internal_smpi_get_category());
+  #endif
+  simcall_host_execution_wait(action);
+
+  smpi_bench_begin();
+  return 0;
 }
 
+
 int smpi_gettimeofday(struct timeval *tv, void* tz)
 {
   double now;