9 std::ofstream output_file(output_filename);
17 output_file <<
"UseRigidBodyModesB" << std::endl;
28 std::ofstream output_file(output_filename);
35 output_file <<
"UseRigidBodyModesB" << std::endl;
53 std::ofstream output_file(output_filename);
59 output_file <<
"UseRigidBodyModesB" << std::endl;
64 void Solver_Files_Setup::print_PBS_script(
const std::string& output_filename,
const std::string& job_name,
const std::string& output_name,
const std::string& error_name,
const std::string& common_script,
const std::string& command_to_run)
66 std::ofstream output_script(output_filename);
67 output_script <<
"#!/bin/bash" << std::endl;
68 output_script << std::endl;
69 output_script <<
"#PBS -S /bin/bash" << std::endl;
70 output_script <<
"#PBS -N " << job_name << std::endl;
71 output_script <<
"#PBS -o " << output_name << std::endl;
72 output_script <<
"#PBS -e " << error_name << std::endl;
73 output_script << common_script << std::endl;
74 output_script << command_to_run << std::endl;
75 output_script.close();
92 std::string command_string;
99 std::cout << command_string << std::endl;
114 GetPot field_parser_A, field_parser_B;
181 std::string command_to_run;
186 output_script << command_to_run << std::endl;
187 output_script.close();
191 output_script << command_to_run << std::endl;
192 output_script.close();
197 output_script << command_to_run << std::endl;
198 output_script.close();
202 output_script << command_to_run << std::endl;
203 output_script.close();
217 std::string common_script((std::istreambuf_iterator<char>(base_script)),
218 std::istreambuf_iterator<char>());
221 std::string pbs_output;
222 std::string pbs_error;
223 std::string command_to_run;
231 pbs_output, pbs_error, common_script,
239 pbs_output, pbs_error,common_script,
248 pbs_output, pbs_error,common_script,
256 pbs_output, pbs_error,common_script,
316 std::string command_to_run;
321 output_script <<
"mpirun -n " <<
m_comm.size() <<
" " << command_to_run << std::endl;
322 output_script.close();
327 output_script <<
"mpirun -n " <<
m_comm.size() <<
" " << command_to_run << std::endl;
328 output_script.close();
332 output_script <<
"mpirun -n " <<
m_comm.size() <<
" " << command_to_run << std::endl;
333 output_script.close();
343 std::string common_script((std::istreambuf_iterator<char>(base_script)),
344 std::istreambuf_iterator<char>());
347 std::string pbs_output;
348 std::string pbs_error;
349 std::string command_to_run;
354 command_to_run =
"mpirun -n " + std::to_string(
m_comm.size()) +
" ./CArl_FETI_setup_finish -i " +
358 pbs_output, pbs_error, common_script,
363 command_to_run =
"mpirun -n " + std::to_string(
m_comm.size()) +
" ./CArl_FETI_iterate -i " +
367 pbs_output, pbs_error, common_script,
372 command_to_run =
"mpirun -n " + std::to_string(
m_comm.size()) +
" ./CArl_FETI_solution -i " +
376 pbs_output, pbs_error, common_script,
420 FETI_init_script <<
"#!/bin/bash" << std::endl;
421 FETI_init_script << std::endl;
433 FETI_init_script.close();
436 FETI_iter_script <<
"#!/bin/bash" << std::endl;
437 FETI_iter_script << std::endl;
441 FETI_iter_script.close();
444 FETI_set_sol_script <<
"#!/bin/bash" << std::endl;
445 FETI_set_sol_script << std::endl;
449 FETI_set_sol_script.close();
464 FETI_init_script <<
"#!/bin/bash" << std::endl;
465 FETI_init_script << std::endl;
473 FETI_init_script <<
"job3=`qsub -W depend=afterok:$job1_A:$job1_B:$job2_A:$job2_B "
476 FETI_init_script <<
"job3=`qsub -W depend=afterok:$job1_A:$job1_B "
479 FETI_init_script.close();
482 FETI_iter_script <<
"#!/bin/bash" << std::endl;
483 FETI_iter_script << std::endl;
486 FETI_iter_script <<
"job5=`qsub -W depend=afterok:$job4_A:$job4_B "
488 FETI_iter_script.close();
491 FETI_set_sol_script <<
"#!/bin/bash" << std::endl;
492 FETI_set_sol_script << std::endl;
495 FETI_set_sol_script <<
"job7=`qsub -W depend=afterok:$job6_A:$job6_B "
497 FETI_set_sol_script.close();
std::string m_CArl_FETI_solution_script_filename
std::string m_CArl_FETI_setup_finish_script_filename
std::string m_FETI_iter_launch_script_filename
feti_setup_init_params m_input_params
std::string m_CArl_FETI_iterate_script_filename
bool bUseRigidBodyModes
[RB] Use the rigid body modes for the micro system?
std::string m_CArl_FETI_solution_input_filename
void set_FETI_input_parameters(feti_setup_init_params &input_params)
bool m_bSetCArlFETIScripts
double CG_coupled_div
[CG] Residual divergence.
void generate_FETI_launch_scripts_LOCAL()
std::string m_ext_solver_u0_B_script_filename
void get_input_params(GetPot &field_parser, feti_iterate_params &input_params)
Parser function for the coupled solver test programs.
bool m_bSetFETILaunchScripts
ClusterSchedulerType scheduler
Cluster scheduler software type. Values: PBS, SLURM (code not implemented for the later yet)...
std::string ext_solver_BIG_input
Path to a file containing the input parameters of the external solve for system A.
std::string m_CArl_FETI_iterate_input_filename
std::string scratch_folder_path
Path to the folder which will be used to save the temporary files during the solve operation...
std::string script_filename
Path to the file used to generate the scripts.
void print_feti_iterate_params(const std::string &output_filename)
void generate_FETI_inputs()
std::string exec_command(const std::string &cmd)
bool m_bSetCArlFETIInputs
std::string ext_solver_micro_input
Path to a file containing the input parameters of the external solve for system B.
carl::BaseCGPrecondType CG_precond_type
[CG] Type of preconditionner.
std::string coupling_folder_path
Path to the folder containing the coupling matrices.
void generate_FETI_launch_scripts()
void generate_FETI_launch_scripts_PBS()
std::string RB_vectors_base
[RB] Common path base for the micro system's rigid body mode vectors.
std::string m_ext_solver_u0_A_input_filename
void generate_libmesh_external_solver_scripts_PBS()
bool m_bSetExternalSolversFiles
void print_feti_solution_params(const std::string &output_filename)
std::string m_ext_solver_u0_B_input_filename
bool m_bScratchFolderExists
double CG_coupled_conv_abs
[CG] Absolute residual convergence.
libMesh::Parallel::Communicator & m_comm
std::string m_FETI_init_launch_script_filename
void generate_libmesh_external_solver_scripts()
Structure containing the parameters for the setup initialization of the FETI solver.
void generate_FETI_scripts_LOCAL()
void set_scratch_folder()
void generate_libmesh_external_solver_scripts_LOCAL()
int nb_of_rb_vectors
[RB] Number of RB mode vectors.
std::string ClusterSchedulerType_to_string(ClusterSchedulerType input)
std::string m_ext_solver_B_input_filename
int CG_coupled_conv_max
[CG] Maximum number of iterations.
std::string ext_solver_micro
Command used for the external solver for system B.
double CG_coupled_conv_rel
[CG] Relative residual convergence.
std::string m_ext_solver_A_script_filename
void print_input_params(const std::string &output_filename, libmesh_solve_linear_system_input_params &input_params)
Function used to generate a solver input file from "input_params".
void print_feti_setup_finish_params(const std::string &output_filename)
std::string m_ext_solver_B_script_filename
std::string m_FETI_sol_launch_script_filename
std::string ext_solver_BIG
Command used for the external solver for system A.
void generate_FETI_scripts()
std::string m_CArl_FETI_setup_finish_input_filename
std::string m_ext_solver_u0_A_script_filename
void generate_libmesh_external_solver_inputs()
bool m_bSetExternalSolversInputFiles
std::string BaseCGPrecondType_to_string(BaseCGPrecondType input)
std::string m_ext_solver_A_input_filename
void print_PBS_script(const std::string &output_filename, const std::string &job_name, const std::string &output_name, const std::string &error_name, const std::string &common_script, const std::string &command_to_run)
void generate_FETI_scripts_PBS()
double CG_coupled_conv_corr
[CG] Relative rigid body mode convergence.
std::string output_folder
Path to the coupled solution folder.