3
$\begingroup$

I want to produce some plots/graphics for a large amount of data on a computing cluster in a high-throughput way. I'd like to do this by piping results through Mathematica where I'd apply some post-processing to generate some visualizations - PNGs, JPEGSs, GIFs, etc. - and send these results back to my personal computer.

But I have no idea where to start with this. Is the correct answer WolframScripts? Does the cluster need extra Mathematica software modules for this sort of functionality?

Searching around has yielded some opaque results. Any suggestion/answer pointing me in the right direction is appreciated.

$\endgroup$

marked as duplicate by Johu, b.gates.you.know.what, Szabolcs, eyorble, J. M. will be back soon Sep 25 '18 at 20:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ call-a-mathematica-program-from-the-command-line $\endgroup$ – Johu Sep 19 '18 at 23:07
  • $\begingroup$ Check out the command line tag. It has many related questions. $\endgroup$ – Johu Sep 19 '18 at 23:10
  • $\begingroup$ Scripting tag is even better. $\endgroup$ – Johu Sep 19 '18 at 23:11
  • $\begingroup$ You do not need any additional packages. It is more or less the same on all operating systems. Hope, that my links get you started. This question itself is probably too broad and duplicates other. Perhaps you want to come back later with more specific questions. $\endgroup$ – Johu Sep 19 '18 at 23:14
  • 1
    $\begingroup$ Related : mathematica.stackexchange.com/questions/136574/… $\endgroup$ – chris Sep 20 '18 at 0:16
4
$\begingroup$

Since the answer is found not in a single 'duplicate', but multiple ones, here's a summary:

  1. Do not use notebooks. Transfer the code to a plain text .m file.

  2. You can run is as math -script myfile.m. You could also use wolframscript. Full info at Wolfram Language Scripts

  3. Since you're running on a headless Linux machine, and want to export graphics, you'll need to manually ensure that an X server is present:

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.