ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/mpi_implementation/mpiSimulation.cpp
Revision: 122
Committed: Mon Sep 30 19:36:20 2002 UTC (22 years, 7 months ago) by chuckv
File size: 536 byte(s)
Log Message:
*** empty log message ***

File Contents

# Content
1 #include <mpi++.h>
2 #include <mpiSimulation.hpp>
3
4 mpiSimulation::mpiSimulation()
5 {
6 int mpi_error;
7
8 MPI::Init();
9
10 numberProcessors = MPI::Comm::Get_size();
11 myNode = MPI::Comm::Get_rank();
12 MPI::Get_processor_name(processorName,&processorNameLen);
13 }
14
15 mpiSimulation::mpiInitSimulation(SimInfo* entry_plug)
16 {
17
18 // need to get nmol here......
19
20
21
22 myMolStart = nint(float(node)/numberProcessors*entry_plug->n_mol);
23 myMolEnd = nint(float(node + 1)/numberProcessors*entry_plug->n_mol;);
24 nMolLocal = myMolEnd - myMolStart + 1
25 }