Back to the main page.

Bug 1273 - Error in qsubcompile when nodename has "-" in it

Status CLOSED FIXED
Reported 2012-01-20 16:50:00 +0100
Modified 2012-04-11 16:48:36 +0200
Product: FieldTrip
Component: qsub
Version: unspecified
Hardware: All
Operating System: Linux
Importance: P3 normal
Assigned to: Robert Oostenveld
URL:
Tags:
Depends on:
Blocks:
See also:

Niels Kloosterman - 2012-01-20 16:50:27 +0100

compiledfun = qsubcompile('rand'); qsubcellfun(compiledfun, {1, 2, 3}, 'memreq', 1024^3, 'timreq', 60, 'stack', 1) compiling rand into niels_gb-r33n26_p22694_b1 ??? Error using ==> mcc Illegal output name: 'niels_gb-r33n26_p22694_b1' (standalone and shared library target output names must begin with a letter or '_' and contain only alpha-numeric characters or '_') Error in ==> qsubcompile at 76 mcc('-N', '-R', '-nodisplay', '-o', batchid, '-m', 'qsubexec', 'cellfun', fname); When I run this from a login node (named for example "login4") the script runs, but when I run it from a node I am logged into via ssh -X, it crashes due to the minus sign in the nodenames (nodes are named "gb-rXXnXX" where the X-es are numbers).


Robert Oostenveld - 2012-03-10 16:30:57 +0100

added a fixname function (which was already used as subfunction elsewhere) that converts all inappropriate characters in the job id string into '_' mbp> svn commit Adding private/fixname.m Sending private/generatejobid.m Transmitting file data .. Committed revision 5430.


Robert Oostenveld - 2012-03-10 16:34:40 +0100

instead of keeping it a subfunction (inside the main m file) I made a separate function out of it. there are some other places where the function is used mbp> grep function.*fixname `find . -name \*.m` ./connectivity/private/warning_once.m:function out = fixname(toolbox) ./engine/private/warning_once.m:function out = fixname(toolbox) ./fileio/ft_read_header.m:function out = fixname(str) ./fileio/private/ft_hastoolbox.m:function out = fixname(toolbox) ./fileio/private/warning_once.m:function out = fixname(toolbox) ./forward/private/ft_hastoolbox.m:function out = fixname(toolbox) ./forward/private/warning_once.m:function out = fixname(toolbox) ./inverse/private/ft_hastoolbox.m:function out = fixname(toolbox) ./plotting/private/warning_once.m:function out = fixname(toolbox) ./private/warning_once.m:function out = fixname(toolbox) ./qsub/private/fixname.m:function str = fixname(str) ./qsub/private/warning_once.m:function out = fixname(toolbox) ./specest/private/warning_once.m:function out = fixname(toolbox) ./statfun/private/warning_once.m:function out = fixname(toolbox) ./utilities/ft_hastoolbox.m:function out = fixname(toolbox) ./utilities/private/warning_once.m:function out = fixname(toolbox) TODO replace it in warning_once ft_hastoolbox ft_read_header and svn copy it to the private of connectivity engine fileio forward inverse plotting main specest statfun utilities


Robert Oostenveld - 2012-03-10 16:45:13 +0100

(In reply to comment #2) I replaced it with a common implementation of fixname and fused all scattered functionality into this one. mbp> svn commit Adding trunk/connectivity/private/fixname.m Adding trunk/engine/private/fixname.m Sending trunk/fileio/ft_read_header.m Adding trunk/fileio/private/fixname.m Adding trunk/forward/private/fixname.m Adding trunk/inverse/private/fixname.m Adding trunk/plotting/private/fixname.m Adding trunk/private/fixname.m Sending trunk/qsub/private/fixname.m Adding trunk/specest/private/fixname.m Adding trunk/statfun/private/fixname.m Sending trunk/utilities/ft_hastoolbox.m Sending trunk/utilities/private/warning_once.m Transmitting file data ............. Committed revision 5431. do an update to check that all autosynched versions are updated mbp> svn update U engine/private/warning_once.m U inverse/private/ft_hastoolbox.m U plotting/private/warning_once.m U connectivity/private/warning_once.m U specest/private/warning_once.m U qsub/private/warning_once.m U fileio/private/warning_once.m U fileio/private/ft_hastoolbox.m U private/warning_once.m U statfun/private/warning_once.m U forward/private/warning_once.m U forward/private/ft_hastoolbox.m looks fine.


Niels Kloosterman - 2012-03-14 15:44:19 +0100

(In reply to comment #3) it almost works. Apparently fixname is still not called in qsubcompile. I added the following line after getting the batchid with ft_getopt to get rid of the '-' in the batchid: batchid = fixname(batchid); % Get rid of '-' Then indeed only underscores are left in the id and the compiling works. The matlab toolbox adding works nicely! Best, Niels


Robert Oostenveld - 2012-03-14 16:38:53 +0100

(In reply to comment #4) it was indeed not in batchid, only in jobid. Sorry about that. I now made it as private/generatebatchid.m:id = fixname(id); private/generatejobid.m:id = fixname(id); manzana> svn commit Sending qsub/private/generatebatchid.m Transmitting file data . Committed revision 5465.


Robert Oostenveld - 2012-04-11 16:48:36 +0200

I cleaned up my bugzilla list by changing the status from resolved (either fixed or wontfix) into closed. If you don't agree, please reopen the bug. Robert