Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Strange output using qsub

I wrote a Sage code and it works fine on my notebook: nohup < QE.sage > QE.txt & the output file QE.txt looks OK. When I try to use the same code on a cluster using qsub -q test.q QE.sh then the output is


| Sage Version 5.9, Release Date: 2013-04-30 | | Type "notebook()" for the browser-based notebook interface. |

| Type "help()" for help. |

.[?1034hsage: ....: ....: ....: sage: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ... .: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: .. ..: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: . ...: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: .... : sage: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ... .: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: sage: sage: ....: ....: ....: ....: ....: ....: ....: Exiting Sage (CPU time 0m1.86s, Wall time 0m1.88s).

here QE.sh is as follows

!/bin/sh

$ -N QE.sage

module load sage sage < QE.sage

Also if I use @parallel() on my notebook, then it works as expected:

@parallel(ncpus=2) def szamol(a,b): w=QEllCur([a,b,1]) if w==-1: return "bad input" else: return w

W=list(szamol([(a,b) for a in range(-2,3) for b in range(-2,3)])) for X, Y in sorted(W): print X, Y

The CPU time is about 2 sec on my notebook using 2 cores on the cluster using less than 12 cores it prints the first pair and that is it after running (not waiting in the que) more than 2 hours.

My questions are:

  1. how to get the same output using my code on a (linux) cluster as using it on my (linux) notebook?

  2. how to use @parallel() on a cluster?

Strange output using qsub

I wrote a Sage code and it works fine on my notebook: nohup < QE.sage > QE.txt & the output file QE.txt looks OK. When I try to use the same code on a cluster using qsub -q test.q QE.sh then the output is


----------------------------------------------------------------------
| Sage Version 5.9, Release Date: 2013-04-30                         |
| Type "notebook()" for the browser-based notebook interface.        |

| | Type "help()" for help. |

| ---------------------------------------------------------------------- .[?1034hsage: ....: ....: ....: sage: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ... .: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: .. ..: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: . ...: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: .... : sage: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ... .: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: ....: sage: sage: ....: ....: ....: ....: ....: ....: ....: Exiting Sage (CPU time 0m1.86s, Wall time 0m1.88s).

0m1.88s).

here QE.sh is as follows

!/bin/sh

$
#!/bin/sh
#$ -N QE.sage

QE.sage module load sage sage < QE.sage

QE.sage

Also if I use @parallel() on my notebook, then it works as expected:

@parallel(ncpus=2)
def szamol(a,b):
  w=QEllCur([a,b,1])
  if w==-1:
    return "bad input"
  else:
    return w

w W=list(szamol([(a,b) for a in range(-2,3) for b in range(-2,3)])) for X, Y in sorted(W): print X, Y

Y

The CPU time is about 2 sec on my notebook using 2 cores on the cluster using less than 12 cores it prints the first pair and that is it after running (not waiting in the que) more than 2 hours.

My questions are:

  1. how to get the same output using my code on a (linux) cluster as using it on my (linux) notebook?

  2. how to use @parallel() on a cluster?