00001 // Copyright (C) 2000, International Business Machines 00002 // Corporation and others. All Rights Reserved. 00003 #include "BcpConfig.h" 00004 00005 #include "BCP_error.hpp" 00006 bool BCP_fatal_error::abort_on_error = true; 00007 00008 #include "BCP_USER.hpp" 00009 #include "BCP_message_single.hpp" 00010 #include "BCP_message_mpi.hpp" 00011 #include "BCP_message_pvm.hpp" 00012 00013 //----------------------------------------------------------------------------- 00014 00015 BCP_message_environment * 00016 USER_initialize::msgenv_init(int argc, char* argv[]) { 00017 #if defined(COIN_HAS_MPI) 00018 int mpiid = BCP_mpi_environment::is_mpi(argc, argv); 00019 if (mpiid >= 0) { 00020 return new BCP_mpi_environment(argc, argv); 00021 } 00022 #endif 00023 #if defined(COIN_HAS_PVM) 00024 int pvmid = BCP_pvm_myid(); 00025 if (pvmid >= 0) { 00026 return new BCP_pvm_environment; 00027 } 00028 #endif 00029 // execute serial environment 00030 return new BCP_single_environment; 00031 }