30#include "../base/base_uses.f90"
35 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'swarm_worker'
45 INTEGER :: behavior = -1
63 input_path, worker_id)
68 CHARACTER(LEN=*),
INTENT(IN) :: input_path
69 INTEGER,
INTENT(in) :: worker_id
78 "SWARM%PRINT%WORKER_RUN_INFO", extension=
".workerLog")
82 SELECT CASE (worker%behavior)
84 ALLOCATE (worker%glbopt)
86 root_section, input_path, worker_id, worker%iw)
88 cpabort(
"got unknown behavior")
105 LOGICAL,
INTENT(INOUT) :: should_stop
107 CHARACTER(LEN=default_string_length) :: command
112 IF (trim(command) ==
"shutdown")
THEN
113 IF (worker%iw > 0)
WRITE (worker%iw, *)
"SWARM| Received shutdown command, quitting."
115 ELSE IF (trim(command) ==
"wait")
THEN
118 SELECT CASE (worker%behavior)
122 cpabort(
"got unknown behavior")
139 SELECT CASE (worker%behavior)
142 DEALLOCATE (worker%glbopt)
144 cpabort(
"got unknown behavior")
Adds an entry from a swarm-message.
Returns an entry from a swarm-message.
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
Worker routines used by global optimization schemes.
subroutine, public glbopt_worker_init(worker, input_declaration, para_env, root_section, input_path, worker_id, iw)
Initializes worker for global optimization.
subroutine, public glbopt_worker_finalize(worker)
Finalizes worker for global optimization.
subroutine, public glbopt_worker_execute(worker, cmd, report)
Central execute routine of global optimization worker.
Defines the basic variable types.
integer, parameter, public default_string_length
Interface to the message passing library MPI.
Swarm-message, a convenient data-container for with build-in serialization.
logical function, public swarm_message_haskey(msg, key)
Checks if a swarm-message contains an entry with the given key.
Workers's routines for the swarm-framework.
subroutine, public swarm_worker_finalize(worker)
Finalizes a swarm worker.
subroutine, public swarm_worker_execute(worker, cmd, report, should_stop)
Central execute routine of the swarm worker.
subroutine, public swarm_worker_init(worker, para_env, input_declaration, root_section, input_path, worker_id)
Initializes a swarm worker.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment