Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Acknoledge the fact that JniException is a runtime exception now: kill all its occure...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 2 Mar 2010 17:09:48 +0000 (17:09 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 2 Mar 2010 17:09:48 +0000 (17:09 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7169 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/bindings/ruby/rb_msg_task.c
src/bindings/ruby/simgrid.rb
src/bindings/ruby_bindings.h
src/msg/task.c
src/simix/smx_network.c

index 3617657..63c53ec 100644 (file)
@@ -17,7 +17,6 @@ void rb_task_free(m_task_t tk) {
 
 // New Method
 VALUE rb_task_new(VALUE class, VALUE name,VALUE comp_size,VALUE comm_size) {
-  //char * t_name = RSTRING(name)->ptr;
   m_task_t task = MSG_task_create(RSTRING(name)->ptr,NUM2INT(comp_size),NUM2INT(comm_size),NULL);
   // Wrap m_task_t to a Ruby Value
   return Data_Wrap_Struct(class, 0, rb_task_free, task);
@@ -58,6 +57,7 @@ void rb_task_send(VALUE class,VALUE task,VALUE mailbox) {
   // Wrap Ruby Value to m_task_t struct
   m_task_t tk;
   Data_Get_Struct(task, s_m_task_t, tk);
+  INFO1("Sending task %p",tk);
   int res = MSG_task_send(tk,RSTRING(mailbox)->ptr);
   if(res != MSG_OK)
     rb_raise(rb_eRuntimeError,"MSG_task_send failed");
index b3cc65b..1eed817 100644 (file)
@@ -48,8 +48,8 @@ class MsgProcess < Thread
   @@nextProcessId = 0
 
 # Attributes
-  attr_reader :bind, :id, :pargs    # Read only
-  attr_accessor :name, :properties  # R/W
+  attr_reader :bind, :id            # Read only
+  attr_accessor :name, :properties, :pargs  # R/W
   
 # Initialize : Used from ApplicationHandler to fill it in
   def initialize(*args)
@@ -239,10 +239,7 @@ class ApplicationHandler
 
   def onEndProcess()
     process = rubyNewInstance(@function) 
-    size = @args.size
-    for i in 0..size-1
-      process.pargs.push(@args[i]) 
-    end
+    process.pargs = @args
     process.name = @function
     host = Host.getByName(@hostName)
     processCreate(process,host)
index 2b60085..a1ff925 100644 (file)
@@ -25,7 +25,6 @@
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 #include "xbt/asserts.h"
-//#include "rb_msg_host.h"
 
 /* Damn Ruby. They load their full config.h, which breaks since we also load ours.
  * So, we undef the offending defines
index a54b159..b14d7c8 100644 (file)
@@ -73,6 +73,8 @@ m_task_t MSG_task_create(const char *name, double compute_duration,
   simdata->comp_amount = NULL;
   simdata->comm_amount = NULL;
 
+  CINFO2(root,"Created task %p: %s",task,name);
+
   return task;
 }
 
index 79c604b..1089d17 100644 (file)
@@ -339,8 +339,10 @@ void SIMIX_network_copy_data(smx_comm_t comm)
   if(buff_size == 0)
     return;
 
-  DEBUG4("Copying comm %p data from %s -> %s (%zu bytes)",
-         comm, comm->src_proc->smx_host->name, comm->dst_proc->smx_host->name,
+  INFO6("Copying comm %p data from %s (%p) -> %s (%p) (%zu bytes)",
+         comm,
+         comm->src_proc->smx_host->name, comm->src_buff,
+         comm->dst_proc->smx_host->name, comm->dst_buff,
          buff_size);
 
   memcpy(comm->dst_buff, comm->src_buff, buff_size);