How do I set up grid Mathematica Server with the Lightweight Grid Manager on Linux?
Read this article in: Deutsch, Español, Français, 日本語, 한국어, Português, Русский
In order to set up gridMathematica Server, we will
- Install gridMathematica Server on a compute node, then
- Activate the gridMathematica Server’s license and
- Test a gridMathematica kernel.
Install gridMathematica Server on a Compute Node
The gridMathematica Server installer for Linux is a bash script that is run in the Linux terminal. If you’re not familiar with the terminal, please read a brief guide on how to use the terminal.
- Quit any previous installation of Wolfram products running on your machine.
- Open a terminal and navigate the directory to where the installer is located. For example, if the installer is located on your desktop, run:
cd Desktop
This navigates the directory to your desktop. If you wish to verify that the installer file is on your desktop, use the command
ls
. - The installer needs administrative privileges to run. Use the command
sudo
to run the installer script. For example, if the installer is called “installer.sh”, run:sudo bash installer.sh
sudo
asks you to enter the administrative password on the machine. After providing the administrative password, the installer starts. - The installer begins by verifying the archive integrity and then extracting the archive. Once extracted, you are prompted to enter an installation directory.
Enter the installation directory, or press ENTER to select /usr/local/Wolfram/gridMathematicaServer/14.1:
-
Press Enter to install gridMathematica Server to the default directory. To install the software in a different location, type the full file path to your desired installation directory and press Enter.
After installing, you are prompted to configure the Lightweight Grid Manager.
Do you want to configure the Wolfram Lightweight Grid Manager? [y]es (Recommended) Use this option if this machine is not part of an existing cluster management framework. [n]o Use this option if you will access this machine with a cluster management framework (e.g. Windows Computer Cluster Server, Sun grid Engine, Platform LSF), if you will access this machine with a remote shell protocol (e.g. SSH), or if you will install Lightweight Grid manually. If you choose this option but later change your mind, you can reinstall and choose yes.
- Type “y” to select the “yes” option and press Enter. You are prompted to choose a user account from which the daemon will run.
Please select a User Account Method Mathematica kernels and the Wolfram Lightweight Grid Manager daemon will run as the user you select here. If you are unsure which settings apply to your situation, check with your system administrator. (1) Create a local account (Recommended) Use this option to create a new user account on this computer. This allows you to configure security settings specifically for Mathematica. (2) Use an existing account Use this option if you want to use a network user account or an existing local account.
- Press Enter to create an account. You are prompted to enter a user account.
Enter the name of the user account to create, or press ENTER to select (wolframgrid):
-
We recommend creating a new user account with the name “wolframgrid”. Press Enter to confirm this selection.
You are prompted to create a password for the new wolframgrid user account.
Enter a password for the user account "wolframgrid":
-
Choose a login password for the chosen account. Reenter the password when you are prompted to do so.
You are prompted to create a Web Interface Admin Account and password.
Web Interface Admin Account This password is used to log in as 'admin' to the web interface to perform such actions as killing kernels and changing the configuration. Type a password for the web admin:
-
Choose a login password for the Web Interface Admin Account. Re-enter the password when you are prompted to do so.
You are prompted to enter a directory in which to place the gridMathematica executable scripts.
Launch the web interface to install your license: http://localhost:3737/WolframLightweightGrid/Manager . . . Type the directory path in which the gridMathematica Server script(s) will be created, or press ENTER to select /usr/local/bin:
-
Press Enter to place them in the default directory. To place the executables in a different location, type the full file path to your desired executables directory and press Enter.
If Mathematica is already installed on the computer, then you are prompted to overwrite the existing shortcuts.
The scripts 'MathKernel', 'Mathematica', 'WolframKernel', 'math', 'mathematica', 'mcc', 'wolfram' already exist in the directory /usr/local/bin. The following actions can be performed on the existing file(s). (1) Overwrite (2) Rename (3) Cancel Type your selection, or press ENTER to select (1):
-
We recommend canceling the overwrite, as it may interfere with starting the standalone version of Mathematica that is already installed. Type “3” and press Enter to cancel this step.
WolframScript allows Wolfram Language code to be run from the command line and from self-executing script files. It is always available from /usr/local/Wolfram/gridMathematicaServer/14.1/Executables/wolframscript. WolframScript system integration makes the wolframscript binary accessible from any terminal, and allows .wls script files to be executed by double-clicking them in the file manager. Install WolframScript system integration? [y/n]
- wolframscript is an optional add-on to execute Wolfram Language code from the command line or by using a script. To install wolframscript, type “y”; otherwise, type “n” and press Enter to confirm your choice.
The installation procedure is now complete.
Activate the gridMathematica Server’s License
- Navigate the directory in which gridMathematica Server is installed. With the default location, this would be:
cd /usr/local/Wolfram/gridMathematicaServer/14.1/Executables
- Open gridMathematica with the following command:
./Mathematica
- Activate gridMathematica Server. Activating gridMathematica creates a mathpass file located at
~/.Mathematica/Licensing/mathpass
. -
In order for all users to access activated gridMathematica kernels, move the mathpass file to the so-called base directory. You can do this with the
sudo mv
command:sudo mv ~/.Mathematica/Licensing/mathpass /usr/share/Mathematica/Licensing/.
Test a gridMathematica Kernel
- Open a web browser and navigate to localhost:3737. The main status page appears.
-
The left panel indicates any gridMathematica Servers visible on the local network, including the one that was just installed.
Navigate to Kernel Settings ► Services.
- Click the Open Kernel link to open a kernel. A warning message appears.
- Confirm the warning message by clicking OK. A Wolfram kernel attempts to start.
- Wait for the Wolfram kernel to initialize. A connection status appears.
- Verify that the kernel state is Available.
The configuration of the Lightweight Grid Manager is now complete and tested.
Contact Support
Whether you have a question about billing, activation or something more technical, we are ready to help you.
1-800-WOLFRAM (+1-217-398-0700 for international callers)
Customer Support
Monday–Friday
8am–5pm US Central Time
- Product registration or activation
- Pre-sales information and ordering
- Help with installation and first launch
Advanced Technical Support (for eligible customers)
Monday–Thursday
8am–5pm US Central Time
Friday
8:30–10am & 11am–5pm US Central Time
- Priority technical support
- Product assistance from Wolfram experts
- Help with Wolfram Language programming
- Advanced installation support