marian-nmt / marian

Fast Neural Machine Translation in C++

Home Page:https://marian-nmt.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Marian 1.10 hangs when instantiating second engine

VictorAbrash opened this issue · comments

We have an application which loads multiple MT engines for bilingual translation. To do this, we instantiate multiple copies of a
TranslateService<BeamSearch> object. Marian 1.10 hangs immediately when we instantiate the 2nd object in the same process. We are using different models for the 2nd object, we haven't tried to instantiate a 2nd object with the same model.

We're building with CMAKE_BUILD_TYPE=Release and USE_SENTENCEPIECE=on. The issues doesn't depend on whether we're building for cpu or gpu.

We have a work-around:

  1. In src/common/config.cpp, use a global flag in Config::initialize() to ensure that createLoggers() is only called once.
  2. In src/common/logging.cpp, comment out the unix code in setErrorHandlers() which catches segfaults.

I'm hoping you can come up with a better way to fix this...