Re-using SSH Connections

9 views
Skip to first unread message

Vishal Shah

unread,
Apr 7, 2014, 1:32:43 PM4/7/14
to saga-...@googlegroups.com
Hello,

I was using SAGA-Python to submit jobs to Trestles in succession: a new job would be submitted once the previous job finished, and I had over 500 login sessions, which resulted in a loss of service on one of the login nodes.

Is there any way to re-use an ssh connection with SAGA-Python?

Thanks,
Vishal


Andre Merzky

unread,
Apr 7, 2014, 4:19:24 PM4/7/14
to saga-...@googlegroups.com
This should not happen: a single saga.job.Service instance for
submitting jobs should re-use the ssh channel. Additional channels
are created and torn down for data transfers though. If you send me
some example code, I'd be happy to look into this.

Thanks, Andre.
> --
> You received this message because you are subscribed to the Google Groups
> "saga-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to saga-users+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Nothing is really difficult.

Ole Weidner

unread,
Apr 8, 2014, 10:24:56 AM4/8/14
to saga-...@googlegroups.com
Hi Vishal,

SSH connections in SAGA-Python should get re-used if you keep the service instance alive:

s = saga.job.Service()

for x in range(0,1024):
j = s.create_job(jd)
j.run()

If you re-create the service object in each iteration (i.e., move it inside the loop) and if your jobs run in very short succession, you might end up getting blocked on some system...

Hope this helps. If not, please send us some code and we can have a look at it ;-)

Thanks
Ole
signature.asc

Andre Merzky

unread,
Apr 8, 2014, 10:28:01 AM4/8/14
to saga-...@googlegroups.com
Sorry, I didn't realize that part of the thread went off-list. Vishal
sent some code, and indeed created a new job.Service instance per job
-- so your advice will most likely solve the issue.

Best, Andre.

Ole Weidner

unread,
Apr 8, 2014, 10:33:45 AM4/8/14
to saga-...@googlegroups.com
Great ;-)

Thanks Andre.
signature.asc
Reply all
Reply to author
Forward
0 new messages