smbinterp/bin/submit.py

26 lines
476 B
Python
Raw Normal View History

2011-03-02 23:01:46 -08:00
#!/usr/bin/env python
2011-03-02 23:38:47 -08:00
import sys
2011-03-02 23:01:46 -08:00
from multiprocessing.managers import BaseManager
import numpy as np
import interp.bootstrap
class QueueManager(BaseManager): pass
QueueManager.register('get_inqueue' )
m = QueueManager(address=('gannon', 50000), authkey='asdf')
m.connect()
if __name__ == '__main__':
start = int(sys.argv[1])
end = int(sys.argv[2])
2011-03-02 23:38:47 -08:00
2011-03-02 23:01:46 -08:00
inq = m.get_inqueue()
for i in xrange(start, end + 1):
2011-03-02 23:01:46 -08:00
X = np.random.random((1,3))[0]
inq.put((i,X))