How can we profile parallel code in julia? This question has been asked before. In fact, following the advice to call profile on each node does not work.
function profileSlaveTask(param)
@profile slaveTask(param)
return Profile.retrieve()
end
rrefs=Array(RemoteRef,length(workers()))
machines=workers()
for i=1:length(machines)
rrefs[i]= @spawnat machines[i] slaveTask(initdamp)
end
pres= fetch(rrefs[1])
using ProfileView
ProfileView(pres[1],lidict=pres[2])
