CNTK icon indicating copy to clipboard operation
CNTK copied to clipboard

renderCmd not working on Linux?

Open jnbntz opened this issue 10 years ago • 3 comments

Hi. I'm running Ubuntu 14.04 and the renderCmd doesn't seem to be working properly. I have a topoplot block defined as follows:

topoplot = [
  action = "plot"
  outputdotFile="model.dot"
  outputFile="model.jpg"
  renderCmd="/usr/bin/dot -Tjpg <IN> -o<OUT>"
] # end topoplot

Then when I run CNTK, the following is from the output.

Output network description in dot language to model.dot
Executing a third-part tool for rendering dot:

Done
COMPLETED

The "model.dot" file is generated properly but the JPG file is not generated. In fact the command isn't even printed to the screen. It seems "rescmd" from Source/ActionsLib/OtherActions.cpp is possibly not being set properly?

jnbntz avatar Mar 03 '16 22:03 jnbntz

Does it generate the .dot file correctly? I.e. can you view it manually?

From: Jonathan Bentz [mailto:[email protected]] Sent: Thursday, March 3, 2016 14:23 To: Microsoft/CNTK [email protected] Subject: [CNTK] renderCmd not working on Linux? (#200)

Hi. I'm running Ubuntu 14.04 and the renderCmd doesn't seem to be working properly. I have a topoplot block defined as follows:

topoplot = [

action = "plot"

outputdotFile="model.dot"

outputFile="model.jpg"

renderCmd="/usr/bin/dot -Tjpg -o"

] # end topoplot

Then when I run CNTK, the following is from the output.

Output network description in dot language to model.dot

Executing a third-part tool for rendering dot:

Done

COMPLETED

The "model.dot" file is generated properly but the JPG file is not generated. In fact the command isn't even printed to the screen. It seems "rescmd" from Source/ActionsLib/OtherActions.cpp is possibly not being set properly?

— Reply to this email directly or view it on GitHubhttps://github.com/Microsoft/CNTK/issues/200.

frankseide avatar Mar 03 '16 22:03 frankseide

Yes the dot file is generated correctly.

On Thu, Mar 3, 2016 at 4:25 PM, Frank Seide [email protected] wrote:

Does it generate the .dot file correctly? I.e. can you view it manually?

From: Jonathan Bentz [mailto:[email protected]] Sent: Thursday, March 3, 2016 14:23 To: Microsoft/CNTK [email protected] Subject: [CNTK] renderCmd not working on Linux? (#200)

Hi. I'm running Ubuntu 14.04 and the renderCmd doesn't seem to be working properly. I have a topoplot block defined as follows:

topoplot = [

action = "plot"

outputdotFile="model.dot"

outputFile="model.jpg"

renderCmd="/usr/bin/dot -Tjpg -o"

] # end topoplot

Then when I run CNTK, the following is from the output.

Output network description in dot language to model.dot

Executing a third-part tool for rendering dot:

Done

COMPLETED

The "model.dot" file is generated properly but the JPG file is not generated. In fact the command isn't even printed to the screen. It seems "rescmd" from Source/ActionsLib/OtherActions.cpp is possibly not being set properly?

— Reply to this email directly or view it on GitHub< https://github.com/Microsoft/CNTK/issues/200>.

— Reply to this email directly or view it on GitHub https://github.com/Microsoft/CNTK/issues/200#issuecomment-191993979.

jnbntz avatar Mar 03 '16 22:03 jnbntz

It is confirmed that regex before gcc 4.9.0 is buggy (http://stackoverflow.com/questions/12530406/is-gcc-4-8-or-earlier-buggy-about-regular-expressions) and in this case, it causes the issue.

I have submitted a code review to change std::regex to std::replace. It will commit into master after reviewing and testing.

yqwangustc avatar Mar 04 '16 02:03 yqwangustc