[FieldTrip] Problem passing arguments to peerslave command line executable

Robert Oostenveld r.oostenveld at donders.ru.nl
Thu Jun 9 17:02:38 CEST 2011


Hi Niels


On 7 Jun 2011, at 10:33, Kloosterman, Niels wrote:
> Although I have succesfully used the command-line ./ 
> peerslave.glnxa64 to launch slaves for parallel analysis of my batch  
> jobs, I am somehow not able to pass arguments to the command, for  
> example ./peerslave.glnxa64 --number 8, to launch 8 slaves at once.  
> Could anybody tell me what’s going on?

I'll give it a try.

> When I execute without arguments this line pops up:
>
> niels at gb-r35n18:~/matlab/fieldtrip-20110526/peer/bin$ ./ 
> peerslave.glnxa64
> peerslave[9705]: peerinit: niels at gb-r35n18.irc.sara.nl, id =  
> 4020038417
>
> All seems fine: the master is indeed able to send jobs to the slave.  
> No other information is printed to the shell when it gets a job or  
> whatever (is this normal?).

Yes, that is normal. Since we are running the peerslaves at the  
Donders on our ~50 node cluster on the background, the default  
(compiled) behaviour is to use the syslog facility. If I were to start  
them from a cronjob, I would either get very lengthy mails (which cron  
sends if the process finishes), or not get any information (when I  
redirect the output to /dev/null). To keep track of all processes on  
all nodes, we use a syslog server. The peerslave messages are all sent  
to a single syslog server where I can track them all in /var/log/ 
peerslave.log

Note however that if you recompile, you can change this. Have a look  
at this section in peer.h

#if   SYSLOG == 0
#define PANIC(format, ...)          {exit(-1);}
#define DEBUG(level, format, ...)   { }
#elif SYSLOG == 1
#define PANIC(format, ...)          {syslog(LOG_ERR, format, ##  
__VA_ARGS__); exit(-1);}
#define DEBUG(level, format, ...)   {syslog(level, format, ##  
__VA_ARGS__);}
#elif SYSLOG == 2
#define PANIC(format, ...)          {fprintf(stderr, format"\n", ##  
__VA_ARGS__); exit(-1);}
#define DEBUG(level, format, ...)   {fprintf(stderr, format"\n", ##  
__VA_ARGS__);}
#elif SYSLOG == 3
#define PANIC(format, ...)          {mexPrintf(format"\n", ##  
__VA_ARGS__); exit(-1);}
#define DEBUG(level, format, ...)   {if (level<=syslog_level)  
mexPrintf(format"\n", ## __VA_ARGS__);}
#endif

At compile time you can specify whether the output goes to syslog (1),  
stderr (2) or whether mexPrintf shoudl be used (for the mex file, 3).  
Probably you'll want to add -DSYSLOG=2 to the compile flags.

Furthermore note that the syslog level is used to control how much  
info is given. That is controlled with the --verbose=number option on  
the peerslave command line.

> Now when I try to run the --help I get this:
>
> niels at gb-r35n18:~/matlab/fieldtrip-20110526/peer/bin$ ./ 
> peerslave.glnxa64 --help
> peerslave[9753]: peerinit: niels at gb-r35n18.irc.sara.nl, id =  
> 2887682376
> parser: cannot open file --help
> peerslave[9753]: cannot read the configuration file

Hmm, this is not good. It appears that it misinterprets the cmd line  
option.

> And when I try to do --number 8:
>
> niels at gb-r35n18:~/matlab/fieldtrip-20110526/peer/bin$ ./ 
> peerslave.glnxa64 --number 8
> peerslave[9759]: peerinit: niels at gb-r35n18.irc.sara.nl, id =  
> 3997336815
> ./peerslave.glnxa64: unrecognized option '--number'
> peerslave[9759]: invalid command line options

Again here the cmd line option is misinterpreted. This one I can  
reproduce

roboos at mentat258> ../bin/peerslave.glnxa64 --number 8
peerslave[14690]: peerinit: roboos at mentat258.dccn.nl, id = 2375758516
../bin/peerslave.glnxa64: unrecognized option `--number'
peerslave[14690]: invalid command line options

I'll file a bug for it.

For the meantime, I suggest you look into the configuration files.  
That is also how we are using them at the Donders, you can find an  
example below.

best
Robert


------------------------ cut here ------------------------
# has 12GB of RAM, one CPU and 4 cores
# Intel(R) Xeon(R) CPU W3530 @ 2.80GHz

[peer]
matlab=/opt/cluster/matlab2010b -nodisplay -singleCompThread
timavail=86399
smartcpu=1
smartmem=1
udsserver=1

[peer]
matlab=/opt/cluster/matlab2010b -nodisplay -singleCompThread
timavail=3599
smartcpu=1
smartmem=1
udsserver=1

[peer]
matlab=/opt/cluster/matlab2010b -nodisplay -singleCompThread
timavail=3599
smartcpu=1
smartmem=1
udsserver=1

[peer]
matlab=/opt/cluster/matlab2010b -nodisplay -singleCompThread
timavail=599
smartcpu=1
smartmem=1
udsserver=1

------------------------ cut here ------------------------








More information about the fieldtrip mailing list