-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated implementation of cross-cluster computing and examples
- Loading branch information
Darren Govoni
committed
Mar 1, 2022
1 parent
54bc631
commit edc44d5
Showing
11 changed files
with
308 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
from blazer.hpc.alcf import cooley, thetagpu | ||
from blazer.hpc.local import parallel, pipeline, partial as p | ||
|
||
job1 = cooley.job(n=2, q="debug", A="datascience", password=True, script="/home/dgovoni/git/blazer/testcooley.sh") | ||
job2 = thetagpu.job(n=1, q="single-gpu", A="datascience", password=True, script="/home/dgovoni/git/blazer/testthetagpu.sh") | ||
# Log into each cluster using MAF password from MobilePASS | ||
cooleyjob = cooley.job(user='dgovoni', n=1, q="debug", A="datascience", password=True, script="/home/dgovoni/git/blazer/testcooley.sh").login() | ||
thetajob = thetagpu.job(user='dgovoni', n=1, q="single-gpu", A="datascience", password=True, script="/home/dgovoni/git/blazer/testthetagpu.sh").login() | ||
|
||
result = "start" | job1 | job2 | ||
print(result) | ||
def hello(data, *args): | ||
return "Hello "+str(data) | ||
|
||
''' | ||
job2 = thetagpu.job(n=1, q="single-gpu", A="datascience", venv="/home/dgovoni/git/blazer/venv/bin/python", password=True, | ||
code="/home/dgovoni/git/blazer/blazer/examples/example7.py") | ||
''' | ||
# Mix and match cluster compute jobs with local code tasks | ||
# in serial chaining | ||
cooleyjob("some data").then(hello).then(thetajob).then(hello) | ||
|
||
# Run a cross cluster compute job | ||
result = pipeline([ | ||
p(thetajob,"some data2"), | ||
p(cooleyjob,"some data1") | ||
]) | ||
|
||
print("Done") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from . import _cooley as cooley | ||
from . import _thetagpu as thetagpu | ||
from pipe import Pipe | ||
|
||
__all__ = ( | ||
'cooley', | ||
'thetagpu' | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.