Gamess-US: automatic compilation on Raspberry Pi     [visitor  ]


See main part for compiling Gamess-US
Raspberry Pi [RPi], Model B rev 2, the 40 $ computer, is now available since almost two years. Many educational applications have been described. In November 2013, even Wolfram Mathematica 9 has been donated to RPi as a free programming environment and is included in the newest Raspbian download, see below! Here we show that RPi can also be used for "low cost" applications and demonstrations of Quantum Chemistry. There is no "highly expensive" excuse anymore for not doing simple quantum chemical computations and discuss their results. As the samples demonstrate, meaningfull chemistry can be shown in seconds to minutes, i.e. during a talk or lab session.- Since we apply the Debian derived Raspbian(2014-06-20) as operating system, the sripts in these pages need only minimal change for compiling and running Gamess on RPi. Hence, all software can be had for free and "costs" are limited to acquiring a Raspberry Pi (with 8GB SD card) and connecting a monitor or old TV (HDMI), a used keyboard and mouse (both USB), and a RJ45 internet cable or WiFi USB stick.
The Gamess distribution has several "DOC" files, explaining details, especially how to compose an inputfile for the specific task you have in mind. Simple visualization tools for the results - structure, density contours, electrostatic maps - are within Gamess. More elaborate visualizers for RPi, e.g. with Mathematica™, will be described shortly.

Our script automatically builds a new version of Gamess-US on this Linux system. After compilation of several hundred fortran source files with gfortran-4.6, these are linked to gamess.00.x, the test suite of the gamess package run and results checked.
Here are the details:
For the following to make sense, we assume that you have obtained a password and downloaded gamess-current.tar.gz or gamess-current.tar.Z from Gamess-US into your home directory /home/$USER, usually /home/pi.
Now download and save the script raspigam13 also in /home/$USER

Overview of procedure:

Running the script raspigam13 automatically downloads all necessary programs and libraries. Then it starts a build script buildrpgamess13. This unpacks the Gamess tarball, edits all required scripts from the Gamess-US distribution to reflect RPi's environment, and finally builds gamess.00.x. This takes about 9 hours! You can run it over night because no intervention is required and Raspberry Pi consumes about 4 Watts under full load! When successfully finished, the test suite starts, running 47 short Gamess jobs which engage a large number of the computational tools embedded in Gamess. This takes another 46 min. Finally, all results are compared to a table of correct numerical values. This ends the fully automated procedure.

In about 9.6 hours, gamess.00.x and some other execs are made and Checktst tells you: All 47 test results are correct. Congratulations! your Raspberry Pi now groks Gamess which is permanently installed on RPi's SD card. Here is the summary of a building session.
If you want to reduce the time for installing and testrunning Gamess on the RPi from 9.6 hours to 52 min, download and run rpobjgam13 instead of raspigam13. It uses precompiled object files, see report.

You can download several runs of practical interest from RPi Gamess in the samples directory. Eg computing the structure, the energy, orbitals and several properties of benzene takes 3.6 min, for SiF4 62 sec, for Ethene 14.6 sec (all approx. 20 times slower than on a i7-2900, 3.4 GHz). The longest job is SiF4_g3mp2. It accurately computes the formation enthalpy of gaseous SiF4 at 0 and 298 K with a complex series of routines, taking 144 min on the RPi.

Important note:After shutting down and later restarting RPi, you must set a "System V Memory" allocation. Put this command in before you start a gamess job (only once per session):
sudo /sbin/sysctl -w kernel.shmmax=500000000<enter>
Make sure you count the zeros exactly: It's 500 million! Perhaps you put this command into your .bashrc and forget about it.

Now you can run new jobs by composing correct inputfiles, jobname.inp, in ~/gamess, see .inp files in samples or exam??.inp in ~/gamess/tests/standard, and the commandline:
./rungms jobname > jobname.log<enter>
The output file *.log is a text file and can be studied with a text reader, editor or printed out.

Interesting development: WebMO-14.0, the prize-winning, web-based interface for computational chemistry programs, now has an App for iPhone/iPad. This allows to compose e.g. a Gamess computation from where your mobile is, send it to your Raspberry Pi (in the local network or on the web with a forwarded IP) to run the job and get the results back for visualizing and printing!

back to QC