|
OPAL (Object Oriented Parallel Accelerator Library)
2024.1
OPAL
|
#include <SamplePilot.h>


Public Types | |
| typedef Jobs_t::iterator | JobIter_t |
Public Member Functions | |
| SamplePilot (CmdArguments_t args, std::shared_ptr< Comm_t > comm, functionDictionary_t known_expr_funcs, const DVarContainer_t &dvar, const Expressions::Named_t &obj, const std::map< std::string, std::shared_ptr< SamplingMethod > > &sampleMethods, const std::vector< std::string > &storeobjstr, const std::vector< std::string > &filesToKeep, const std::map< std::string, std::string > &userVariables) | |
| virtual void | setup (functionDictionary_t known_expr_funcs, const std::vector< std::string > &storeobjstr, const std::vector< std::string > &filesToKeep, const std::map< std::string, std::string > &userVariables) |
| virtual void | startSampler () |
| void | startWorker (const std::vector< std::string > &storeobjstr, const std::vector< std::string > &filesToKeep, const std::map< std::string, std::string > &userVariables) |
| virtual void | postPoll () |
| executed after handling (if any) new request More... | |
| virtual void | sendNewJobToWorker (int worker) |
| virtual bool | onMessage (MPI_Status status, size_t recv_value) |
Public Attributes | |
| false | |
| Param_t | Jobs_t |
| Jobs_t | running_job_list_ |
| Jobs_t | request_queue_ |
Private Attributes | |
| std::map< std::string, std::shared_ptr < SamplingMethod > > | sampleMethods_m |
Additional Inherited Members | |
Protected Types inherited from Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t > | |
| typedef MasterNode< typename Opt_t::SolutionState_t, SolPropagationGraph_t > | MasterNode_t |
| typedef std::map< size_t, std::pair< Param_t, reqVarContainer_t > > | Jobs_t |
| keep track of requests and running jobs More... | |
| typedef Jobs_t::iterator | JobIter_t |
Protected Member Functions inherited from Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t > | |
| void | parseInputFile (functionDictionary_t, bool isOptimizationRun) |
| virtual void | startOptimizer () |
| virtual void | startWorker (const std::map< std::string, std::string > &userVariables) |
| virtual void | startPilot () |
| virtual void | setupPoll () |
| executed before starting polling loop More... | |
| virtual void | prePoll () |
| executed before checking for new request More... | |
| virtual void | onStop () |
| enable implementation to react to STOP tag More... | |
| bool | stop (bool isOpt=true) |
| void | run () |
| Pilot (CmdArguments_t args, std::shared_ptr< Comm_t > comm, const DVarContainer_t &dvar) | |
| Pilot (CmdArguments_t args, std::shared_ptr< Comm_t > comm, functionDictionary_t known_expr_funcs) | |
| Pilot (CmdArguments_t args, std::shared_ptr< Comm_t > comm, functionDictionary_t known_expr_funcs, const DVarContainer_t &dvar, const Expressions::Named_t &obj, const Expressions::Named_t &cons, std::vector< double > hypervolRef={}, bool isOptimizerRun=true, const std::map< std::string, std::string > &userVariables={}) | |
| virtual | ~Pilot () |
| Poller (MPI_Comm comm, double delay=0.1) | |
| virtual | ~Poller () |
Protected Attributes inherited from Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t > | |
| MPI_Comm | worker_comm_ |
| MPI communicator used for messages to/from worker. More... | |
| MPI_Comm | opt_comm_ |
| MPI communicator used for messages to/from optimizer. More... | |
| MPI_Comm | coworker_comm_ |
| MPI communicator used for messages between all pilots. More... | |
| std::shared_ptr< Comm_t > | comm_ |
| CmdArguments_t | cmd_args_ |
| int | global_rank_ |
| int | my_rank_in_worker_comm_ |
| int | my_rank_in_opt_comm_ |
| int | num_coworkers_ |
| std::unique_ptr< MasterNode_t > | master_node_ |
| std::string | input_file_ |
| input file for simulation with embedded optimization problem More... | |
| int | total_available_workers_ |
| bool | has_opt_converged_ |
| bool | continue_polling_ |
| Expressions::Named_t | objectives_ |
| objectives More... | |
| Expressions::Named_t | constraints_ |
| constraints More... | |
| DVarContainer_t | dvars_ |
| design variables More... | |
| std::vector< double > | hypervolRef_ |
| hypervolume reference point More... | |
| std::vector< bool > | is_worker_idle_ |
| Jobs_t | running_job_list_ |
| Jobs_t | request_queue_ |
| std::unique_ptr< Trace > | job_trace_ |
Protected Attributes inherited from Poller | |
| MPI_Comm | comm_m |
| communicator the poller listens to requests More... | |
| bool | is_running_ |
| double | last_polled_ |
| time of last MPI_Test More... | |
| double | poll_delay_ |
| delay in seconds between polls More... | |
Definition at line 46 of file SamplePilot.h.
| typedef Jobs_t::iterator SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::JobIter_t |
Definition at line 96 of file SamplePilot.h.
|
inline |
Definition at line 54 of file SamplePilot.h.
|
inlinevirtual |
User specific behavior on receiving a message.
Reimplemented from Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >.
Definition at line 220 of file SamplePilot.h.
References Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::comm_, endl(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::has_opt_converged_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::is_worker_idle_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::job_trace_, MPI_OPT_JOB_FINISHED_TAG, MPI_Recv_params(), MPI_Recv_reqvars(), MPI_Send_reqvars(), MPI_WORKER_FINISHED_ACK_TAG, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::opt_comm_, OPT_CONVERGED_TAG, OPT_NEW_JOB_TAG, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::request_queue_, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::running_job_list_, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sendNewJobToWorker(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::stop(), this, WORKER_FINISHED_TAG, and WORKER_STATUSUPDATE_TAG.

|
inlinevirtual |
executed after handling (if any) new request
Reimplemented from Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >.
Definition at line 161 of file SamplePilot.h.
References Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::continue_polling_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::has_opt_converged_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::is_worker_idle_, MPI_STOP_TAG, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::my_rank_in_worker_comm_, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::request_queue_, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sendNewJobToWorker(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::total_available_workers_, and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::worker_comm_.

|
inlinevirtual |
Reimplemented from Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >.
Definition at line 194 of file SamplePilot.h.
References endl(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::has_opt_converged_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::is_worker_idle_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::job_trace_, MPI_Send_params(), MPI_WORK_JOBID_TAG, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::request_queue_, SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::running_job_list_, and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::worker_comm_.
Referenced by SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::postPoll().

|
inlinevirtual |
Definition at line 102 of file SamplePilot.h.
References Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::comm_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::global_rank_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::parseInputFile(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::startPilot(), SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::startSampler(), and SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::startWorker().

|
inlinevirtual |
Definition at line 120 of file SamplePilot.h.
References Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::cmd_args_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::comm_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::dvars_, endl(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::global_rank_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::objectives_, and SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sampleMethods_m.
Referenced by SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::setup().

|
inline |
Definition at line 136 of file SamplePilot.h.
References Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::cmd_args_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::comm_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::constraints_, endl(), Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::global_rank_, Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::input_file_, and Pilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::objectives_.
Referenced by SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::setup().

| SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::false |
Definition at line 73 of file SamplePilot.h.
| Param_t SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::Jobs_t |
Definition at line 75 of file SamplePilot.h.
| Jobs_t SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::request_queue_ |
| Jobs_t SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::running_job_list_ |
Definition at line 97 of file SamplePilot.h.
Referenced by SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::onMessage(), and SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::sendNewJobToWorker().
|
private |
Definition at line 299 of file SamplePilot.h.
Referenced by SamplePilot< Opt_t, Sim_t, SolPropagationGraph_t, Comm_t >::startSampler().
1.8.5