Quantcast
Channel: CUDAfy.NET
Viewing all articles
Browse latest Browse all 1169

New Post: Compilation error: .

$
0
0
Hi

I recently had that problem too. It turned out the cl.exe wasn't in the PATH.

@Nick:
Hi, I hope you're doing well.
The problem here is that the capturing of the std and err out streams isn't working properly after launching the process. I wrote this as a fix (it lacks the timeout code, it was just meant as a quick fix):
                    ...
                    process.Start();

                    string standardOutput = null;
                    string standardError = null;

                    using (Task processWaiter = Task.Factory.StartNew(() => process.WaitForExit()))
                    using (Task<string> outputReader = Task.Factory.StartNew(() => process.StandardOutput.ReadToEnd()))
                    using (Task<string> errorReader = Task.Factory.StartNew(() => process.StandardError.ReadToEnd()))
                    {
                        Task.WaitAll(processWaiter, outputReader, errorReader);

                        standardOutput = outputReader.Result;
                        standardError = errorReader.Result;
                    }


                    if (process.ExitCode != 0)
                    {
                    ...
Now this uses the Task Parallelism features of 4.5 (I'm running cudafy in 4.5), which mightn't be what you need, but at least you have a starting point. Check for instance this article: http://alabaxblog.info/2013/06/redirectstandardoutput-beginoutputreadline-pattern-broken/

Viewing all articles
Browse latest Browse all 1169

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>