Pakman
mpi-simulator-cpp.cc File Reference
#include <iostream>
#include <string>
#include <mpi.h>
#include "PakmanMPIWorker.hpp"
Include dependency graph for mpi-simulator-cpp.cc:

Go to the source code of this file.

Functions

int my_simulator (int argc, char *argv[], const std::string &input_string, std::string &output_string)
 
int main (int argc, char *argv[])
 

Detailed Description

This program is a dummy MPI simulator that will always return a user-specified output and error code, regardless of the input to the simulator. If no arguments are given, the MPI simulator outputs "accept" and returns the error code 0.

Definition in file mpi-simulator-cpp.cc.

Function Documentation

◆ my_simulator()

int my_simulator ( int  argc,
char *  argv[],
const std::string &  input_string,
std::string &  output_string 
)

Run dummy simulation

By default, this function assigns the string "accept" to output_string and returns the error code 0 (which means no error has occurred). The output string and error code can be altered by optional arguments given through argc and argv.

Parameters
argcnumber of command-line arguments.
argvarray containing command-line arguments.
input_stringinput to simulator
output_stringoutput from simulator
Returns
error code.

Definition at line 29 of file mpi-simulator-cpp.cc.