Commit 98e2ed1d authored by valentin.emiya's avatar valentin.emiya
Browse files

update with slurm

parent f3d8416b
......@@ -52,12 +52,11 @@ Run this script to handle the main experiment :class:`SolveTffExperiment`.
.. moduleauthor:: Valentin Emiya
"""
from yafe.utils import generate_oar_script
import matplotlib.pyplot as plt
from tffpy.experiments.exp_solve_tff import \
SolveTffExperiment, create_and_run_light_experiment
from tffpy.experiments.yafe_slurm import generate_slurm_script
try:
......@@ -77,7 +76,7 @@ if __name__ == '__main__':
input_msg = '\n'.join(['1 - Create and run light experiment',
'2 - Display results of light experiment',
'3 - Full experiment: create full experiment',
'4 - Generate OAR script',
'4 - Generate Slurm script',
'5 - Full experiment: collect results',
'6 - Full experiment: download results',
'7 - Full experiment: display results',
......@@ -104,12 +103,12 @@ if __name__ == '__main__':
elif answer == 4:
experiment.display_status()
batch_size = int(input('Batch size (#tasks per job)?'))
generate_oar_script(script_file_path=__file__,
xp_var_name='experiment',
batch_size=batch_size,
oar_walltime='01:00:00',
activate_env_command='source activate py36',
use_gpu=False)
generate_slurm_script(script_file_path=__file__,
xp_var_name='experiment',
n_simultaneous_jobs=n_simultaneous_jobs,
slurm_walltime='02:00:00',
activate_env_command='source activate py36',
use_cpu_gpu='cpu')
elif answer == 5:
experiment.collect_results()
experiment.display_status()
......
......@@ -104,7 +104,7 @@ if __name__ == '__main__':
n_simultaneous_jobs=n_simultaneous_jobs,
slurm_walltime='02:00:00',
activate_env_command='source activate py36',
use_gpu=False)
use_cpu_gpu='cpu')
elif answer == 5:
experiment.collect_results()
experiment.display_status()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment