When you are developing code for NAS systems, testing a new compiler version, or porting a code from one platform to another, the following guidelines can help ensure that your code runs correctly and/or reproduces results from the platform it was ported from.
- Start with small problem sizes and use just a few time steps/iterations to quickly check whether the program is running correctly; setting up your PBS script and data files can often be done with 10 minute jobs.
- Run your test jobs on the PBS debug queue for quicker turnaround.
- Make as few code changes as possible when porting, and use the same data sets on both old and new platforms to compare results.
- Keep in mind that an absence of error messages does not necessarily mean that the code is running correctly on either platform.
- Be attentive to porting data files: for example, unformatted Fortran files (FORM='unformatted') are not necessarily portable.
- If there are any problems with code ported to a new platform, do not assume that the new code is wrong and the previous code is right—both may be wrong.
The articles in the Porting/Building Code section provide information about compilers and libraries, as well as methods for porting, debugging, and analyzing performance.