Mathematical and Statistical Application - Mathematica - Common FAQs
What do I do if I get a "font error" message when trying to invoke Mathematica using a X-Windows client?
When you try to invoke interactive Mathematica on an Research Computing server displaying graphics with a X-Windows client on your Microsoft1W Windows computer, if you get the error:
Startup Error: The Mathematica fonts are not properly installed in your system.
Make the following changes to the system settings of your X-windows software:
For users of X-Win32
1. Start an X-Win32 session.
2. Right click on the X-Win32 icon on your Windows task bar (it looks like a blue X).
3. In this menu, click on X-Config.
4. This will bring up a window titled X-Win 32 Configuration. Click on the tab titled Font.
5. Click on the Add Font Server button.
6. In the box labeled Host enter fontserver.unc.edu.
7. Click OK.
8. This should add a line under Font path that says tcp\fontserver.unc.edu:7100.
9. Click OK.
What kind of Mathematica program file do I need if I want to submit a batch job?
You will need to submit a text file composed of the necessary Mathematica input commands when you want to run your program in batch mode.
- If you have Mathematica commands stored in a notebook (.nb file) that you would like to transfer it to an infile that can be run in batch mode, you can use one of Mathematica's front end features to help you.
1. Select the cell or set of cells that contain the commands you wish to be written to the infile text file.
2. These cells will be defined as initialization cells by clicking on Cell > Cell Properties > Initialization Cell in the menu bar.
3. Now Mathematica can generate a text file by clicking on File > Save as Special > Package Format.
A dialog box will appear prompting you to give the file a name and location. You can use this Package Format file as the infile for your Mathematica batch job.
It is sometimes useful that you make some changes to the input file:
The first command of the input file needs to be the following.
AppendTo[$Echo, "stdout"]
This command causes all the input lines from your input file to be recorded in the output file. Without this AppendTo command, only the outputs will appear in the output file.
The last line of the input file must be the following.
Quit[ ];
This must be followed by at least one carriage return. This instructs the Mathematica kernel that it is no longer needed and can shut itself down.
For example, an input file to calculate the derivative of 9x would contain the following.
AppendTo[$Echo, "stdout"]
D[9*x,x]
Quit[ ];
At this point you are ready to submit the input file in batch mode
Additional help


