I have a question regarding the function "Runprocess" and the architecture of Mathematica(probably).
I would like to admit in advance that my knowledge is not solid enough in Mathematica, therefore, sorry for some unclarity in advance.
The problem is that I use a function Runprocess which is written in the following way
simu[{DD_?NumberQ}] := (1 -
Interpreter["Number"][
StringSplit[
RunProcess[{"C:\\Program Files (x86)\\SIMPSON\\simpson" ,
"C:\\Users\\Timur\\Desktop\\nmr\\simpson_code\\redor2d_ty.in",
ToString[DD], ToString[0]}, "StandardOutput"]]])
ListLinePlot[(simu[{9000}]), PlotRange -> All]
The main part contains the path of 2 files (one is where the program is stored, another is the file to run). As it can be seen, everything is written on Windows 10 OS. Problem is that my program has a bug in Windows, therefore, I use WSL to run my program.
And now I would like to run the same program from Linux system (or from wsl).
And I get an error
In[137]:=
simu[{DD_?NumberQ}] := (1 -
Interpreter["Number"][
StringSplit[
RunProcess[{"/usr/local/bin/simpson" ,
"C:\\Windows\\System32\\Simpson\\redor2d_ty[4048].in",
ToString[DD], ToString[0]}, "StandardOutput"]]])
ListLinePlot[(simu[{9000}]), PlotRange -> All]
During evaluation of In[137]:= RunProcess::pnfd: Program /usr/local/bin/simpson not found. Check Environment["PATH"].
During evaluation of In[137]:= StringSplit::strse: String or list of strings expected at position 1 in StringSplit[$Failed].
During evaluation of In[137]:= ListLinePlot::lpn: 1. -1. Failure[\[WarningSign] Message: Enter a valid number.
Tag: RestrictionFailure
] is not a list of numbers or pairs of numbers.
Out[138]= ListLinePlot[1 - Failure["RestrictionFailure",
Association[
"MessageTemplate" :> MessageName[Interpreter, "number"],
"MessageParameters" -> Association["Input" -> {
StringSplit[$Failed]}], "Input" -> {
StringSplit[$Failed]}, "Type" -> "Number"]], PlotRange -> All]
I assume the problem is that my path for the Linux program is not detected.
So, the question is whether it is possible to call a function in this way. Or is it necessary to use Mathematica in Linux subsystem? If so, then how?