Skip to content
Snippets Groups Projects
Commit eafe50b3 authored by Georges Da Costa's avatar Georges Da Costa
Browse files

Adds tools, corrects several bugs

parent b54e9a29
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ def init_bundle(bundlename): ...@@ -19,7 +19,7 @@ def init_bundle(bundlename):
def save_bundle(bundle_name, bundle_data, target_directory): def save_bundle(bundle_name, bundle_data, target_directory):
os.makedirs(target_directory, exist_ok=True) os.makedirs(target_directory, exist_ok=True)
bundle_data.to_csv(target_directory+'/'+bundle_name,sep=' ', index=False) bundle_data.drop('basename', axis=1).to_csv(target_directory+'/'+bundle_name,sep=' ', index=False)
......
#! /usr/bin/python3
import sys
import pandas as pd
def clean_csv(filename, nb):
df = pd.read_csv(filename, sep=' ', )
# remove the last incomplete experiment
last = (len(df)//nb)*nb
df = df[:last]
# remove complete experiment is the monitoring failed
for bloc_id in range(len(df)//nb-1,-1, -1):
for idx in range(nb):
tmp = df.iloc[bloc_id*nb+idx]
if min(tmp[10:]) <= -1:
df = df.drop( range(bloc_id*nb, (bloc_id+1)*nb) )
break
df.to_csv(filename[:-4]+"_cleaned.csv", sep=' ', index=False)
def main():
if len(sys.argv) != 3:
print("usage %s filename expe_size\nwhere expe_size is the number of experiment for one experimental set")
else:
clean_csv(sys.argv[1], int(sys.argv[2]))
if __name__ == '__main__':
main()
...@@ -5,11 +5,12 @@ import os ...@@ -5,11 +5,12 @@ import os
import json import json
import platform import platform
def get_g5k_target_metric(): def get_g5k_target_metric(cluster_name=None):
cluster_name = platform.node().split('-')[0] if cluster_name is None:
cluster_name = platform.node().split('-')[0]
if cluster_name in ['grisou', 'graoully', 'grimoire', if cluster_name in ['grisou', 'graoully', 'grimoire',
'grisou', 'gros', 'gruss', 'paravance']: 'gros', 'gruss', 'paravance']:
return 'pdu_outlet_power_watt' return 'pdu_outlet_power_watt'
if cluster_name in ['troll', 'yeti', 'gemini', 'neowise', if cluster_name in ['troll', 'yeti', 'gemini', 'neowise',
'orion', 'pyxis', 'sagittaire', 'taurus']: 'orion', 'pyxis', 'sagittaire', 'taurus']:
......
...@@ -23,6 +23,7 @@ def remove_watermark(target_file, target_dir): ...@@ -23,6 +23,7 @@ def remove_watermark(target_file, target_dir):
watermark.remove_wt_name(bundle_data) watermark.remove_wt_name(bundle_data)
if target_file.endswith('.zip'): if target_file.endswith('.zip'):
target_file = target_file[:-4] target_file = target_file[:-4]
bundle.save_bundle(target_file, bundle_data, target_dir) bundle.save_bundle(target_file, bundle_data, target_dir)
if not moj_cleaned is None: if not moj_cleaned is None:
......
...@@ -5,7 +5,7 @@ with open("README.md", "r") as fh: ...@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup( setuptools.setup(
name="expetator", name="expetator",
version="0.3.13", version="0.3.14",
author="Georges Da Costa", author="Georges Da Costa",
author_email="georges.da-costa@irit.fr", author_email="georges.da-costa@irit.fr",
description="A framework for monitoring HPC applications using DVFS", description="A framework for monitoring HPC applications using DVFS",
...@@ -23,7 +23,7 @@ setuptools.setup( ...@@ -23,7 +23,7 @@ setuptools.setup(
'monitors/*.bz2', 'monitors/*.diff', 'monitors/*.bz2', 'monitors/*.diff',
'leverages/*.[ch]', 'leverages/*.sh', 'leverages/*_mak']}, 'leverages/*.[ch]', 'leverages/*.sh', 'leverages/*_mak']},
include_package_data=True, include_package_data=True,
install_requires=['execo'], install_requires=['execo', 'requests'],
entry_points={ entry_points={
'console_scripts': [ 'console_scripts': [
'remove_watermark = expetator.remove_watermark:main', 'remove_watermark = expetator.remove_watermark:main',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment