CUDA library calls and kernels, in order to lessen the asynchrony of error detection in CUDA. The same practice is used in standard library calls for file handling.

Active security measures are also taken. We use tight types in order to detect problems in compile time. We also decorate parameters and variable names with [`const`]{} modifiers where applicable. For pointer immutable parameters we forbid the modification of pointed data as well as the pointer itself. The scope of automatic variables is as narrow as possible, declaring them within blocks, in order to decrease the namespace size in every line of code. We put in practice the simple but effective idea of using meaningful variable names in order to improve the readability.

We also adhere to the practice of publishing the code [@barnes10publish] in the line of [@PrViPaSc2009; @BlViPr2010; @We2010], since it benefits from community debugging and development. It can be found on [@potts3site].

Algorithm checking {#validate}
==================

In order to validate our CUDA code we run some typical simulations to measure well established results.

First we calculate the energy per spin $e$ and magnetization $m$ above and below the transition temperature, by cooling (heating) from an initially disordered (ordered) state. 