Beispiel #1
0
def connect_and_list(hostname, username):
    out = ''
    conn = SSH(hostname, username=username)
    conn.push_file(os.path.abspath('remote_run.sh'), '/home/davidk/')
    # ec, out, err = conn.execute_wait("ls /tmp/remote_run.sh; bash /tmp/remote_run.sh")
    conn.close()
    return out
Beispiel #2
0
"""
from libsubmit.channels.ssh.ssh import SSHChannel
from parsl.config import Config
from parsl.executors.ipp import IPyParallelExecutor
from libsubmit.providers.torque import Torque
from parsl.tests.user_opts import user_opts
from parsl.tests.utils import get_rundir

config = Config(
    executors=[
        IPyParallelExecutor(
            label='swan_ipp',
            provider=Torque(
                channel=SSHChannel(
                    hostname='swan.cray.com',
                    username=user_opts['swan']['username'],
                    script_dir="/home/users/{}/parsl_scripts".format(user_opts['swan']['username'])
                ),
                nodes_per_block=1,
                tasks_per_node=1,
                init_blocks=1,
                max_blocks=1,
                launcher='aprun',
                overrides=user_opts['swan']['overrides']
            )
        )

    ],
    run_dir=get_rundir()
)
Beispiel #3
0
def connect_and_list(hostname, username):
    conn = SSH(hostname, username=username)
    ec, out, err = conn.execute_wait("echo $HOSTNAME")
    conn.close()
    return out
def test_push(conn, fname="test001.txt"):

    with open(fname, 'w') as f:
        f.write("Hello from parsl.ssh testing\n")

    conn.push_file(fname, "/tmp")
    ec, out, err = conn.execute_wait("ls /tmp/{0}".format(fname))
    print(ec, out, err)


def test_pull(conn, fname="test001.txt"):

    local = "foo"
    conn.pull_file("/tmp/{0}".format(fname), local)

    with open("{0}/{1}".format(local, fname), 'r') as f:
        print(f.readlines())


if __name__ == "__main__":

    libsubmit.set_stream_logger()

    # This is for testing
    conn = SSH("midway.rcc.uchicago.edu", username="******")

    test_push(conn)
    test_pull(conn)

    conn.close()
Beispiel #5
0
from parsl.tests.user_opts import user_opts

from parsl.config import Config
from parsl.executors.ipp import IPyParallelExecutor
from libsubmit.channels.ssh.ssh import SSHChannel
from libsubmit.providers.slurm.slurm import Slurm

config = Config(executors=[
    IPyParallelExecutor(provider=Slurm(
        'westmere',
        channel=SSHChannel(hostname='swift.rcc.uchicago.edu',
                           username=user_opts['midway']['username'],
                           script_dir=user_opts['midway']['script_dir']),
        init_blocks=1,
        min_blocks=1,
        max_blocks=2,
        nodes_per_block=1,
        tasks_per_node=4,
        parallelism=0.5,
        overrides=user_opts['midway']['overrides']),
                        label='midway_ipp')
])
Beispiel #6
0
from libsubmit.providers.condor.condor import Condor
from parsl.config import Config
from parsl.executors.ipp import IPyParallelExecutor
from parsl.tests.utils import get_rundir

# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this as an example, make sure to either
#       1) create a local `user_opts.py`, or
#       2) delete the user_opts import below and replace all appearances of `user_opts` with the literal value
#          (i.e., user_opts['swan']['username'] -> 'your_username')
from .user_opts import user_opts

config = Config(executors=[
    IPyParallelExecutor(
        label='osg_remote_ipp',
        provider=Condor(
            channel=SSHChannel(hostname='login.osgconnect.net',
                               username=user_opts['osg']['username'],
                               script_dir=user_opts['osg']['script_dir']),
            nodes_per_block=1,
            tasks_per_node=1,
            init_blocks=4,
            max_blocks=4,
            overrides=
            'Requirements = OSGVO_OS_STRING == "RHEL 6" && Arch == "X86_64" &&  HAS_MODULES == True',
            worker_setup=user_opts['osg']['worker_setup'],
            walltime="01:00:00"),
        controller=Controller(public_ip=user_opts['public_ip']))
],
                run_dir=get_rundir())
Beispiel #7
0
from libsubmit.channels.ssh.ssh import SSHChannel
from libsubmit.providers.slurm import Slurm
from parsl.config import Config
from parsl.executors.ipp import IPyParallelExecutor
from parsl.tests.user_opts import user_opts
from parsl.tests.utils import get_rundir

config = Config(executors=[
    IPyParallelExecutor(
        label='midway_ipp_multinode',
        provider=Slurm(
            'westmere',
            channel=SSHChannel(
                hostname='swift.rcc.uchicago.edu',
                username=user_opts['midway']['username'],
                script_dir="/scratch/midway2/{0}/parsl_scripts".format(
                    user_opts['midway']['username'])),
            overrides=user_opts['midway']['overrides'],
            nodes_per_block=1,
            tasks_per_node="$(($CORES*1))",
            walltime="00:05:00",
            init_blocks=8,
            max_blocks=8))
],
                run_dir=get_rundir())
Beispiel #8
0
| |            | |
| ++++++++++++++ |
==================
"""
from libsubmit.channels.ssh.ssh import SSHChannel
from libsubmit.providers.torque.torque import Torque
from parsl.config import Config
from parsl.executors.ipp import IPyParallelExecutor
from parsl.tests.user_opts import user_opts
from parsl.tests.utils import get_rundir

config = Config(executors=[
    IPyParallelExecutor(
        label='beagle_multinode_mpi',
        provider=Torque(
            'debug',
            channel=SSHChannel(
                hostname='login4.beagle.ci.uchicago.edu',
                username=user_opts['beagle']['username'],
                script_dir="/lustre/beagle2/{}/parsl_scripts".format(
                    user_opts['beagle']['username'])),
            nodes_per_block=1,
            tasks_per_node=1,
            init_blocks=1,
            max_blocks=1,
            launcher='aprun',
            overrides=user_opts['beagle']['overrides'],
        ))
],
                run_dir=get_rundir())