You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/01/16 01:36:00 UTC

[GitHub] [incubator-mxnet] cyrusbehr commented on issue #15275: How to run mxnet(C++) in single-thread mode?

cyrusbehr commented on issue #15275: How to run mxnet(C++) in single-thread mode?
URL: https://github.com/apache/incubator-mxnet/issues/15275#issuecomment-574939560
 
 
   @igor-byel I experienced the same issue you are facing, and here is my fix. The issue is likely due to the way you are using the `putenv` function. From the linux manual: 
   
   >  The putenv() function adds or changes the value of environment
          variables.  The argument string is of the form name=value.  If name
          does not already exist in the environment, then string is added to
          the environment.  If name does exist, then the value of name in the
          environment is changed to value.  **The string pointed to by string
          becomes part of the environment, so altering the string changes the
          environment.**
   
   In your above implementation,  your `mxnetConfig1` and `mxnetConfig2` variables are no longer defined once they go out of scope (which is at the end of the `getImplementation` function). The strings are therefore removed from the environment. Make `mxnetConfig1` `mxnetConfig2` global or member variables for the changes to persist. 
   
   For more info, refer to [this](https://stackoverflow.com/q/57351676/4943329) stack overflow question.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services