Search code examples
c#debuggingbreakpointshpc

C# Microsoft HPC IScheduler - Debugging Issue


I have an issue to run a simple code (Hello World) on Microsoft HPC. The code has a breakpoint. After compiling the code in the debug mode, when I submit the executable to the node ( the one I am using) through IScheduler it doesn't hit the breakpoints, however if I just debug the code directly on the node (the same node I'm on) , it hits the breakpoint. Why it is not hitting when I submit via HPC IScheduler? When I use HPC IScheduler it says "The breakpoint will not currently be hit. No symbols have been loaded for this document."


Solution

  • If I understand you correctly; you are running the app in two fashions for testing. One locally without the use of the HPC Cluster (where your environment is located is not relevant to this) and then again with the use of the HPC Cluster. When you run it locally you can debug as breakpoints are hit but when you run it through the HPC Cluster you are unable to hit breakpoints.

    The issue is because when you run something through the IScheduler which represents the HPC Cluster (be it a SOA Job running through a Broker or a Command Line or MPI Job), it runs under a different process. The application begins to run under the HPC Worker process. If you were to want to debug the application while it is running through the HPC Cluster on your node you would need to attach to the process it was allocated to (there will be 1 HPC Worker Process for each Task running on that node) just as you would if you were attempting to debug a WebService project, WCF Project, or Windows Service. Assuming you are running only a 1 task job you should be able to keep task manager open to see when this process is spun up to get its PID. Unless you put something like a 25~ second pause in the first line of the code representing the application task I wouldn't think you'd be able to attach to the process fast enough to hit your breakpoint.

    If you are running HPC 2008 R2 and Visual Studio 2010 you can install the Debugging tools provided by Microsoft here; http://www.microsoft.com/en-us/download/details.aspx?id=21705 please note that these tools will not function in Visual Studio 2012, nor will they function in HPC Pack 2012, I cannot vouch for any versions pre-dating version 2008 R2 as I did not test with those versions.

    During the original HPC Pack 2012 beta Microsoft had mentioned that the current 2008 R2 tools would not function in HPC Pack 2012 but that a new version of those tools would potentially be released with the first Service Pack release of HPC Pack 2012; however I have not seen any information yet on any timetable for it.