From: mquinson Date: Mon, 22 Mar 2010 10:08:37 +0000 (+0000) Subject: reduce verbosity: debug is almost over X-Git-Tag: SVN~457 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/f101547f1541d1a3c30d05d97650221331452461 reduce verbosity: debug is almost over git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7282 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/bindings/ruby/MasterSlave.rb b/src/bindings/ruby/MasterSlave.rb index e90a1f4bb0..848fba2257 100644 --- a/src/bindings/ruby/MasterSlave.rb +++ b/src/bindings/ruby/MasterSlave.rb @@ -10,7 +10,7 @@ include MSG ################################################# class Master < MSG::Process - # main : that function that will be executed when Running Simulation + # main : that function that will be executed when running simulation def main(args) # args is an array containing arguments for function master size = args.size @@ -28,17 +28,17 @@ class Master < MSG::Process for i in 0..numberOfTask-1 task = MSG::Task.new("Task_"+ i.to_s, taskComputeSize , taskCommunicationSize); mailbox = "slave " + (i%slaveCount).to_s - MSG::info("Master Sending "+ task.name + " to " + mailbox + " with Comput Size " + + MSG::debug("Master Sending "+ task.name + " to " + mailbox + " with Comput Size " + task.compSize.to_s) task.send(mailbox) - MSG::info("Master Done Sending " + task.name + " to " + mailbox) + MSG::debug("Master Done Sending " + task.name + " to " + mailbox) end # Sending Finalize MSG::Tasks + #MSG::info("Master: All "+numberOfTask+" tasks have been dispatched. Let's tell everybody the computation is over.") MSG::info("Master: All tasks have been dispatched. Let's tell everybody the computation is over.") for i in 0..slaveCount-1 mailbox = "slave " + i.to_s - MSG::info("Master Sending Finalize to " + mailbox) finalize_task = Task.new("finalize",0,0) finalize_task.send(mailbox) end @@ -58,18 +58,14 @@ class Slave < MSG::Process end while true - info("Ready to Receive Task") task = MSG::Task.receive(mailbox) - MSG::info("Task Received : " + task.name) if (task.name == "finalize") - MSG::info("Slave " + mailbox + " got finalize msg") break end - MSG::info("Slave " + mailbox + " ...Processing" + task.name) task.execute - MSG::info("task "+ task.name + " Executed !!") + MSG::debug("Slave '" + mailbox + "' done executing task "+ task.name + ".") end - MSG::info("Slave " + mailbox + "I'm Done , See You !!") + MSG::info("I'm done, see you") end end diff --git a/src/bindings/ruby/rb_msg_task.c b/src/bindings/ruby/rb_msg_task.c index dadc6f5d47..7e1b4c6641 100644 --- a/src/bindings/ruby/rb_msg_task.c +++ b/src/bindings/ruby/rb_msg_task.c @@ -78,7 +78,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); + DEBUG1("Sending task %p",tk); rv = MSG_task_send(tk,RSTRING(mailbox)->ptr); if(rv != MSG_OK) { @@ -101,7 +101,7 @@ VALUE rb_task_receive(VALUE class, VALUE mailbox) { m_task_t *ptask = malloc(sizeof(m_task_t)); m_task_t task; *ptask = NULL; - INFO2("Receiving a task on mailbox '%s', store it into %p",RSTRING(mailbox)->ptr,&task); + DEBUG2("Receiving a task on mailbox '%s', store it into %p",RSTRING(mailbox)->ptr,&task); MSG_task_receive(ptask,RSTRING(mailbox)->ptr); task = *ptask; free(ptask);