Closed NaureenBharwaniNOAA closed 7 months ago
Used this source to update the Fortran time stamp as needed: https://faculty.cs.niu.edu/~hutchins/csci297p2/webpages/datetime.htm#:~:text=Suppose%20a%20FORTRAN%20program%20needs,Values%2C%20all%20used%20for%20output.
I've been failing the tests with this message Error: Error: No public SSH keys registered with NaureenBharwaniNOAA's GitHub profile
. I can try adding an SSH key to my profile, not sure if I have that set-up, but I definitely have a personal access token set-up and usually clone the HTTPS
version on a GitHub repo.
I was also initially failing 2 of test cases that are being addressed from the GitHub issue, but on my side I pass all 8 tests fine.
@NaureenBharwaniNOAA - The ssh key message isn't the failure. It's having a problem with the run hello and the mpi_pi tests. Not sure what the issue is. I assume tests pass locally?
@NaureenBharwaniNOAA - The ssh key message isn't the failure. It's having a problem with the run hello and the mpi_pi tests. Not sure what the issue is. I assume tests pass locally?
Yes, the tests do pass locally for me just fine. I was going to begin worked on the additional assert statements for the second half of this ticket. Do you think that it should be fine? Or should I hold off?
Keep working on it. I'll clone your branch and see if I can figure out what is going on.
Ok... How about this:
start_time=[]
end_time=[]
for i in (1,2):
with open('''parsl_flux_mpi_pi{}_run.out'''.format(i), "r") as pi:
for line in pi:
if re.match(r"Start Time ", line):
line = line.strip().lstrip("Start Time = ")
start_time.append(dt.strptime(line, "%d/%m/%Y %H:%M:%S"))
if re.match(r"End Time ", line):
line = line.strip().lstrip("End Time = ")
end_time.append(dt.strptime(line, "%d/%m/%Y %H:%M:%S"))
assert start_time[0] < end_time[1] and start_time[1] < end_time[0]
You could probably DRY it out even more....
times={}
for i in (1,2):
with open('''parsl_flux_mpi_pi{}_run.out'''.format(i), "r") as pi:
for line in pi:
for tstr in ("Start Time", "End Time"):
times[tstr]=[]
if re.match(r'''{} '''.format(tstr), line):
line = line.strip().lstrip('''{} = '''.format(tstr))
times[tstr].append(dt.strptime(line, "%d/%m/%Y %H:%M:%S"))
assert times["Start Time"][0] < times["End Time"][1] and times["Start Time"][1] < times["End Time"][0]
@NaureenBharwaniNOAA - Please go ahead and merge this when you have a moment.
BTW - Your solution for DRYing the code was much better than mine!
The
test_run_mpi_pi
test intest_parsl_flux_mpi_hello.py
ensures that two runs of thempi_pi.exe
program do not share nodes. The expansion of the tests verifies that the tests run concurrently.Confirming in
parsl_flux_mpi_pi1_run.out
andparsl_flux_mpi_pi2_run.out
, the output has a time stamp that has been updated for the start and end times of the run from aHH:MM:SS
format to aYYYY:MM:DD:HH:MM:SS
format. The Fortran code has been updated to reflect these changes. This update was needed to prove that the two tests run concurrently, including two additional assertions.Note: We needed to guarantee that the start time of
pi1
is not greater than the end time ofpi2
and that the start time ofpi2
is not greater than the end time ofpi1
.Currently:
Still needs to be done:
pi1
is not greater than the end time ofpi2
and that the start time ofpi2
is not greater than the end time ofpi1
.Closes #46.