// 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);
// 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");
@@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)
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)
#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
simdata->comp_amount = NULL;
simdata->comm_amount = NULL;
+ CINFO2(root,"Created task %p: %s",task,name);
+
return task;
}
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);