Running Gaussian on Firebird
Gaussian is computational chemistry software application.
- 1 Setup
- 2 Submitting Gaussian Jobs
- 3 Transferring Gaussian Checkpoint Files
- 4 GaussView
- 4.1 Connect with X11
- 4.1.1 macOS and Linux Users
- 4.1.2 Windows
- 4.2 Start GaussView
- 4.3 Keyboard Shortcuts
- 4.4 macOS Tips for GaussView
- 4.4.1 macOS Keyboard Shortcuts
- 4.5 macOS Troubleshooting
- 4.5.1 libGL error
- 4.5.2 xcb error
- 4.5.3 Slow connections
- 4.1 Connect with X11
Setup
Log into Firebird
Verify you are in the Gaussian Group
Check to see if you are in the "gaussian" group. This is required to be able to use Gaussian. To check, type the command "groups" on Firebird.
Run this command on Firebird
groups
The output should look something like this:
Expected output of groups command
username gaussian
The command lists all the groups you are in. You should see (at least) your username and the gaussian group. If you don't see the gaussian group listed, email support@swarthmore.edu with a request to be added to the gaussian group on Firebird.
Transfer files
Use the scp command to copy files from your computer to Firebird. Replace the file, directory, and usernames (highlighted in red) with your actual values.
Run this command on your computer to copy files to Firebird. If you are logged into Firebird already, open a new Terminal window or tab and run the command below.
scp gaussian_input.com username@firebird.swarthmore.edu:/home/username/TargetDirectory
To run Gaussian calculations on Firebird, submit a job or use an interactive session. Do not run more than trivial jobs on the login node.
Submitting Gaussian Jobs
Here is an example of a Gaussian Slurm job submission file that runs on 8 cores on a single node using 50GB of memory for up to 1 hour. By default, Gaussian will only use a single core. The benefits of parallelism depend on the type of Gaussian job. Specifying more cores than needed may actually slow down a job.
This example is adapted from Gaussian documentation from Research Computing at the University of Colorado Boulder.
#!/bin/bash
#SBATCH --job-name=gaussian
#SBATCH --partition=compute
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=8
#SBATCH --time=01:00:00
#SBATCH --mail-user=$USER\@swarthmore.edu
#SBATCH --mail-type=BEGIN,END,FAIL
#SBATCH --output=gaussian.%j.out
module load g16
# If checkpointing, specify a scratch directory. Uncomment the 2 lines below and adjust path as needed.
# export GAUSS_SCRDIR=/home/$USER/$SLURM_JOBID
# mkdir $GAUSS_SCRDIR # only needed if using /scratch/summit
# the next line prevents OpenMP parallelism from conflicting with Gaussian's internal SMP parallelization
export OMP_NUM_THREADS=1
g16 -m=50gb -p=$SLURM_NTASKS_PER_NODE gaussian_input.com
Submit the job as you would normally using sbatch.
Job submission script
Professor Paul Rablen created a program to generate a Gaussian Slurm submission script.
Gaussian Submission Script File
Download the submission script to Firebird and unzip.
Running the Gaussian Submission Script
Update the submission script file to allow execution (only needs to be done once)
chmod u+x subg16
Run the script as follows where filename.com is the Gaussian input file
./subg16 filename
Other notes
The script will send email on job start, end, or fail. It assumes your email is your username + "@swarthmore.edu". If not, edit the script to change the line containing "--mail-user".
The script will then prompt for a number of cores to use, and a maximum number of hours. The former defaults to 8, and the latter to 10, if you just hit return.
You can also enter the number of cores and hours directly on the command line when running the script:
subg16 filename cores hours
The memory defaults to 8GB per core.
Clean Up Script
Professor Paul Rablen created a script to clean up extraneous Gaussian files after a run has been completed.
Download the script to Firebird and unzip.
Transferring Gaussian Checkpoint Files
Procedure for transferring checkpoint files from Firebird to a local computer:
Run these commands on Firebird
module load gaussian
formchk filename.chk
The formchk utility makes a new file, filename.fchk
, that is a text file.
Log out of Firebird, and copy the .fchk file back to your own computer:
Run this command on your computer to copy files from Firebird
scp username@firebird.swarthmore.edu:filename.fchk .
Use the unfchk
utility to convert the file back:
Run this command on your computer
unfchk filename.fchk
That will create a new binary version of the file, filename.chk
.
To clean up, you may want to delete the .fchk
files, both on Firebird and on your own computer because they can take up a lot of space.
GaussView
GaussView has a graphical user interface so cannot be run through a standard terminal. Follow the instructions below to connect to Firebird based on your operating system then load the Gaussian modulefile and start GaussView.
Connect with X11
macOS and Linux Users
Connect to Firebird using additional SSH flags:
ssh -XY -C username@firebird.swarthmore.edu
On a Mac, you may need to install XQuartz if it isn't already on your system: https://www.xquartz.org/
Windows
To run GaussView on Firebird via Windows, follow the instructions for setting up PuTTY for X11 forwarding on the Logging into Firebird page
Start GaussView
On Firebird, run the following commands
Run these commands on Firebird to start GaussView
module load gaussian
gv
Keyboard Shortcuts
Because performance can be slow, it can be easier to use keyboard shortcuts to access menus. On a Windows computer, use the Alt key combined with the underlined letter in the title to open a menu. In the example below, typing Alt-E on a Windows computer will open the "Edit" menu. See the macOS section below to set up keyboard shortcuts on a Mac.
macOS Tips for GaussView
macOS Keyboard Shortcuts
Keyboard shortcuts can make it faster to navigate an X11 application. The following code maps the macOS "Option" key for use in navigating menu items. Press "Option"+underlined letter of the GaussView menu to open the menu. You can also use the arrow keys to navigate once a menu is open.
To set up the option key, connect to Firebird as specified above. Copy and paste the following commands into the terminal and hit enter.
cat <<EOT > ~/.Xmodmap
clear Mod1
keycode 66 = Alt_L
keycode 69 = Alt_R
add Mod1 = Alt_L
add Mod1 = Alt_R
EOT
xmodmap ~/.Xmodmap
Then launch GaussView.
After the initial setup is complete, just execute the following line before starting GaussView:
xmodmap ~/.Xmodmap
Information from Ewen McNeill, OS X X11 Alt Key
macOS Troubleshooting
libGL error
If you see an error in the Firebird terminal that looks like:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
Quit XQuartz and run the following command on your computer (not Firebird):
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
Info from the Greenplanet Cluster at UCI documentation. Additional info: https://ps.uci.edu/greenplanet/Gaussian%20OSX%20error
xcb error
If you see an error in the Firebird terminal that looks like this:
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
Try running GaussView using this command:
gv -mesagl &
Info from IT-Bereich des Instituts für Chemie.
Slow connections
X11 to Firebird to run GaussView can be slow, especially over VPN. It is a little faster to reduce the number of colors in the XQuartz preferences. Adjust the color preferences below and restart XQuartz and re-connect to Firebird. Reducing to 256 will cause rendering problems, so don't go below "Thousands".
Ways you can contact ITS or find information:
ITS Support Portal: https://support.swarthmore.edu
Email: support@swarthmore.edu
Phone: x4357 (HELP) or 610-328-8513
Check out our remote resources at https://swatkb.atlassian.net/wiki/spaces/remote/overview
Check our homepage at https://swarthmore.edu/its