I have some codes like this:
LaunchKernels[$ProcessorCount];
ParallelDo[
result=myFunction[i];
WriteString[ToString[$KernelID]<>".txt",result,"\n"]
,
{i,k}
]
For some reason I'm only getting one output file from this code (I use 5 processors and it's always 5.txt). Why is that? The code seems to be parallelizing properly in multiple threads based on cpu usage data. Also this is only happening on our 64-bit computing cluster with Mathematica 10.0.2, but not happening on my local 32-bit computer with 2 cores and Mathematica 10.0.1.
ParallelTable[{Directory[], $KernelID}, {k}]return? Just in case: does it work withExportinstead ofWriteString? – Szabolcs Sep 16 '16 at 10:07