BCP_USER.cpp
Go to the documentation of this file.
1 // Copyright (C) 2000, International Business Machines
2 // Corporation and others. All Rights Reserved.
3 #include "BcpConfig.h"
4 
5 #include "BCP_error.hpp"
7 
8 #include "BCP_USER.hpp"
9 #include "BCP_message_single.hpp"
10 #include "BCP_message_mpi.hpp"
11 #include "BCP_message_pvm.hpp"
12 
13 //-----------------------------------------------------------------------------
14 
16 USER_initialize::msgenv_init(int argc, char* argv[]) {
17 #if defined(COIN_HAS_MPI)
18  int mpiid = BCP_mpi_environment::is_mpi(argc, argv);
19  if (mpiid >= 0) {
20  return new BCP_mpi_environment(argc, argv);
21  }
22 #endif
23 #if defined(COIN_HAS_PVM)
24  int pvmid = BCP_pvm_myid();
25  if (pvmid >= 0) {
26  return new BCP_pvm_environment;
27  }
28 #endif
29  // execute serial environment
30  return new BCP_single_environment;
31 }
This is an abstract base class that describes the message passing environment.
Definition: BCP_message.hpp:30
virtual BCP_message_environment * msgenv_init(int argc, char *argv[])
Create a message passing environment.
Definition: BCP_USER.cpp:16
static bool abort_on_error
Definition: BCP_error.hpp:22