Search code examples
javasimgrid

SimGrid: How check Host is executing task or not?


In MasterWorker simulation, is there any method for Master to check whether Host of Worker is executing task now or not?


Solution

  • The simplest seems to check the load of the machine with host.getHost().

    Another solution would be to retrieve the cpu resource of your host, and check isUsed(). But you are not supposed to access the cpu directly so checking the load is better.