CubeMathematica NB

SzgLink Initialization

Make sure SzgLink Package is in the same directory as this notebook.  Then evaluate this to import it.

SetDirectory[NotebookDirectory[]];
<<SzgLink`

MathLink Connection Part A

Enter the IP address of your szgserver or use one of the below:

machineip="";

(* standalone *)
machineip="127.0.0.1";

(* fire ISL *)
machineip="130.126.127.24";

Evaluate this to assign port values (they must be sequential):

port1="9996";
port2=ToString[ToExpression[port1]+1];
masterport1=ToString[ToExpression[port2]+1];
masterport2=ToString[ToExpression[masterport1]+1];

Evaluate this to set up CM notebook/exe communication:

$szglink = Install[port1<>"@"<>machineip<>","<>port2<>"@"<>machineip, LinkMode->Listen, LinkProtocol->"TCPIP"];

Launch caveMathematica.exe

From a Syzygy-enabled  command shell, enter either:

■     Standalone:
caveMathematica <IP>

■     Cluster:
dex <machine> caveMathematica <IP>

MathLink Connection Part B

Evaluate this to set up CM exe/Cube communication (szglink+mathlink):

CaveOpenSecondaryLink[" -linkconnect -linkprotocol tcpip -linkname "<>masterport1<>"@"<>machineip<>","<>masterport2<>"@"<>machineip];
$szgcavelink = LinkOpen[masterport1<>"@"<>machineip<>","<>masterport2<>"@"<>machineip,LinkMode->Listen, LinkProtocol->"TCPIP"];
MathLink`AddSharingLink[$szgcavelink,MathLink`AllowPreemptive->True];

Press button 1 on the wand or inputsimulator to establish the MathLink connection.  You may then proceed to display Mathematica graphics in the Cube.  For information about SzgLink evaluate the following:

??SzgLink`*

When you leave,do not save.  [If you are updating,delete the outputs.]

Wands

If you want to replace the default wand with a hand graphic, choose one of the following :

WandSZG[];

WandSZG[];