I'm using Mathematica 11.0 on 64-bit Linux.
When performing a large operation calling an external bash script, I encounter this error:
This is the line that causes the problem:
var = RunThrough["'" <> FileNameJoin[{NotebookDirectory[],"MathematicaList_GroupData.sh"}] <> "'" <> " -c R coxeter [3,2,7] 38", ""];
This line calls an external script, returning the output as a string and assigning it to the symbol var
. The number 38
in the script above can be any positive integer. The larger it is, the longer the script takes and the longer the final output. Above some threshold, when the number is too large, this error occurs consistently, and the variable var
is assigned Null
.
My system is not running out of available RAM or CPU.
If I run the script manually from the terminal with the exact arguments as above in the RunThrough
command, it behaves as expected and gives the correct output. It's just Mathematica which seems to have a problem reading this output.
I've also tried piping the output of the script to the file and reading it with Get
, but the same error occurs. The output file looks to be well-formatted Mathematica syntax.
How can I resolve this error?
Here is a minimum working example that can reproduce the error: try running Get
on this text file. The link is not permanent, but should last 6 months from the date of posting this question.
Here is sample data for an input of 4
:
List[R[1],R[2],R[3],R[1]**R[2],R[2]**R[1],R[3]**R[1],R[1]**R[3],R[2]**R[3],R[1]**R[2]**R[3],R[2]**R[1]**R[3],R[1]**R[3]**R[1],R[3]**R[1]**R[2],R[2]**R[3]**R[1],R[1]**R[2]**R[1],R[3]**R[1]**R[3],R[1]**R[2]**R[3]**R[1],(R[1]**R[3])^2,R[2]**R[1]**R[3]**R[1],R[1]**R[3]**R[1]**R[2],R[2]**R[3]**R[1]**R[3],R[1]**R[2]**R[1]**R[3],R[2]**R[3]**R[1]**R[2],R[3]**R[1]**R[2]**R[3],(R[3]**R[1])^2]
Get
it? The output should be Mathematica syntax ifRunThrough
works. $\endgroup$1.9MB
. I can't read the whole lot obviously, but looking at the beginning and end it looks to be well formatted Mathematica syntax as for any other input below38
. $\endgroup$Get
on this file reproduces the error for me. I've also added sample data for an input of4
. $\endgroup$