Everything You Need To Set Up PC-GAMESS On A(n) SMP System

The following is a step-by-step guide to getting PC-GAMESS 6.4 (perhaps prior. I’m not inclined to check, but would appreciate a confirmation) running on a(n) SMP (that’s Symmetric MultiProcessing (useless trivia), a single motherboard with multiple processors) system. All of the websites describing what’s below are less… obvious than I would like, especially concerning the infamous .pg file for SMP machines. What’s below is specifically geared for a dual-core/dual-board (four processor) system, but is easily changed to other SMP cases.

1. Obtain the most recent (6.4 as of this posting) version of PC-GAMESS from the good Dr. Alex Granovsky.

2. After extracting the contents of the downloaded .exe file, you’ll notice the wmpi1_3.exe file. Double click to install this program, blindly saying yes to everything it asks.

3. In your c:\ directory (dig into My Computer), create the sub-directories pg1, pg2, pg3, and pg4 (note: the names are completely arbitrary). When that’s done, your folders should look like the following (PEXECUTE.BAT and PRUNGAMESS.BAT are separate batch files you can download below):

4. Into c:\pg1, place all of the extracted PC-GAMESS files (whatever came out of the .exe run). The folder should look like this (with three input files added by myself for testing):

5. Into the folders c:\pg2, c:\pg3, and c:\pg4, copy and paste (from c:\pg1) the files FASTDIAG.DLL, PCGP2P.DLL, and PGAMESS.EXE. These directories will look like the following:

6. Back in c:\pg1, create or place pgamess.pg, the wmpi config file you can download HERE (if you download, remove the .txt extension before use). The file is, simply,

local 0
localhost 1 c:\pg2\pgamess.exe 
localhost 1 c:\pg3\pgamess.exe 
localhost 1 c:\pg4\pgamess.exe 

No surprises, but I’ve never found the SMP .pg file listed anywhere. This file is just for SMP runs. local 0 refers to the “base” copy of PGAMESS (in c:\pg1, the PC-GAMESS home directory). The localhost 1 lines call each of the other three directories and PGAMESS.EXE for the three remaining processors (in the quad box). For a dual core or dual CPU box, you’d remove c:\pg3 and c:\pg4 and delete the third and fourth lines in pgamess.pg.

7. The command line will look like the following (note: the input file must be named “input“):

c:\pg1> PGAMESS.EXE c:\pg1 c:\pg2 c:\pg3 c:\pg4 -p4local > filename.out

All should, in theory, work without hitch. For a batch-type system (you can’t add new files, but you can run existing jobs in the same directory automatically and sequentially), download the files PEXECUTE.BAT and PRUNGAMESS.BAT and place them into c:\pg1 (make sure to remove the .txt extension before use if you download these). To run this script, simply double-click on PRUNGAMESS.BAT.

NOTE1: Of course, what’s shown is not the most efficient way to run PC-GAMESS. For maximum speed-up, you’ll want a single hard drive dedicated to EACH processor (so each temp file is being written to a different disk). Your folders c:\pg1, c:\pg2, c:\pg3, and c:\pg4 would then be c:\pg1, d:\pg2, e:\pg3, and f:\pg4.

NOTE2: A number of my calculations fail randomly with MPI memory allocation/write errors on dual core/dual cpu AMD Opteron machines running Windows XP. These errors are actually hard drive write problems and not RAM problems. You can get around this problem (errors and OK buttons will pop up) by running the calculations in-RAM (DIRSCF=.TRUE.) and ramping up the amount of used RAM (with the MEMORY= keyword).

Using External Basis Sets In GAMESS-US, Running Mixed Basis Set Calculations With Z-Matrix Inputs

The parameterization of the new nanoENGINEER-1 simulator is being performed for molecules containing H through Cl at the B3LYP/6-31+G(d,p) level of theory. Unfortunately, the 6-31+G(d,p) basis set is not available for the 4th row elements (Ga,Ge,As,Se,Br), meaning an alternate basis set is required (for the 4th row, that is). In GAMESS-US, this is simple if the input files are in Cartesian format. This same approach cannot be used in Z-matrix input formats. A (maybe THE only) way to call mixed basis sets for Z-matrices in GAMESS-US is provided here. The procedure involves making an external basis set file with the required basis sets, changing the $BASIS control to read the external file, and modifying rungms to read the external basis set file.

Below is a sample input file. The only noteworthy differences between it and any other input file are (a) the $BASIS line, which tells GAMESS-US to use the external file (EXTFIL=.TRUE.) and (b) the call to use external basis sets named STO2GBAS. In this external file, you can have multiple groups of elements and basis sets, but not multiple basis set types for the SAME ELEMENT in the same group (so far as I know at the moment). This means that the external basis set example file I have available here has Hydrogen (H) and F (Fluorine) STO-2G (STO2GBAS) and 3-21G (321GBASI) basis set groups, but that you CANNOT call the STO2GBAS Hydrogen basis set and 321GBASI Fluorine basis set.

 $CONTRL SCFTYP=RHF RUNTYP=OPTIMIZE COORD=ZMT $END
 $BASIS EXTFIL=.TRUE. GBASIS=STO2GBAS $END
 $CONTRL NZVAR=1 $END
 $ZMAT IZMAT(1)=1,1,2 $END
 $DATA
COMMENT: HF Z-matrix with mixed basis sets
C1
H
F  1  HFDist

HFDist=1.00
 $END

The edit to the rungms file is as follows. You will need to change the EXTBAS control from its default (/dev/null) to the location of the external basis set file (which I have named EXTFILE.txt). If the basis set file is in the same directory as your GAMESS-US executable, then change the EXTBAS to ./EXTFILE.txt.

set echo
setenv ERICFMT ./ericfmt.dat
setenv IRCDATA ./$JOB.irc
setenv   INPUT $SCR/$JOB.F05
setenv   PUNCH ./$JOB.dat
setenv  EXTBAS ./EXTFILE.txt
setenv  AOINTS $SCR/$JOB.F08

The external basis sets can, of course, be downloaded from www.emsl.pnl.gov. My sample file, EXTFILE.txt, is below. Note the STO2GBAS and 321GBASI grouping. These labels MUST have 8 characters. Change the basis set choice by changing GBASIS in $BASIS in the input file.

H STO2GBAS
 S   2
  1         1.309756377    0.4301284980
  2         0.233135974    0.6789135310

F STO2GBAS
 S   2
  1        63.73520200     0.4301280000
  2        11.34483400     0.6789140000
 L   2
  1        2.498548000     0.4947200000E-01     0.5115410000
  2        0.633698000     0.9637820000         0.6128200000

H 321GBASI
 S   2
  1        5.4471780000    0.1562850000
  2        0.8245470000    0.9046910000
 S   1
  1        0.1831920000    1.0000000000

F 321GBASI
 S   3
  1     413.80100000000    0.5854830000E-01
  2      62.24460000000    0.3493080000
  3      13.43400000000    0.7096320000
 L   2
  1       9.7775900000    -0.4073270000         0.2466800000
  2       2.0861700000     1.2231400000         0.8523210000
 L   1
  1       0.4823830000     1.0000000000         1.0000000000

You can download all of the program text and some brief comments in a single file located HERE.

In order to use the 6-31+G(d,p) and 6-311G(d,p) basis sets for a single molecule of mixed 1st/2nd/3rd row and 4th row elements, define an 8-character sequence for the group (like MIXEDBAS) and simply add all of the required basis sets for whatever elements into that group. Again, it is not obvious how to have two Hydrogen atoms in a single molecule have two different basis sets in a Z-matrix input by this (or any other) method in GAMESS-US, but the above goes a long way towards removing a major obstacle to running many molecules.

Setting Up Linux Machines To Obtain Accelrys Licenses From A Windows License Server

And I’m posting this from my PowerBook G4 running OSX, so I’ve got all the major players covered.

There are (in the vicinity of) one-half-million things that can go wrong between buying a bunch of computer parts and Accelrys licenses and having the Client-Server License system set up and working flawlessly. If everything goes correctly, the biggest problem one might experience is figuring out what the installation instructions have to do with the installation of the software.

In an ideal world, what follows is all you should need to do in order to get (I suspect) most any Accelrys product working correctly in a (Linux) Client-Server (MS Windows) system (my own interest is DMol3, which I will refer to throughout). The system I’m working with has the DMol3 license(s) set up on a Windows XP machine. The Windows box, besides being the license server, is the only platform the Materials Studio GUI will run on (makes that decision easy). What we want to have happen over the course of a DMol3 run is:

(a) A Linux box starts a DMol3 job
(b) DMol3 asks for one or more licenses from the Windows box
(c) The Windows box offers licenses to the Linux DMol3 box
(d) The DMol3 job crashes with problems unrelated to the license

NOTE: I’m doing all of this with OpenSuse 10.0 (everything installed as per my past posts) on numerous dual/quad Opteron boxes. The constant references to Redhat products in the installation instructions are of no consequence. I also have all of the machines plugged into a switch with static (ye olde 10.0.0.n and 255.0.0.0) IP addresses assigned (in Suse: YaST Control Center -> Network Devices -> Network Card -> Edit -> Static Address Setup of 10.0.0.N, Subnet Mask of 255.0.0.0). The intranet Windows ethernet card (the one to the switch) is fixed to 10.0.0.1 (the Windows IP address must be fixed, as you’ll need to add a line to /etc/hosts on the Linux boxes).

The installation steps are as follows:

Windows

1. Install Materials Studio on the Windows machine and follow the instructions that come with the license file to get the License Administrator software working (in the email you get, that is). The installation on the Windows box should be the least of your problems.

2. If you are running Windows XP and your machine does not have a connection to the outside world, TURN OFF THE FIREWALL! If, however, you want to remotely log in and run jobs, you will need to have port 1715 open (the one the Linux box will peak into to obtain the licenses).

3. Name your Windows machine because (at least, in the Accelrys version I have) the license software for Linux doesn’t know to look for IP addresses.

Control Panel > System > Computer Name > Change > add name

Linux

4a. For Multiprocessor Machines Only: If you’re fresh from a Suse install (or even not), you’ll be asked to install the mpi software if you’ve more than one processor. Do this by the following (and don’t let the 386 thing scare you if you’re on a 64-bit machine):

a] su
b] rpm -ivf /media/cdrom/UNIX/Linux/hpmpi/hpmpi-2.01.00-08.i386.rpm

su requiring the root password for the install and /media/cdrom being wherever the CD is mounted. If you don’t do this step first, the installation (below) will start but complete, give you a message to install the mpi software, then require you to run the install again.

4b. Change to the root account or “su” in (if you didn’t need step 4a above) and install the Accelrys software as per the instructions on the CD. Say yes blindly to the default directories. If will make life easier. You’ll be asked to install the License Pack software. Blindly say yes to all of that and do what it asks.

c] su
d] cd ../UNIX
e] ./Install

../UNIX = the path to your CD/DVD drive. Likely /media/cdrom or /media/dvd in Suse, /mnt/cd or /mnt/dvd elsewhere.

5. At this point, Windows us up and running, the Linux box has the Accelrys software installed, and all the machines are plugged into the switch with IP addresses assigned. Now the fun begins. You’re probably still active as root. If not, get there (su).

8. Move the license file you received by email into the license setup directory. You’ll then run matStudioLicInstall to formally introduce the Accelrys software to the server machine. I assume your license file is in your home (cd ~/) directory.

f] mv LICENSEFILE /usr/people/MSI/MaterialsStudio/Licensing/Setup
g] cd /usr/people/MSI/MaterialsStudio/Licensing/Setup
h] ./matStudioLicInstall LICENSEFILE

9. Now we add a line to /etc/hosts so that the license software will find the Windows machine by name (not IP). Run pico and add 10.0.0.1 machinename. As root”

i] pico /etc/hosts
j] 10.0.0.1  machinename

Save/Exit (Crtl-X for you noobies).

10. Make sure the system dates on Windows and Linux are the same. The licensing will fail if the machines differ by more than a day or so.

11. exit out of root.

k] exit

12. In your home directory, add the following to your .cshrc file. This will let you run the DMol3 run script (RunDMol3.sh) from your home directory and not have to specify directory names.

l] cd ~/
m] pico .cshrc

Add the following to a new line

n] set path = ( /usr/people/MSI/MaterialsStudio/DMol3/bin $path )

Save/exit (Crtl-X).

It is possible that you don’t have a .cshrc file already. The above process will make one.

13. To run DMol3, change your shell to csh

o] csh

14. You should be able to run DMol3 by typing the following (note -np X specifies the number of processors. If you have only one CPU, leave out the -np X):

p] RunDMol3.sh -np X [FILE NAME, NO EXTENSION]

15. If DMol3 starts but hangs (makes an .outmol and _opt.summ file but nothing else), the first thing to do is make sure you really did turn off the Windows firewall and that it didn’t restart itself. That cost me a long morning.

Any questions, drop a line or register and post a comment. We’re always open.