Skip to main content

Compute Server: locally debug your Sun Grid app

Posted by nidaley on April 5, 2006 at 2:32 AM PDT

If you're using Compute Server and you're not already a test driven developer, then this blog is for you! Time to roll up your sleeves and test the Compute Server project that you've created. Besides, it will save you from needlessly spending $$$ debugging your project on the Sun Grid Compute Utility.

Assuming you've already downloaded the latest version and installed the NetBeans 5.0 plug-in from the Compute Server project, here's a quick run down on debugging your app within NetBeans before submitting it to the Sun Grid Compute Utility.

The plug-in contains a Compute Server execution environment that can run on your local machine. This execution environment approximates the Compute Server execution environment on Sun Grid, with the exception that only one task will be executed at a time.

Once you have written your Compute Server application, you are ready to debug it locally. This is done by right-clicking on the project name in the Projects pane and then selecting Debug Project as shown below (alternatively, if your project is set as the main project, you can click the Debug Main Project toolbar icon).

Context Menu showing Debug Project

Debugging a Compute Server project will automatically cause a build of any classes that have changed since the last build or debugging session of the project. In addition, the project will be packaged using the values taken from the project's property sheet.

When the debug session commences, an execution environment will be setup on the local machine that approximates the Compute Server execution environment on Sun Grid, with the exception that only one task can be executed at a time. As you would expect, the session will stop at break points set on any project source file in the NetBeans IDE.

On completion of the run, the run output is compressed into a ZIP file just as it would be on Sun Grid. Then, if an output processing class has been defined, it's main method is automatically called, passing the ZIP file as the first argument.

Clearly, lots of details have been left out here. To understand the Compute Server programming model, including tasks and output processing classes, refer to these information sources:

Happy debugging!

The Final Word...

Quality Assurance: because CPUs deserve better!

Related Topics >>