iend = np.where([ss.startswith('# end-settings-section') for ss in lines])[0][0] with open(current_sim_abs_path + '/' + settings_to_be_replaced_in, 'w') as fid: fid.writelines(lines[:istart]) fid.write(settings_section + '\n') fid.writelines(lines[iend + 1:]) # Prepare job script job_content = f'''#!/bin/bash {environment_preparation} # Environment preparation echo PYTHONPATH=$PYTHONPATH echo which python which python cd {current_sim_abs_path} python 002_build_mode_matrix.py ''' with open(current_sim_abs_path + '/job.job', 'w') as fid: fid.write(job_content) # Prepare htcondor cluster of jobs import PyPARIS_sim_class.htcondor_config as htcc htcc.htcondor_config(scan_folder_abs, time_requirement_days=0.1, htcondor_files_in=scan_folder_abs)
fi python 000_simulation_matrix_map.py done ''' with open(current_sim_abs_path + '/run_it_several_times', 'w') as fid: fid.write(run_script_curr) # Prepare job script job_content = f'''#!/bin/bash {environment_preparation} # Environment preparation echo PYTHONPATH=$PYTHONPATH echo which python which python cd {current_sim_abs_path} bash run_it_several_times ''' with open(current_sim_abs_path + '/job.job', 'w') as fid: fid.write(job_content) # Prepare htcondor cluster of jobs import PyPARIS_sim_class.htcondor_config as htcc htcc.htcondor_config( scan_folder_abs, time_requirement_days=2., # 120 minutes htcondor_files_in=scan_folder_abs)