Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

psom_pipeline_visu uses Matlab incompatible sleep command #91

Closed
surchs opened this issue May 3, 2016 · 5 comments
Closed

psom_pipeline_visu uses Matlab incompatible sleep command #91

surchs opened this issue May 3, 2016 · 5 comments

Comments

@surchs
Copy link
Member

surchs commented May 3, 2016

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
Copy link
Member

pbellec commented May 3, 2016

$%%&& 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
Copy link
Member

pbellec commented May 3, 2016

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
Copy link
Member

pbellec commented May 3, 2016

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
Copy link
Member

pbellec commented May 3, 2016

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
Copy link
Member

pbellec commented May 3, 2016

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.

@pbellec pbellec closed this as completed May 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants