Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Razdoburdin committed Jul 27, 2023
1 parent 8644612 commit a60e815
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 24 deletions.
6 changes: 3 additions & 3 deletions examples/daal4py/covariance_spmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
# run like this:
# mpirun -n 4 python ./covariance_spmd.py

import daal4py as d4p

# let's use a reading of file in chunks (defined in spmd_utils.py)
from examples.utils import get_chunk_params, read_csv
from spmd_utils import get_chunk_params, read_csv

import daal4py as d4p


def main():
Expand Down
6 changes: 3 additions & 3 deletions examples/daal4py/low_order_moms_spmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
# run like this:
# mpirun -n 4 python ./low_order_moms_spmd.py

import daal4py as d4p

# let's use a reading of file in chunks (defined in spmd_utils.py)
from examples.utils import get_chunk_params, read_csv
from spmd_utils import get_chunk_params, read_csv

import daal4py as d4p


def main():
Expand Down
File renamed without changes.
25 changes: 7 additions & 18 deletions tests/run_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def run(exdir, logdir, nodist=False, nostream=False):
if script.endswith(".py") and script not in ["__init__.py"]:
n += 1
if script in skiped_files:
print("\n##### " + jp(dirpath, script))
print(
strftime("%H:%M:%S", gmtime())
+ "\tKNOWN BUG IN EXAMPLES\t"
Expand All @@ -249,9 +250,7 @@ def run(exdir, logdir, nodist=False, nostream=False):
logfn = jp(logdir, script.replace(".py", ".res"))
with open(logfn, "w") as logfile:
print("\n##### " + jp(dirpath, script))
execute_string = get_exe_cmd(
jp(dirpath, script), nodist, nostream
)
execute_string = get_exe_cmd(jp(dirpath, script), nodist, nostream)
if execute_string:
os.chdir(dirpath)
proc = subprocess.Popen(
Expand All @@ -271,23 +270,13 @@ def run(exdir, logdir, nodist=False, nostream=False):
"\t" + script + "\twith errno"
"\t" + str(proc.returncode)
)
out = proc.communicate()[0]
logfile.write(out.decode("ascii"))
if proc.returncode:
print(out)
print(
strftime("%H:%M:%S", gmtime()) + "\tFAILED"
"\t" + script + "\twith errno"
"\t" + str(proc.returncode)
)
else:
success += 1
print(
strftime("%H:%M:%S", gmtime()) + "\t"
"PASSED\t" + script
)
else:
success += 1
print(
strftime("%H:%M:%S", gmtime()) + "\t" "PASSED\t" + script
)
else:
success += 1
print(strftime("%H:%M:%S", gmtime()) + "\tSKIPPED\t" + script)
return success, n

Expand Down

0 comments on commit a60e815

Please sign in to comment.