0
$\begingroup$

I have a C# function that calls Mathematica via Wolfram.NETLink. On our home computers all the test calls work perfectly, but on our AWS server (both a microinstance and a beefy c3.xlarge instance), for some reason Plot commands seem to fail. We've tried Export with Plot, and also just computing a vanilla Plot and trying to grab the result through the kernel. Both hang MM indefinitely, and later kernel calls are rejected. When using Export no file is saved; when using Plot, no image comes through the MathKernel.

Any and every Plot command, by itself or wrapped in an Export, produces this effect, but only through NETLink (running the exact same command via the MM notebook interface is successful), and only on our AWS server (this works fine on our home computers), and only these commands -- every other MM command we send gets processed just fine.

$\endgroup$
  • 1
    $\begingroup$ I'm not familiar with .NET and I don't know what's going on but it might be helpful for you to know that rendering graphics (i.e. converting the Graphics[...] expression to a bitmap) is done by the front end, not the kernel. The kernel should automatically start a front end in the background to do the rendering. If something goes wrong with that, you'd observe that Plot itself (generating the Graphics expression) works fine, but retrieving a rasterized (bitmap) graphics fails. $\endgroup$ – Szabolcs Feb 25 '14 at 12:51
  • $\begingroup$ @Szabolcs, thanks, that definitely sounds relevant. I'll keep that in mind. $\endgroup$ – Twiffy Feb 26 '14 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.