Skip to content

Instantly share code, notes, and snippets.

View AxoyTO's full-sized avatar
👨‍💻

Tevfik Aksoy AxoyTO

👨‍💻
View GitHub Profile
@AxoyTO
AxoyTO / datagatherer.py
Created March 6, 2023 19:47
OpenMP Scalability Task Data Gatherer from Result File
import re
import pandas as pd
def parse_data(files=["1/1_unoptimized.out", "1/1_optimized.out"]):
threads_list = []
times_list = []
for filename in files:
tmp_threads_list = []
@AxoyTO
AxoyTO / omp_scalability_script.py
Created March 6, 2023 17:46
OpenMP Scalablity Task Planner Script
from sys import argv, exit
import os
MAX_THREADS = 32
def compile(codedir, flag):
if flag == 'u':
codefile = codedir + '_unoptimized'
elif flag == 'o':
codefile = codedir + '_optimized'
@AxoyTO
AxoyTO / cgsolver_dataparser.py
Created May 19, 2022 08:41
CGSolver Result Parser
import pandas as pd
import re
def delete_unnecessary_lines():
"""
Deleting all other lines, leaves only the last launch results in the file.
"""
with open("result.out", "r+") as f:
fpos, seek_pos = 0, 0
@AxoyTO
AxoyTO / dataparser_mpi.py
Created March 30, 2022 20:34
Results Data Parser for Householder+ReverseGaussian MPI Program in IBM Polus
import re
import pandas as pd
def parse_data(filename="result.out"):
processes_list = []
sizes_list = []
T1_times_list = []
T2_times_list = []
total_times_list = []
@AxoyTO
AxoyTO / Makefile
Created March 27, 2022 16:37
Makefile to run C++11 MPI Project
SHELL = /bin/bash # -> IBM POLUS
#SHELL = /bin/sh # -> MY COMPUTER
SRC = main.cpp functions.cpp
BIN = main
C++FLAGS = -o $(BIN) -std=c++11
C++ = mpic++
#C++POLUS = xlc++ | mpixlc
DATE = $(shell date +%d/%m/%y)
POLUS_MPI_SOURCE = $(shell . mpi_source.sh)
@AxoyTO
AxoyTO / mpi_source.sh
Created March 27, 2022 16:24
Shell script that executes IBM compiler and runs Makefile
#!/bin/bash
source /polusfs/setenv/setup.SMPI
make -f Makefile || exit
@AxoyTO
AxoyTO / planner_mpi.py
Created March 27, 2022 16:22
IBM Polus MPI Job Planner
from sys import argv, exit
import os
import re
def make_script(
num_processes_list=[1, 2, 4, 8, 16, 20, 32],
sizes_list=[128, 256, 512, 1024, 2048, 4096],
):
with open("mpijob.lsf", "w") as f:
@AxoyTO
AxoyTO / dataparser.py
Created February 22, 2022 13:45
Results Data Parser for Householder+ReverseGaussian OMP Program in IBM Polus
import re
import pandas as pd
def parse_data(filename="result.out"):
threads_list = []
sizes_list = []
T1_times_list = []
T2_times_list = []
total_times_list = []
@AxoyTO
AxoyTO / planner.py
Last active February 22, 2022 13:48
IBM Polus Job Planner Script
from sys import argv, exit
import os
import re
def make_script(num_threads_list=[1, 2, 4, 8, 16, 20, 32, 64],
sizes_list=[128, 256, 512, 1024]
):
with open('ompjob.lsf', 'w') as f:
def hausdorff(model_1_vertices, model_2_vertices):
model_1_vertices = np.array(model_1_vertices[:-1]).reshape(-1, 1)
model_2_vertices = np.array(model_2_vertices[:-1]).reshape(-1, 1)
dist = cdist(model_1_points, model_2_points)
hausdorff_dist = max(dist.min(axis=0).max(), dist.min(axis=1).max())
return hausdorff_dist