namespace alps { void comm_init(int* argcp, char*** argvp, bool force_master=false); void comm_exit(bool kill=false); bool runs_parallel(); bool is_master(); Host local_host(); Process local_process(); Process master_process(); Process process_from_id(const int); ProcessList all_processes(); Process start_process(const Host&, const std::string&); ProcessList start_processes(const HostList&, const std::string&); ProcessList start_all_processes(const std::string&, unsigned short procs_per_node=1); }
initializes the underlying message passing library.void comm_init(int* argcp, char*** argvp)
cleans up and exits the message passing library. If called with a true argument an attempt is made to kill all other processes.void comm_exit(bool kill=false);
checks whether the program is running in parallel.bool runs_parallel();
checks whether the current process is the master process.bool is_master();
returns the host the process is running on.Host local_host();
returns the current process.Process local_process();
returns the master process.Process master_process();
returns the process with the given id.Process process_from_id(const int);
returns all processes available to the program.ProcessList all_processes();
starts a process on a host by launching the given executable and returns a Process object describing the process. If launching of the executable fails an invalid process descriptor is returned.Process start_process(const Host& host, const std::string& executable);
starts one process each a host by launching the given executable and returns a ProcessList object describing the processes. If launching of the executable fails an invalid process descriptor is returned.ProcessList start_processes(const HostList&, const std::string&);
attempts to start procs_per_node processes on each available host and returns a ProcessList object describing the processes. If launching of the executable fails an invalid process descriptor is returned.ProcessList start_all_processes(const std::string&, unsigned short procs_per_node=1);
copyright (c) 1994-2010 by Matthias Troyer
Distributed under the Boost Software License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt)