Ejemplo n.º 1
0
/// Default constructor
FrameworkManagerImpl::FrameworkManagerImpl()
#ifdef MPI_BUILD
  : m_mpi_environment()
#endif
{
  // Mantid only understands English...
  setGlobalLocaleToAscii();
  // Setup memory allocation scheme
  Kernel::MemoryOptions::initAllocatorOptions();

#ifdef _WIN32
    WSADATA wsaData;
    WSAStartup(MAKEWORD(2,2), &wsaData);
#endif

#ifdef _MSC_VER
  // This causes the exponent to consist of two digits (Windows Visual Studio normally 3, Linux default 2), where two digits are not sufficient I presume it uses more
  _set_output_format(_TWO_DIGIT_EXPONENT);
#endif

  g_log.notice() << Mantid::welcomeMessage() << std::endl;
  loadAllPlugins();
  disableNexusOutput();
  setNumOMPThreadsToConfigValue();

#ifdef MPI_BUILD
  g_log.notice() << "This MPI process is rank: " << boost::mpi::communicator().rank() << std::endl;
#endif

  g_log.debug() << "FrameworkManager created." << std::endl;
}
Ejemplo n.º 2
0
/// Default constructor
FrameworkManagerImpl::FrameworkManagerImpl()
#ifdef MPI_BUILD
  : m_mpi_environment()
#endif
{
  // Mantid only understands English...
  setGlobalLocaleToAscii();
  // Setup memory allocation scheme
  Kernel::MemoryOptions::initAllocatorOptions();

#ifdef _WIN32
    WSADATA wsaData;
    WSAStartup(MAKEWORD(2,2), &wsaData);
#endif

#ifdef _MSC_VER
  // This causes the exponent to consist of two digits (Windows Visual Studio normally 3, Linux default 2), where two digits are not sufficient I presume it uses more
  _set_output_format(_TWO_DIGIT_EXPONENT);
#endif

  g_log.notice() << Mantid::welcomeMessage() << std::endl;
  loadPluginsUsingKey(PLUGINS_DIR_KEY);
  disableNexusOutput();
  setNumOMPThreadsToConfigValue();

#ifdef MPI_BUILD
  g_log.notice() << "This MPI process is rank: " << boost::mpi::communicator().rank() << std::endl;
#endif

  g_log.debug() << "FrameworkManager created." << std::endl;

  int updateInstrumentDefinitions = 0;
  int reVal = Kernel::ConfigService::Instance().getValue("UpdateInstrumentDefinitions.OnStartup",updateInstrumentDefinitions);
  if ((reVal == 1) &&  (updateInstrumentDefinitions == 1))
  {
    UpdateInstrumentDefinitions();
  }
  else
  {
    g_log.information() << "Instrument updates disabled - cannot update instrument definitions." << std::endl;
  }
}
/// Default constructor
FrameworkManagerImpl::FrameworkManagerImpl()
#ifdef MPI_BUILD
    : m_mpi_environment()
#endif
{
  // Mantid only understands English...
  setGlobalLocaleToAscii();
  // Setup memory allocation scheme
  Kernel::MemoryOptions::initAllocatorOptions();

#ifdef _WIN32
  WSADATA wsaData;
  WSAStartup(MAKEWORD(2, 2), &wsaData);
#endif

#if defined(_MSC_VER) && _MSC_VER < 1900
  // This causes the exponent to consist of two digits.
  // VC++ >=1900 use standards conforming behaviour and only
  // uses the number of digits required
  _set_output_format(_TWO_DIGIT_EXPONENT);
#endif

  g_log.notice() << Mantid::welcomeMessage() << std::endl;
  loadPluginsUsingKey(PLUGINS_DIR_KEY);
  disableNexusOutput();
  setNumOMPThreadsToConfigValue();

#ifdef MPI_BUILD
  g_log.notice() << "This MPI process is rank: "
                 << boost::mpi::communicator().rank() << std::endl;
#endif

  g_log.debug() << "FrameworkManager created." << std::endl;

  AsynchronousStartupTasks();
}