4
$\begingroup$

I run this code:

ParallelDo[
  Print["Hi"];,
  {i,Range[2]}
  ]

And I get this:

Launching kernels...
StringForm[From `1`:, Parallel`Kernels`kernel[Parallel`Kernels`Private`bk[SubKernels`LocalKernels`localKernel[SubKernels`LocalKernels`Private`lk[LinkObject["C:\Program Files\Wolfram Research\Mathematica\12.0\WolframKernel" -noicon -subkernel -noinit -nopaclet -wstp, 93, 4], {"C:\Program Files\Wolfram Research\Mathematica\12.0\WolframKernel" -noicon -subkernel -noinit -nopaclet -wstp, SubKernels`LocalKernels`LowerPriority -> False}, SubKernels`LocalKernels`Private`speed$1005, SubKernels`LocalKernels`Private`preemptive$1005]], Parallel`Kernels`Private`id$1021, Parallel`Kernels`Private`name$1021], Parallel`Kernels`Private`ek[Parallel`Kernels`Private`nev$1022, Parallel`Kernels`Private`pb$1022, Parallel`Kernels`Private`rd$1022], Parallel`Kernels`Private`sk[Parallel`Kernels`Private`q$1023, Parallel`Kernels`Private`n0$1023, Parallel`Kernels`Private`n1$1023]]]
Hi

StringForm[From `1`:, Parallel`Kernels`kernel[Parallel`Kernels`Private`bk[SubKernels`LocalKernels`localKernel[SubKernels`LocalKernels`Private`lk[LinkObject["C:\Program Files\Wolfram Research\Mathematica\12.0\WolframKernel" -noicon -subkernel -noinit -nopaclet -wstp, 92, 3], {"C:\Program Files\Wolfram Research\Mathematica\12.0\WolframKernel" -noicon -subkernel -noinit -nopaclet -wstp, SubKernels`LocalKernels`LowerPriority -> False}, SubKernels`LocalKernels`Private`speed$1004, SubKernels`LocalKernels`Private`preemptive$1004]], Parallel`Kernels`Private`id$1017, Parallel`Kernels`Private`name$1017], Parallel`Kernels`Private`ek[Parallel`Kernels`Private`nev$1018, Parallel`Kernels`Private`pb$1018, Parallel`Kernels`Private`rd$1018], Parallel`Kernels`Private`sk[Parallel`Kernels`Private`q$1019, Parallel`Kernels`Private`n0$1019, Parallel`Kernels`Private`n1$1019]]]
Hi

This is especially disruptive because the middle line ("StringForm[...") wraps across and takes over most of my screen space. Reading the output becomes very difficult. Is there a way to hide the gibberish?

$\endgroup$
  • $\begingroup$ Which version and OS are you using? $\endgroup$ – Edmund Oct 18 '19 at 10:56
  • $\begingroup$ Mathematica 12.0 for Windows, Wolframscript for Windows 1.2.0 (not a typo) $\endgroup$ – Mattia Landoni Oct 19 '19 at 16:00
2
$\begingroup$

The underlying cause is that default output format is ScriptForm when using math -script or wolframscript.

To work around this issue, put the following at the beginning of your script:

SetOptions[$Output, FormatType -> OutputForm]

I did report this problem to Wolfram some months ago.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Update: updating to Wolframscript for Windows version 1.3.0 should solve the problem, according to Wolfram's help line. $\endgroup$ – Mattia Landoni Oct 22 '19 at 5:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.