BmnRoot
Loading...
Searching...
No Matches
nica-scheduler.cpp File Reference
#include "batch_command.h"
#include "container_settings.h"
#include "function_set.h"
#include "TSQLResult.h"
#include "TSQLRow.h"
#include "TSQLServer.h"
#include "TString.h"
#include <algorithm>
#include <array>
#include <condition_variable>
#include <fstream>
#include <getopt.h>
#include <glob.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <map>
#include <mutex>
#include <thread>
#include <unistd.h>
#include "../settings.h"
Include dependency graph for nica-scheduler.cpp:

Go to the source code of this file.

Classes

struct  struct_database_settings
 
class  Semaphore
 
class  nullString
 
struct  structFilePar
 
struct  structMacroPar
 
struct  structJobPar
 
struct  structThreadPar
 
struct  structSubThreadPar
 

Functions

void ParseDatabaseParameters (string input, TString &sql, bool is_simulation)
 
bool ParseMacroFiles (xmlNodePtr sub_node, shared_ptr< structJobPar > job_par, shared_ptr< structMacroPar > macro_par, multimap< string, unique_ptr< vector< nullString > > > &map_job_output, batch_commands batch_com)
 
void info_message (const string msg, bool is_error=0)
 
void replace_string_in_text_ext (string &text, string old_substring, string new_substring)
 
string form_file_name (string out_name, string in_name, int counter, string batch_temp_dir)
 
vector< string > glob (const string &path)
 
string GenerateOutputFilePath (string path, int counter)
 
void SubThreadProcessFile (shared_ptr< structSubThreadPar > subthread_par)
 
void ThreadLocalProcess (shared_ptr< structThreadPar > thread_par)
 
void ShowHelpMessage ()
 
int main (int argc, char **argv)
 

Variables

bool isDebugMode = false
 

Function Documentation

◆ form_file_name()

string form_file_name ( string  out_name,
string  in_name,
int  counter,
string  batch_temp_dir 
)

◆ GenerateOutputFilePath()

string GenerateOutputFilePath ( string  path,
int  counter 
)

Definition at line 434 of file nica-scheduler.cpp.

References int_to_string().

Referenced by main(), and ThreadLocalProcess().

◆ glob()

vector< string > glob ( const string &  path)
inline

◆ info_message()

void info_message ( const string  msg,
bool  is_error = 0 
)

Definition at line 337 of file nica-scheduler.cpp.

Referenced by main(), ParseMacroFiles(), and ThreadLocalProcess().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1049 of file nica-scheduler.cpp.

References batch_commands::array_dependency_option, batch_commands::batch_task_id, byte_size_to_double(), batch_commands::check_status_command, batch_commands::container_run_command, convert_pchar_to_lowercase_new(), struct_database_settings::db_host, struct_database_settings::db_name, struct_database_settings::db_password, struct_database_settings::db_username, find_first_number(), GenerateOutputFilePath(), get_app_dir_linux(), get_batch_processor_count(), get_directory_path(), get_file_name_with_ext(), get_linux_processor_count(), nullString::GetValue(), i, info_message(), int_to_string(), structFilePar::iParallelMode, is_string_number(), isDebugMode, batch_commands::job_begin, batch_commands::job_dependency_option, mapBS, mapContainerType, structFilePar::nstrFileOut, structMacroPar::nstrMacroPath, batch_commands::operative_memory1_option, ParseMacroFiles(), predefined_database_settings, replace_string_in_text(), batch_commands::run_command, batch_commands::scheduler_run_job, batch_commands::set_job_variables, nullString::SetValue(), SGE_BATCH_SYSTEM, batch_commands::sheduler_exclude_hosts_option, batch_commands::sheduler_hosts_option, batch_commands::sheduler_hosts_separation, batch_commands::sheduler_priority_option, batch_commands::sheduler_qos_option, batch_commands::sheduler_queue_option, batch_commands::sheduler_workdir_option, ShowHelpMessage(), SLURM_BATCH_SYSTEM, structFilePar::strParallelMode, ThreadLocalProcess(), TORQUE_BATCH_SYSTEM, trim(), UNI_DB_HOST, UNI_DB_NAME, UNI_DB_PASSWORD, UNI_DB_USERNAME, and structMacroPar::vecFiles.

◆ ParseDatabaseParameters()

void ParseDatabaseParameters ( string  input,
TString &  sql,
bool  is_simulation 
)

Definition at line 2348 of file nica-scheduler.cpp.

Referenced by ParseMacroFiles().

◆ ParseMacroFiles()

◆ replace_string_in_text_ext()

void replace_string_in_text_ext ( string &  text,
string  old_substring,
string  new_substring 
)

Definition at line 359 of file nica-scheduler.cpp.

Referenced by form_file_name().

◆ ShowHelpMessage()

void ShowHelpMessage ( )

Definition at line 1035 of file nica-scheduler.cpp.

Referenced by main().

◆ SubThreadProcessFile()

void SubThreadProcessFile ( shared_ptr< structSubThreadPar subthread_par)

Definition at line 448 of file nica-scheduler.cpp.

References nullString::GetValue(), isDebugMode, and nullString::isNull().

Referenced by ThreadLocalProcess().

◆ ThreadLocalProcess()

Variable Documentation

◆ isDebugMode

bool isDebugMode = false

Definition at line 69 of file nica-scheduler.cpp.

Referenced by main(), ParseMacroFiles(), SubThreadProcessFile(), and ThreadLocalProcess().