14.09.2014 Views

CASINO manual - Theory of Condensed Matter

CASINO manual - Theory of Condensed Matter

CASINO manual - Theory of Condensed Matter

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• Track down bugs either by (i) inserting write statements in the code and recompiling or (ii)<br />

using a debugger (such as gdb) in conjunction with binaries that have been compiled with the<br />

debugging flags set, which you can use by passing the --debugger=debugger-binary option to<br />

runqmc.<br />

• Any utilities you write should also be tested by compiling and running with full debugging flags.<br />

Use, e.g., man f90 to find out about the available debugging flags for your compiler.<br />

• If you get stumped and have to send a bug report to us in Cambridge, then please make sure that<br />

everything we need to reproduce the problem is attached or otherwise available. Our record so<br />

far is an exchange <strong>of</strong> 24 emails—beginning with one stating ‘casino doesn’t work!’—before we<br />

discovered precisely what it was the user was complaining about (that is, what the problem was,<br />

rather than the solution). We shall leave it to you to guess which distinguished London-based<br />

pr<strong>of</strong>essor we are referring to.<br />

A.4 Performance<br />

casino can print a detailed timing analysis at the end <strong>of</strong> the output file when it has finished a<br />

calculation. This information can be useful to the programmer in deciding what optimizations to do<br />

to make the program run faster. It is generally disabled by default since, annoyingly, the process<br />

<strong>of</strong> calculating the timings slows down the code significantly. To activate the detailed analysis, set<br />

timing info=T in the input file.<br />

The total time is printed as ‘CPU’ time, and the ratio between ‘System’ and ‘User’ time is displayed<br />

as well. These timings are broken down according to specific tasks, although by no means all activities<br />

are timed—only those thought likely to contribute significantly. For very small systems such as atoms<br />

a significant amount <strong>of</strong> CPU time will remain unaccounted for since the traditional heavyweight<br />

tasks are very fast. For medium and large systems, <strong>of</strong>ten the calculation <strong>of</strong> the orbitals and their<br />

derivatives will dominate, closely followed by Jastrow factors and Ewald interactions. In systems with<br />

pseudopotentials, the nonlocal integration is very expensive indeed (since it calls the orbital evaluation<br />

routine a lot) and this expense will increase the larger the nonlocal cut<strong>of</strong>f radius (lower nlcut<strong>of</strong>ftol<br />

in the input file to see the effect <strong>of</strong> this).<br />

The ‘User’ time is the time spent executing the instructions that make up the user code, including,<br />

e.g., calls to subroutine libraries linked to the code.<br />

The ‘System’ time is the time spent in kernel mode, processing I/O requests, for example, or other<br />

situations which require the intervention <strong>of</strong> the operating system.<br />

Together these comprise the total CPU time. Note that the User time is usually significantly greater<br />

than the System time. Indeed, a high ratio <strong>of</strong> system to user CPU time may indicate a problem.<br />

Exceptions such as page faults, misaligned memory references, and floating-point exceptions consume<br />

a large amount <strong>of</strong> system time. Note that time spent doing things like waiting for input from the<br />

terminal, seeking on a disk, or rewinding a tape does not appear in the CPU time; these situations<br />

do not require the CPU and thus it can (and generally does) work on something else while waiting.<br />

The elapsed (‘wallclock’ or ‘real’) time is simply the total real time that passed during the execution<br />

<strong>of</strong> the program. This will typically be greater than the total CPU time due primarily to sharing the<br />

CPU with other programs. In addition, programs that perform a large number <strong>of</strong> I/O operations<br />

requiring more memory bandwidth than is available on the machine (i.e., the CPU spends significant<br />

time waiting for data to arrive from memory, or is paged or swapped) will show a relatively low ratio<br />

<strong>of</strong> CPU time used to elapsed time.<br />

A.5 Bug reports<br />

We cannot <strong>of</strong> course guarantee that casino is free <strong>of</strong> bugs, and if you find one, please tell us. If<br />

you don’t know what the problem is yourself, than please include as much detailed information you<br />

can about the nature <strong>of</strong> the error in order to ensure a quick fix. In particular, please send us all the<br />

relevant input files to enable us to reproduce your problem.<br />

A.6 Requests for new features<br />

We are <strong>of</strong> course always happy to discuss such requests.<br />

216

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!