#ifndef MPIMANAGER_H
#define MPIMANAGER_H

#define VERSION_MPIMANAGER "1.0 (03.02.2015)"

#include <mpi.h>
#include <fstream>

class MpiManager{
public:
	int			nproc_world;	// number of processes in world
	int			nproc_group;	// number of processes in group

	int			rank_world;		// rank in world
	int			rank_group;		// rank in group

	MPI_Comm	comm;			// intra communicator of the group 
	
	int *ranks;					// other processes in group

	int nodes_world;			// number of nodes
	int node;					// my node

	int			namelen;
	char		node_name[100];

public:
	MpiManager(int argc, char *argv[]);
	~MpiManager();

	void getNode();
	void createGroup();
	void createGroup(int nodes, int ppn);

	//void info(std::ofstream &ofs, std::string type);

	void print();
};



#endif




