more robust ssh vs. non-ssh implementation

Issue #113 resolved
Prateek Mehta created an issue

On this line:

https://bitbucket.org/andrewpeterson/amp/src/a7104095356ae2d9733c5967cddbdea76224dfa5/amp/utilities.py?at=master&fileviewer=file-view-default#utilities.py-176

we check if workerhostname != 'localhost':

In the queue, my workerhostname can be something like 'Hostname: cab1189' so amp still execute the ssh version, even though I want to run without ssh.

Comments (4)

  1. andrew_peterson repo owner

    Are you sure this is causing a problem? I think it shouldn't. How are you assigning the cores? Is the utility assigning them for you, or are you manually specifying? If you feed in cores=16 or cores={'localhost': 16}, I think it will perform without making SSH sessions, because in that line you sent it will see that the workerhostname as 'localhost' and set up local connections.

    Unless you are using slurm --- then it might be assigning the node name in that dictionary. Is that what is happening? A workaround should be manual core specification, as noted above.

  2. Prateek Mehta reporter

    Yes. This is only an issue when you try to automatically assign nodes with the utility. Specifying the cores manually like you said will work without making ssh sessions. I use both slurm and sge depending on the machine (I actually locally modified assign_cores to set cores = {'localhost': int(os.environ['NSLOTS'])} for SGE).

  3. Log in to comment