I'm running a Mathematica script on a remote machine (via ssh connection). I log on the machine and I execute
math -script algorithm.m and this message appears
FrontEndObject::notavail: A front end is not available; certain operations require a front end. Launching kernels...
I think the message of the
FrontEndObject is only a warning and it's not a particular issue. My problem is that this computation takes 20 seconds and outputs a .txt file but the message
Launching kernels... etc stays forever until I press Ctrl-C. At that point I can see again my command prompt and, indeed, I find that the output is there and it's been there for minutes.
The problem is not the Warning of the FrontEnd Object (for which I solved the issue), the problem is the fact that the line
Launching Kernels... stays forever and I don't get to have the command prompt back.
My program consists simply on a function GeneticAlgorithm[x1_, x_2, x_3] that has already been used multiple times in my group by other phd students and it works. I added just two lines to run the program on a remote machine, namely:
So basically my program is:
GeneticAlgorithm[x1_, x_2, x_3] :=*definition of the function*
As I run the program, the output prova.txt is created and the line "ciao" appears on the terminal. But nothing else happens, and I don't get my command prompt back. I tried to add
Quitto the end of my program but the problem remains.