Tag Info

23

Typically, Mathematica contacts the license server every 2 minutes. If you have a license which supports a very large number of processes, that interval can grow (to help MathLM to scale better). It will never be more than 30 minutes. If three consecutive license checks fail, then Mathematica will instead revalidate the entire license file on what would ...

15

Here are two possible approaches. Using initialization code Firstly, one notes that the process priority is set (in AddOns/Applications/SubKernels/LocalKernels.m) using SetSystemOptions["ProcessPriority" -> -1]; where the numeric value corresponds to a priority as follows: -2: low -1: below normal 0: normal 1: above normal 2: high Process ...

14

There is a setting in Mathematica that controls whether it can access the internet. Go to Preferences -> Internet Connectivity and uncheck "Allow the Wolfram System to access the Internet". Disabling this will disable some features that depend on internet access, such as Wolfram|Alpha queries. This setting can also be controlled by the $AllowInternet ... 12 You can use the global AutoOpenNotebooks setting to give a list of notebooks that must be opened on startup. The default path where it looks for these notebooks is$UserBasedirectory/SystemFiles/FrontEnd/TextResources. Now every time you open Mathematica, that notebook will be opened (in my case, tile.nb).

10

You can download the Remote Development Kit here (scroll down a bit). It's a CDF file that shows this when opened: Click "INSTALL" to finish the installation. Now go to Palettes -> Remote Development Control Panel. Click Configure Pi Connection and enter the IP address of your Pi, as well as the default username. Click New Pi Notebook, enter an ...

10

I assume this is caused by the dynamic content becoming active and trying to run its internal code involving standardBasis which is at that moment undefined (and you can't do a Parton an undefined variable). You may add SaveDefinitions->True to your manipulate to store definitions it depends on. SaveDefinitions has the disadvantage that it may cause ...

9

You appear to have access to 7 Mathematica licenses each of which allow running 4 sub Math kernels. This should allow you to address 4 + 28 = 32 kernels Also of interest, each Mathematica network license comes with a home use license. You could allocate the home use licenses to additional machines (I think even virtual machines) and get another 4 ...

8

webMathematica is probably the most secure solution. Unless someone hacks your sever there is no way to get to the source of your program. Using webMathematica you could easily use standard Web services. Check out the documentation So e.g., you can create a macro in Excel and then it looks like In this way you use standard web technology and keep all ...

8

Not a full answer, but a little too long for a comment. You may need to pay a close attention to licensing. If the results of your computation are used on a single machine (e.g. somehow saved to a database or used further in the computation), you may only need a professional single-machine license. If they are going to be used by other employees / machines ...

8

One way to deal with problems like this is to use DynamicModule inside the Manipulate: Manipulate[ DynamicModule[{e1, e2, standardBasis, y, p} , e1 := {1, 0} ; e2 := {0, 1} ; standardBasis := {e1, e2} ; y := 3 ; Dynamic[ p := {x, y} ; arrowsReference = Table[Arrow[{p, p + Part[standardBasis, j]}], {j, 2}] ] ] , {{x, 1}, ...

7

Here are three progressively more intrusive steps to troubleshoot Mathematica. Hold down Shift-Control (Shift-Command on Mac) while starting Mathematica, as described here. If this didn't fix the problem, move to the next step. Evaluate SystemOpen[$UserBaseDirectory]. This will reveal the directory where Mathematica keeps all its settings, packages, ... 6 Some services provided by Mathematica require Mathematica to access our servers through the internet. The privacy policy on this topic can be found here: http://www.wolfram.com/legal/privacy/wolfram-mathematica.html 6 The list of recently opened notebooks (as shown in File > Open Recent) is saved in the NotebooksMenu option for$FrontEnd, arranged by ascending absolute time (i.e., most recent is last). So the most recent notebook can be opened with: Last[NotebooksMenu /. Options@$FrontEnd] /. HoldPattern[_ -> {file_, ___}] :> NotebookOpen@file Some ... 5 This works on Windows to start the subkernels with low priority, though I think Oleksandr's approach is better. Needs["SubKernelsLocalKernels"] Block[{$mathkernel=$mathkernel<>" -threadpriority=-2"},LaunchKernels[]] 5 Of course this is just an academic technical exercise and cannot be really used due to legal restrictions of the CDF license. On Linux and Windows with JLink this seems to work easily: [rolfm@localhost cdffun]$ cat CDFFun.java /******************************************************** * CDFFun.java * ...

4

Version: Mathematica Version 9.0.1.0, Microsoft Windows 64-bit OS: Windows 7 My mathematica crashed the same way. But only when it was not connected to the internet. I changed my default printer , and it fixed the problem. Follow these steps: Start menu>>Devices and printers There will be one/many printers listed there. The one with a green check mark on ...

3

It is possible to connect to the RPi through a PC running v9 using the remote kernel options From "Kernel Configuration Options..." Add a new kernel Choose the Advanced options and ensure that Arguments to MLOpen has the following -LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract and the Shell command to launch kernel is "java" ...

3

There seem to be at least two ways of changing the MATHEMATICA_USERBASE directory variable, at least in the Windows XP environment, each of which has its own uses, and two of which follow: 1. Open a “Command Prompt” window; issue a “Set” command: Set MATHEMATICA_USERBASE=D:\WorkB\Mathematica, for example; Open MathKernel within the Command Prompt window ...

3

The legacy documentation says: In version 10 MathLink was replaced with WSTP. The equivalent flag is now -wstp. If I run MathKernel.exe from the command line without any flags I get this: However if I run MathKernel.exe -wstp (equivalent to the old -mathlink flag I believe) I get only:

3

This is not really a Mathematica, but an operation system issue. There are several ways on windows to avoid the cmd window showing up: 1) batch file: @echo off start /B MathKernel -noprompt -script file.m 2) WSScript file: Set WshShell = CreateObject("WScript.Shell") cmds=WshShell.RUN("MathKernel -noprompt -script file.mt", 0, True) Set WshShell = ...

3

An extended comment follows. At a high level distributed/parallel processing can get managed in a couple of different ways. Some approaches have used a single communication channel between a master kernel and each of its slave kernels. These single channels handle both data passed back and forth as well as monitoring and management functions. A master ...

2

Put a 2 in MSPConfiguration.xml like explained here <KernelNumber> 2 </KernelNumber> and then your kernels are used efficiently in that sense that if one kernel is busy serving one request, then another one is available if another request happens at the same time the first kernel is still running.

2

This is close. Don't know if this helps. I was getting the some error when I upgraded to Mathematica 9 from Mathematica 8 on Windows 7 64-bit. It crashed right when it was initializing preferences ( as displayed on the spikey icon). (But the kernel was working fine, if I manually launched it from the start menu. I could run some calculations on it as ...

2

This may help. I have no experience with Player Pro, but the free CDF Player will load a script if and only if it is Encoded[]; this has to be done by a full version of Mathematica. It is loaded into CDF Player with the call: Get["filePathToEncodedScript.m"] The problem is that there is no way to get a result of the operation out of the Player kernel ...

2

I made a test file "test.m" Export["test.png",ListPlot[RandomReal[{0,100},{100}]]]; and ran it in the terminal: /Applications/Mathematica.app/Contents/MacOS/MathKernel -noprompt -run "<</Users/mikehoneychurch/Desktop/test.m" and it worked fine. Then tried with Player Pro /Applications/Wolfram\ Player\ Pro.app/Contents/MacOS/MathKernel -noprompt ...

2

R.M beat me but I'll post this anyway for variety. You can open the last Notebook with: Options[$FrontEnd, NotebooksMenu][[1, 2, -1, 2, 1]] // NotebookOpen Methods for preventing the opening of a blank Notebook, for both version 7 and 8 are here: How do I prevent auto loading of blank notebook at startup? 2 The Sub MathKernel licenses are used for the additional kernels used with parallel processing constructs. With those kernels you do not interact directly, but you can submit jobs to them and collect results. See http://www.wolfram.com/products/mathematica/newin7/content/BuiltInParallelComputing/ for details on the parallel constructs which use those ... 2 There are two documented ways to achieve this: Create the environment variable MATHKERNELINIT with value -threadpriority=-1 (the number -1 under Windows corresponds to the priority Below Normal). Under Windows a permanent environment variable can be created via System Properties ► Advanced system settings ► Advanced ► Environment Variables. After creating ... 2 This is not really an answer to the original question but it seems to do what the OP wanted. So as nobody else answered, I'll just go ahead and post what I suggested in the comments above. With can be conveniently used to substitute constants into expressions such as ParallelEvaluate. The second snippet of code from the OP can therefore be written as ... 1 Alright, I managed to make a clunky working script with the help from @Szabolcs' answer here and some testing of the fifo procedure: #!/bin/bash pipe=/home/pi2/mmpipe # check if pipe exists; if not, create it if [[ ! -p$pipe ]]; then mkfifo $pipe fi # check if kernel is running; if not, start it and define functions if [$(ps aux | grep ...

Only top voted, non community-wiki answers of a minimum length are eligible