Group Abstract Group Abstract

Message Boards Message Boards

WolframScript: Compute in the cloud, export results locally?

POSTED BY: Bianca Eifert
3 Replies
POSTED BY: Bianca Eifert

I don't think there will be any way to send the output from the cloud to your machine. A possible workaround is to run your script locally, but have it call CloudEvaluate. Here's my script that does this, and then copies the file from the cloud to my local machine. Not beautiful, but it works.

#!wolframscript
CloudConnect["chadk@wolfram.com","xxxx"];
CloudEvaluate[Export[CloudObject["testplot.png"],Graphics3D[Sphere[]],"PNG"]];
CopyFile[CloudObject["testplot.png"],"localttestplot.png"];
Print["all done!"];

Or you could have a 2nd script that calls CopyFile the output from your first script. But that seems even worse.

I also can reproduce the Windows issue. For some reason the single quotes don't work in Windows. If you open the png file with a text editor, you'll see an error message: ToExpression::sntx: Invalid syntax in or before "'Graphics3D[Sphere[]]'". It works without the single quotes:

wolframscript -code Graphics3D[Sphere[]] -format PNG > file.png

Note: note space between the brackets.

POSTED BY: Chad Knutson
Posted 9 years ago

I was able to get a correct output using both local and cloud forms on OS X 10.10.5 Mathematica 11.0:

wolframscript -code 'Graphics3D[Sphere[ ]]' -format PNG > file.png
wolframscript -cloud -code 'Graphics3D[Sphere[ ]]' -format PNG > file.png

I am not sure how to pass Wolfram cloud credentials without typing them however, this seems problematic for using wolframscript in many cases....

POSTED BY: David Proffer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard