SIMEXP / psom

pipeline system for octave and matlab
http://psom.simexp-lab.org
Other
24 stars 13 forks source link

psom_pipeline_visu uses Matlab incompatible sleep command #91

Closed surchs closed 8 years ago

surchs commented 8 years ago

psom_pipeline_visu uses sleep to hold processing which is not a valid Matlab command. The Matlab would be pause [according to the docs]. This seems to also be available in Octave so that's probably the better function to use.

pbellec commented 8 years ago

$%%&& OK. So if I remember correctly I did replace pause by sleep because it did not work as advertised in Octave. I will have to look into it ... Thanks for catching this.

pbellec commented 8 years ago

I can confirm this is used multiple times in the code base https://github.com/SIMEXP/psom/blob/master/psom_run_pipeline.m#L518 Going to be a mess ...

pbellec commented 8 years ago

Counting the number of calls to sleep in the PSOM code base (run in the head of master):

$ grep -c 'sleep(' * | grep -v :0
psom_deamon.m:2
psom_garbage.m:2
psom_heartbeat.m:1
psom_manager.m:2
psom_pipeline_visu.m:1
psom_run_pipeline.m:1
psom_test_sleep.m:2
psom_worker.m:1

Given that it's called about 10 times, I may just go ahead and create a small function psom_sleep. This will be easier to maintain in the future.

pbellec commented 8 years ago

Going through the code... I obviously took care not to call pause in Octave. For Matlab, sometimes it's calling sleep and sometimes pause. I do remember that I found that pause did not pause... Although it may have just been an old version of Octave. On 3.8 it seems OK. I am going to try switching everything back to pause (which would be much cleaner) and try to play with the pause parameter see if there is any effect...

pbellec commented 8 years ago

Using pause seems to work in octave (3.8) and matlab (2015b). I have made a number of other commits as well, and was able to run successfully a simple pipeline on linux in background mode, with 5 workers. I am closing this issue.