diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-14 09:52:18 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-14 09:52:18 +0200 |
commit | 5048479cd345233f2ba33ad335dbf44d007d95bf (patch) | |
tree | 8bf5dd99b39268937f2a84f14adc26b57735f446 | |
parent | c36996e5ca4ea047e55778004a99d9f7cad9282f (diff) |
Remove (no longer valid) upstream benchmark scripts; update README accordingly
-rw-r--r-- | README.md | 82 | ||||
-rw-r--r-- | run_strong_full.py | 122 | ||||
-rw-r--r-- | run_strong_rank.py | 133 | ||||
-rw-r--r-- | run_weak.py | 173 | ||||
-rwxr-xr-x | set-root-dir.sh | 3 |
5 files changed, 16 insertions, 497 deletions
@@ -91,18 +91,20 @@ CPU and DPU benchmarks in this repository have been adjusted as follows: GPU versions are un-changed. The original README follows. +It contains minor adjustments to the directory structure; +benchmark how-tos that no do not apply to this fork have been removed. --- # PrIM (Processing-In-Memory Benchmarks) -PrIM is the first benchmark suite for a real-world processing-in-memory (PIM) architecture. -PrIM is developed to evaluate, analyze, and characterize the first publicly-available real-world processing-in-memory (PIM) architecture, the [UPMEM](https://www.upmem.com/) PIM architecture. +PrIM is the first benchmark suite for a real-world processing-in-memory (PIM) architecture. +PrIM is developed to evaluate, analyze, and characterize the first publicly-available real-world processing-in-memory (PIM) architecture, the [UPMEM](https://www.upmem.com/) PIM architecture. The UPMEM PIM architecture combines traditional DRAM memory arrays with general-purpose in-order cores, called DRAM Processing Units (DPUs), integrated in the same chip. -PrIM provides a common set of workloads to evaluate the UPMEM PIM architecture with and can be useful for programming, architecture and system researchers all alike to improve multiple aspects of future PIM hardware and software. -The workloads have different characteristics, exhibiting heterogeneity in their memory access patterns, operations and data types, and communication patterns. -This repository also contains baseline CPU and GPU implementations of PrIM benchmarks for comparison purposes. +PrIM provides a common set of workloads to evaluate the UPMEM PIM architecture with and can be useful for programming, architecture and system researchers all alike to improve multiple aspects of future PIM hardware and software. +The workloads have different characteristics, exhibiting heterogeneity in their memory access patterns, operations and data types, and communication patterns. +This repository also contains baseline CPU and GPU implementations of PrIM benchmarks for comparison purposes. PrIM also includes a set of microbenchmarks can be used to assess various architecture limits such as compute throughput and memory bandwidth. @@ -156,18 +158,15 @@ Bibtex entries for citation: ## Repository Structure and Installation -We point out next the repository structure and some important folders and files. -All benchmark folders have similar structure to the one shown for BFS. -The microbenchmark folder contains eight different microbenchmarks, each with similar folder structure. +We point out next the repository structure and some important folders and files. +All benchmark folders have similar structure to the one shown for BFS. +The microbenchmark folder contains eight different microbenchmarks, each with similar folder structure. The repository also includes `run_*.py` scripts to run strong and weak scaling experiments for PrIM benchmarks. ``` . +-- LICENSE +-- README.md -+-- run_strong_full.py -+-- run_strong_rank.py -+-- run_weak.py +-- BFS/ | +-- baselines/ | | +-- cpu/ @@ -175,7 +174,7 @@ The repository also includes `run_*.py` scripts to run strong and weak scaling e | +-- data/ | +-- dpu/ | +-- host/ -| +-- support/ +| +-- include/ | +-- Makefile +-- BS/ | +-- ... @@ -220,60 +219,12 @@ The repository also includes `run_*.py` scripts to run strong and weak scaling e ### Prerequisites -Running PrIM requires installing the [UPMEM SDK](https://sdk.upmem.com). +Running PrIM requires installing the [UPMEM SDK](https://sdk.upmem.com). PrIM benchmarks and microbenchmarks are designed to run on a server with real UPMEM modules, but they also run on the functional simulator include in the UPMEM SDK. -### Getting Started - -Clone the repository: -```sh -git clone https://github.com/CMU-SAFARI/prim-benchmarks - -cd prim-benchmarks -./set-root-dir.sh -``` - ## Running PrIM -### PrIM Benchmarks - -The repository includes scripts to run weak scaling and strong scaling experiments: -* `run_weak.py`: Weak scaling experiments for 16 PrIM benchmarks using 1 rank of UPMEM DPUs (1 to 64 DPUs). -* `run_strong_rank.py`: Strong scaling experiments for 16 PrIM benchmarks using 1 rank of UPMEM DPUs (1 to 64 DPUs). -* `run_strong_full.py`: Strong scaling experiments for 16 PrIM benchmarks using 4 to 32 ranks of UPMEM DPUs (256 to 2048 DPUs). - -To run weak scaling experiments for BFS or SpMV, update the paths to input files in `run_weak.py`. -The scripts save the results in a folder called `profile` inside each benchmark folder. - -```sh -cd prim-benchmarks - -# Weak scaling experiments for BFS -python3 run_weak.py BFS -``` - -Inside each PrIM benchmark folder, one can compile and run each benchmark with different input parameters. -Choose a benchmark and compile. Every Makefile accepts several input parameters: -```sh -cd BFS - -# Compile BFS for 32 DPUs and 16 tasklets (i.e., software threads) per DPU -NR_DPUS=32 NR_TASKLETS=16 make all -``` - -For help instructions: -```sh -./bin/host_code -h -``` - -Run the benchmark: -```sh -./bin/host_code -v 0 -f data/loc-gowalla_edges.txt -``` - -Several benchmark folders (HST-S, HST-L, RED, SCAN-SSA, SCAN-RSS) contain a script (`run.sh`) that compiles and runs the benchmark for the experiments in the appendix of the [paper](https://arxiv.org/pdf/2105.03814.pdf). - -### Microbenchmarks +### Microbenchmarks Each microbenchmark folder contains a script (`run.sh`) that compiles and runs the microbenchmark for the experiments in the [paper](https://arxiv.org/pdf/2105.03814.pdf): @@ -285,10 +236,9 @@ cd Microbenchmarks/Arithmetic-Throughput ### Getting Help -If you have any suggestions for improvement, please contact el1goluj at gmail dot com. +If you have any suggestions for improvement, please contact el1goluj at gmail dot com. If you find any bugs or have further questions or requests, please post an issue at the [issue page](https://github.com/CMU-SAFARI/prim-benchmarks/issues). +## Acknowledgments -## Acknowledgments - -We thank UPMEM’s Fabrice Devaux, Rémy Cimadomo, Romaric Jodin, and Vincent Palatin for their valuable support. We acknowledge the support of SAFARI Research Group’s industrial partners, especially ASML, Facebook, Google, Huawei, Intel, Microsoft, VMware, and the Semiconductor Research Corporation. Izzat El Hajj acknowledges the support of the University Research Board of the American University of Beirut (URB-AUB-103951-25960). +We thank UPMEM’s Fabrice Devaux, Rémy Cimadomo, Romaric Jodin, and Vincent Palatin for their valuable support. We acknowledge the support of SAFARI Research Group’s industrial partners, especially ASML, Facebook, Google, Huawei, Intel, Microsoft, VMware, and the Semiconductor Research Corporation. Izzat El Hajj acknowledges the support of the University Research Board of the American University of Beirut (URB-AUB-103951-25960). diff --git a/run_strong_full.py b/run_strong_full.py deleted file mode 100644 index c65fecd..0000000 --- a/run_strong_full.py +++ /dev/null @@ -1,122 +0,0 @@ -import os -import sys -import getpass - -rootdir = "/" # Include path to repo - -applications = {"VA" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 167772160 -x 1"], - "GEMV" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/gemv_host -m 163840 -n 4096"], - "SpMV" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -v 0 -f data/bcsstk30.mtx.64.mtx"], - "SEL" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 251658240 -x 1"], - "UNI" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 251658240 -x 1"], - "BS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/bs_host -i 16777216"], - "TS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/ts_host -n 33554432"], - "BFS" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -v 0 -f data/loc-gowalla_edges.txt"], - "MLP" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/mlp_host -m 163840 -n 4096"], - "NW" : ["NR_DPUS=X NR_TASKLETS=Y BL=32 BL_IN=2 make all", "./bin/nw_host -w 0 -e 1 -n 65536"], - "HST-S" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -b 256 -x 2"], - "HST-L" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -b 256 -x 2"], - "RED" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z VERSION=SINGLE make all", "./bin/host_code -w 0 -e 1 -i 419430400 -x 1"], - "SCAN-SSA" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 251658240 -x 1"], - "SCAN-RSS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 251658240 -x 1"], - "TRNS" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -w 0 -e 1 -p 2048 -o 12288 -x 1"],} - -def run(app_name): - - NR_TASKLETS = [1, 2, 4, 8, 16] - NR_DPUS = [256, 512, 1024, 2048] - BL = [10] - - if app_name in applications: - print ("------------------------ Running: "+app_name+"----------------------") - print ("--------------------------------------------------------------------") - if(len(applications[app_name]) > 1): - make = applications[app_name][0] - run_cmd = applications[app_name][1] - - os.chdir(rootdir + "/"+app_name) - os.getcwd() - - os.system("make clean") - - try: - os.mkdir(rootdir + "/"+ app_name +"/bin") - except OSError: - print ("Creation of the direction /bin failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/log") - except OSError: - print ("Creation of the direction /log failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/log/host") - except OSError: - print ("Creation of the direction /log/host failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/profile") - except OSError: - print ("Creation of the direction /profile failed") - - - for r in NR_DPUS: - for t in NR_TASKLETS: - for b in BL: - m = make.replace("X", str(r)) - m = m.replace("Y", str(t)) - m = m.replace("Z", str(b)) - print ("Running = " + m) - try: - os.system(m) - except: - pass - - r_cmd = run_cmd.replace("#ranks", str(r)) - r_cmd = r_cmd + " >> profile/outss_tl"+str(t)+"_bl"+str(b)+"_dpus"+str(r) - - print ("Running = " + app_name + " -> "+ r_cmd) - try: - os.system(r_cmd) - except: - pass - else: - make = applications[app_name] - - os.chdir(rootdir + "/"+app_name) - os.getcwd() - - try: - os.mkdir(rootdir + "/"+ app_name +"/bin") - os.mkdir(rootdir + "/"+ app_name +"/log") - os.mkdir(rootdir + "/"+ app_name +"/log/host") - os.mkdir(rootdir + "/"+ app_name +"/profile") - except OSError: - print ("Creation of the direction failed") - - print (make) - os.system(make + ">& profile/out") - - else: - print ( "Application "+app_name+" not available" ) - -def main(): - if(len(sys.argv) < 2): - print ("Usage: python run.py application") - print ("Applications available: ") - for key, value in applications.items(): - print (key ) - print ("All") - - else: - cmd = sys.argv[1] - print ("Application to run is: " + cmd ) - if cmd == "All": - for key, value in applications.items(): - run(key) - os.chdir(rootdir) - else: - run(cmd) - -if __name__ == "__main__": - main() diff --git a/run_strong_rank.py b/run_strong_rank.py deleted file mode 100644 index 68f401e..0000000 --- a/run_strong_rank.py +++ /dev/null @@ -1,133 +0,0 @@ -import os -import sys -import getpass - -rootdir = "/" # Include path to repo -print("Root dir: " + rootdir) - -applications = {"VA" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 2621440 -x 1"], - "GEMV" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/gemv_host -m 8192 -n 1024"], - "SpMV" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -v 0"], - "SEL" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 3932160 -x 1"], - "UNI" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 3932160 -x 1"], - "BS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/bs_host -i 262144"], - "TS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/ts_host -n 524288"], - "BFS" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -v 0 -f data/loc-gowalla_edges.txt"], - "MLP" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/mlp_host -m 8192 -n 1024"], - "NW" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z BL_IN=2 make all", "./bin/nw_host -w 0 -e 1 -n 2560"], - "HST-S" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -b 256 -x 1"], - "HST-L" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -b 256 -x 1"], - "RED" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z VERSION=SINGLE make all", "./bin/host_code -w 0 -e 1 -i 6553600 -x 1"], - "SCAN-SSA" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 3932160 -x 1"], - "SCAN-RSS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i 3932160 -x 1"], - "TRNS" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -w 0 -e 1 -p 64 -o 12288 -x 1"],} - -def run(app_name): - - NR_TASKLETS = [1, 2, 4, 8, 16] - NR_DPUS = [1, 4, 16, 64] - BL = [10] - - if app_name in applications: - print ("------------------------ Running: "+app_name+"----------------------") - print ("--------------------------------------------------------------------") - if(len(applications[app_name]) > 1): - make = applications[app_name][0] - run_cmd = applications[app_name][1] - - os.chdir(rootdir + "/"+app_name) - os.getcwd() - - os.system("make clean") - - try: - os.mkdir(rootdir + "/"+ app_name +"/bin") - except OSError: - print ("Creation of the direction /bin failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/log") - except OSError: - print ("Creation of the direction /log failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/log/host") - except OSError: - print ("Creation of the direction /log/host failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/profile") - except OSError: - print ("Creation of the direction /profile failed") - - - for r in NR_DPUS: - for t in NR_TASKLETS: - for b in BL: - m = make.replace("X", str(r)) - m = m.replace("Y", str(t)) - if (app_name == "NW"): - if (r == 1): - m = m.replace("Z", str(2560)) - elif (r == 4): - m = m.replace("Z", str(640)) - elif (r == 16): - m = m.replace("Z", str(160)) - elif (r == 64): - m = m.replace("Z", str(40)) - else: - m = m.replace("Z", str(b)) - print ("Running = " + m) - try: - os.system(m) - except: - pass - - r_cmd = run_cmd.replace("#ranks", str(r)) - r_cmd = r_cmd + " >> profile/outs_tl"+str(t)+"_bl"+str(b)+"_dpus"+str(r) - - print ("Running = " + app_name + " -> "+ r_cmd) - try: - os.system(r_cmd) - except: - pass - else: - make = applications[app_name] - - os.chdir(rootdir + "/"+app_name) - os.getcwd() - - try: - os.mkdir(rootdir + "/"+ app_name +"/bin") - os.mkdir(rootdir + "/"+ app_name +"/log") - os.mkdir(rootdir + "/"+ app_name +"/log/host") - os.mkdir(rootdir + "/"+ app_name +"/profile") - except OSError: - print ("Creation of the direction failed") - - print (make) - os.system(make + ">& profile/out") - - else: - print ( "Application "+app_name+" not available" ) - -def main(): - if(len(sys.argv) < 2): - print ("Usage: python run.py application") - print ("Applications available: ") - for key, value in applications.items(): - print (key ) - print ("All") - - else: - cmd = sys.argv[1] - print ("Application to run is: " + cmd ) - if cmd == "All": - for key, value in applications.items(): - run(key) - os.chdir(rootdir) - else: - run(cmd) - -if __name__ == "__main__": - main() diff --git a/run_weak.py b/run_weak.py deleted file mode 100644 index a613675..0000000 --- a/run_weak.py +++ /dev/null @@ -1,173 +0,0 @@ -import os -import sys -import getpass - -rootdir = "/" # Include path to repo - -applications = {"VA" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i #elements -x 0"], - "GEMV" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/gemv_host -m #elements -n 2048"], - "SpMV" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -v 0 -f file_name"], - "SEL" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i #elements -x 0"], - "UNI" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i #elements -x 0"], - "BS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/bs_host -i #elements"], - "TS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/ts_host -n #elements"], - "BFS" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -v 0 -f file_name"], - "MLP" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/mlp_host -m #elements -n 1024"], - "NW" : ["NR_DPUS=X NR_TASKLETS=Y BL=512 BL_IN=8 make all", "./bin/nw_host -w 0 -e 1 -n #elements"], - "HST-S" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -b 256 -x 0"], - "HST-L" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -b 256 -x 0"], - "RED" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z VERSION=SINGLE make all", "./bin/host_code -w 0 -e 1 -i #elements -x 0"], - "SCAN-SSA" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i #elements -x 0"], - "SCAN-RSS" : ["NR_DPUS=X NR_TASKLETS=Y BL=Z make all", "./bin/host_code -w 0 -e 1 -i #elements -x 0"], - "TRNS" : ["NR_DPUS=X NR_TASKLETS=Y make all", "./bin/host_code -w 0 -e 1 -p #elements -o 12288 -x 0"],} - -def run(app_name): - - NR_DPUS = [1, 4, 16, 64] - NR_TASKLETS = [1, 2, 4, 8, 16] - size = 1 - BL = [10] - if(app_name == "VA"): - size = 2621440 - if(app_name == "GEMV"): - size = 1024 - if(app_name == "SEL" or app_name == "UNI" or app_name == "SCAN-SSA" or app_name == "SCAN-RSS"): - size = 3932160 - if(app_name == "TS"): - size = 524288 - if(app_name == "BS"): - size = 262144 - if(app_name == "MLP"): - size = 1024 - if(app_name == "RED"): - size = 6553600 - if(app_name == "TRNS"): - size = 1 - - - if app_name in applications: - print ("------------------------ Running: "+app_name+"----------------------") - print ("--------------------------------------------------------------------") - if(len(applications[app_name]) > 1): - make = applications[app_name][0] - run_cmd = applications[app_name][1] - - os.chdir(rootdir + "/"+app_name) - os.getcwd() - - os.system("make clean") - - try: - os.mkdir(rootdir + "/"+ app_name +"/bin") - except OSError: - print ("Creation of the direction /bin failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/log") - except OSError: - print ("Creation of the direction /log failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/log/host") - except OSError: - print ("Creation of the direction /log/host failed") - - try: - os.mkdir(rootdir + "/"+ app_name +"/profile") - except OSError: - print ("Creation of the direction /profile failed") - - - for r in NR_DPUS: - for t in NR_TASKLETS: - for b in BL: - m = make.replace("X", str(r)) - m = m.replace("Y", str(t)) - m = m.replace("Z", str(b)) - print ("Running = " + m) - try: - os.system(m) - except: - pass - - if(app_name == "NW"): - if(r == 1): - r_cmd = run_cmd.replace("#elements", str(512)) - if(r == 4): - r_cmd = run_cmd.replace("#elements", str(2048)) - if(r == 16): - r_cmd = run_cmd.replace("#elements", str(8192)) - if(r == 64): - r_cmd = run_cmd.replace("#elements", str(32768)) - elif(app_name == "GEMV" or app_name == "MLP" or app_name == "TS" or app_name == "BS"): - r_cmd = run_cmd.replace("#elements", str(r * size)) - else: - r_cmd = run_cmd.replace("#elements", str(size)) - if(app_name == "BFS"): - if(r == 1): - # Generate rMat graphs using: - # https://github.com/cmuparlay/pbbsbench/blob/master/testData/graphData/rMatGraph.html - # https://github.com/cmuparlay/pbbsbench/blob/master/testData/graphData/rMatGraph.C - r_cmd = run_cmd.replace("file_name", "/") # Include path to input file - rMat graph - if(r == 4): - r_cmd = run_cmd.replace("file_name", "/") # Include path to input file - rMat graph - if(r == 16): - r_cmd = run_cmd.replace("file_name", "/") # Include path to input file - rMat graph - if(r == 64): - r_cmd = run_cmd.replace("file_name", "/") # Include path to input file - rMat graph - if(app_name == "SpMV"): - if(r == 1): - r_cmd = run_cmd.replace("file_name", "/") # Include path to input file - Check SpMV/data/generate - if(r == 4): - r_cmd = run_cmd.replace("file_name", "/") # Include path to input file - Check SpMV/data/generate - if(r == 16): - r_cmd = run_cmd.replace("file_name", "/") # Include path to input file - Check SpMV/data/generate - if(r == 64): - r_cmd = run_cmd.replace("file_name", "/") # Include path to input file - Check SpMV/data/generate - r_cmd = r_cmd + " >> profile/out_tl"+str(t)+"_bl"+str(b)+"_dpus"+str(r) - - print ("Running = " + app_name + " -> "+ r_cmd) - try: - os.system(r_cmd) - except: - pass - else: - make = applications[app_name] - - os.chdir(rootdir + "/"+app_name) - os.getcwd() - - try: - os.mkdir(rootdir + "/"+ app_name +"/bin") - os.mkdir(rootdir + "/"+ app_name +"/log") - os.mkdir(rootdir + "/"+ app_name +"/log/host") - os.mkdir(rootdir + "/"+ app_name +"/profile") - except OSError: - print ("Creation of the direction failed") - - print (make) - os.system(make + ">& profile/out") - - else: - print ( "Application "+app_name+" not available" ) - -def main(): - if(len(sys.argv) < 2): - print ("Usage: python run.py application") - print ("Applications available: ") - for key, value in applications.items(): - print (key ) - print ("All") - - else: - cmd = sys.argv[1] - print ("Application to run is: " + cmd ) - if cmd == "All": - for key, value in applications.items(): - run(key) - os.chdir(rootdir) - else: - run(cmd) - -if __name__ == "__main__": - main() diff --git a/set-root-dir.sh b/set-root-dir.sh deleted file mode 100755 index 35be69f..0000000 --- a/set-root-dir.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -sed -i 's!rootdir = "/"!rootdir = "'"$(pwd)"'"!' *.py |