Skip to content
This repository has been archived by the owner on May 10, 2023. It is now read-only.

Commit

Permalink
Blacken Python files
Browse files Browse the repository at this point in the history
Blacken Python files
  • Loading branch information
cmoussa1 committed Jan 15, 2020
1 parent 539860b commit 45f21ca
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 48 deletions.
17 changes: 10 additions & 7 deletions example2/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
import argparse
import time

parser = argparse.ArgumentParser (description='compute for seconds')
parser.add_argument ('integer', metavar='S', type=int,
help='an integer for the number of seconds to compute')
parser = argparse.ArgumentParser(description="compute for seconds")
parser.add_argument(
"integer",
metavar="S",
type=int,
help="an integer for the number of seconds to compute",
)

args = parser.parse_args ()

print "Will compute for " + str (args.integer) + " seconds."
time.sleep (args.integer)
args = parser.parse_args()

print "Will compute for " + str(args.integer) + " seconds."
time.sleep(args.integer)
17 changes: 10 additions & 7 deletions example2/io-forwarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
import argparse
import time

parser = argparse.ArgumentParser (description='forward I/O requests for seconds')
parser.add_argument ('integer', metavar='S', type=int,
help='an integer for the number of seconds to compute')
parser = argparse.ArgumentParser(description="forward I/O requests for seconds")
parser.add_argument(
"integer",
metavar="S",
type=int,
help="an integer for the number of seconds to compute",
)

args = parser.parse_args ()

print "Will forward I/O requests for " + str (args.integer) + " seconds."
time.sleep (args.integer)
args = parser.parse_args()

print "Will forward I/O requests for " + str(args.integer) + " seconds."
time.sleep(args.integer)
30 changes: 13 additions & 17 deletions example2/submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,18 @@
import flux
from flux.job import JobspecV1

f = flux.Flux ()
f = flux.Flux()

compute_jobreq = JobspecV1.from_command (
command=["./compute.py", "120"],
num_tasks=4,
num_nodes=2,
cores_per_task=2)
compute_jobreq.cwd = os.getcwd ()
compute_jobreq.environment = dict (os.environ)
print (flux.job.submit (f, compute_jobreq))
compute_jobreq = JobspecV1.from_command(
command=["./compute.py", "120"], num_tasks=4, num_nodes=2, cores_per_task=2
)
compute_jobreq.cwd = os.getcwd()
compute_jobreq.environment = dict(os.environ)
print(flux.job.submit(f, compute_jobreq))

io_jobreq = JobspecV1.from_command (
command=["./io-forwarding.py", "120"],
num_tasks=1,
num_nodes=1,
cores_per_task=1)
io_jobreq.cwd = os.getcwd ()
io_jobreq.environment = dict (os.environ)
print (flux.job.submit (f, io_jobreq))
io_jobreq = JobspecV1.from_command(
command=["./io-forwarding.py", "120"], num_tasks=1, num_nodes=1, cores_per_task=1
)
io_jobreq.cwd = os.getcwd()
io_jobreq.environment = dict(os.environ)
print(flux.job.submit(f, io_jobreq))
30 changes: 13 additions & 17 deletions example2/submitter2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,18 @@
import flux
from flux.job import JobspecV1

f = flux.Flux ()
f = flux.Flux()

compute_jobreq = JobspecV1.from_command (
command=["./compute.py", "120"],
num_tasks=6,
num_nodes=3,
cores_per_task=2)
compute_jobreq.cwd = os.getcwd ()
compute_jobreq.environment = dict (os.environ)
print (flux.job.submit (f, compute_jobreq))
compute_jobreq = JobspecV1.from_command(
command=["./compute.py", "120"], num_tasks=6, num_nodes=3, cores_per_task=2
)
compute_jobreq.cwd = os.getcwd()
compute_jobreq.environment = dict(os.environ)
print(flux.job.submit(f, compute_jobreq))

io_jobreq = JobspecV1.from_command (
command=["./io-forwarding.py", "120"],
num_tasks=3,
num_nodes=3,
cores_per_task=1)
io_jobreq.cwd = os.getcwd ()
io_jobreq.environment = dict (os.environ)
print (flux.job.submit (f, io_jobreq))
io_jobreq = JobspecV1.from_command(
command=["./io-forwarding.py", "120"], num_tasks=3, num_nodes=3, cores_per_task=1
)
io_jobreq.cwd = os.getcwd()
io_jobreq.environment = dict(os.environ)
print(flux.job.submit(f, io_jobreq))

0 comments on commit 45f21ca

Please sign in to comment.