03 August 2016

631. Small linux installation in virtualbox on windows for formchk usage

This post is for windows users (it's written for a colleague).

In https://verahill.blogspot.com.au/2016/08/630-making-mo-figures-in-gabedit-using.html I mentioned that g09w doesn't seem to handle my .chk files for linux (G09D).

If you have gaussian for linux (e.g. G09D), then you can set up a small linux installation on windows, install gaussian there and run formchk in the linux environment.

The guide assumes that you don't really know much about linux, or virtual machines. There are plenty of screenshot -- probably too many -- but if you work through them one by one it should be easy to get set up.


1. Install virtualbox
Go to https://www.virtualbox.org/wiki/Downloads

Download "VirtualBox 5.1.2 for Windows hosts"

Download the "VirtualBox 5.1.2 Oracle VM VirtualBox Extension Pack" as well.

It doesn't have to be version 5.1.2. Download whatever the latest version is.

Run the installation file for virtual box.
















2. Install linux in the virtual machine
Assuming that you have cheap and fast internet, download the netinst version of debian.
https://www.debian.org/CD/netinst/

You'll want the AMD64 iso file: http://cdimage.debian.org/debian-cd/8.5.0/amd64/iso-cd/debian-8.5.0-amd64-netinst.iso

You can also download this via bittorrent: http://cdimage.debian.org/debian-cd/8.5.0/amd64/bt-cd/debian-8.5.0-amd64-netinst.iso.torrent

Start virtualbox and set up a new machine.












Then install linux: Note that at no point are any changes made to your Windows harddrive. All changes are made to a file that virtualbox uses as a harddrive for the virtual machine (i.e. your linux installation)









































NO changes are made to your 'real' harddrive, so don't panic.






3. Install gaussian in the linux virtual machine
For this you will need to figure out how to transfer files between the machines. The easiest, most dependable way is via sftp.

To do this you will need to download and install filezilla: https://filezilla-project.org/download.php?type=client
Do that. It's easy.

Next, configure your virtual machine to set up port forwarding.

Start your linux installation (e.g. hit the Start button in VirtualBox)
First figure out what your IP address is. Log in using the username and password you created when you installed linux.

 Then type ip addr
ip addr
The output you're looking for is the ip address for interface eth0 -- look for the value after inet, i.e. 10.0.2.15

Next configure virtualbox: (leave linux running in the background)



Now start Filezilla:
 You want to connect to sftp:/127.0.0.1 and port 2222. Use the username and password you set up for linux.
Hit connect

Sure
Yes

Create a new directory on the linux computer


It should now look like this (look at the right column)

Transfer your files (navigate to the correct directory in the left column, select files and drag them across)
Select and drag
We're only copying formchk here. That's all we need.
Copied
 In the linux computer, change to the correct directory e.g.
cd ~/g09

Then run
chmod ug+x formchk

Check




4. Transfer .chk files from windows host to linux guest

You'll transfer the files using filezilla as shown before. Connect to sftp://127.0.0.1, port 2222, and go to the g09 directory where your formchk file is.

Like so



5. Convert .chk files to .fchk files
In the linux computer, change directory to g09 and run formchk
./formchk example.chk
4. Transfer .chk files from windows host to linux guestThe ./ before formchk is important

running formchk


Then transfer the file back using filezilla:

refresh



See the files





6. Shutdown linux
E.g. by running
sudo shutdown -h now

shutdown

All in all the linux install takes about 1.1 Gb -- this could probably be cut down to 100-200 Mb, and the set up can be improved quite easily. However, this is the most straightforward set-up that I can think of without having to do customisation.

+1.1 Gb





630. Making MO figures in gabedit using fchk files from gaussian on Windows XP

The goal is to show how to make pretty figures of MOs from Gaussian computations using GabEdit.

This is a write-up for a colleague whom is using Windows. The GabEdit bits work pretty much the same way on linux, although the povray stuff is a lot easier (in my opinion anyway) on that OS.

Anyway, Windows it is.


A. Optional: Install Gaussian (G09W)
If you have G09W you can install it. To use the formchk utility, add the location of your gaussian installation to path.

Do this by right-clicking on My Computer, select the Advanced tab, click on Environment Variables, and then click on the Path entry under System Variables. Click Edit, and add
;c:\g09w
if that's the correct path for you. The ";" is just to separate your entry from the previous one. If you need to add another entry afterwards (e.g. for povray), put a ";" after c:\g09w



Either way it's optional, as you will likely have access to formchk on the same computer/system that you ran your job on and can do the chk -> fchk conversion there.

Also, using formchk on a windows computer on a .chk file from a linux computer might not work (which was my case)

An alternative is to set up a smallish linux VM: https://verahill.blogspot.com.au/2016/08/631-small-linux-installation-in.html


B. Optional: Add option to open terminal using mouse
Following this: https://stackoverflow.com/questions/378319/windows-explorer-command-prompt-here/379804

Create a plain text file called context.reg



Edit it and put the following in it:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmd]
@="Open Command Prompt Here"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmd\command]@="cmd.exe /k pushd %L"

Like so...
Run it (i.e. double-click):
Yes!
You will now have an "Open Command Prompt Here" option when right-clicking on a folder in the file explorer.
Open terminal here
Why do this? Because it makes it easier to run either formchk or povray in the directory where you have your files.


C. Install gabedit
Got to https://sites.google.com/site/allouchear/Home/gabedit/download and get "The Gabedit installer for Windows (OpenGL)"

Run. It's that easy.

When running gabedit for the first time you may be asked lots of questions. You can probably just accept all the defaults. We'll change some of them below.

D. Install povray
Download http://www.povray.org/redirect/www.povray.org/ftp/pub/povray/Official/povwin-3.7-agpl3-setup.exe and also accept to install the editor dlls at the end of the installation.
Download povray
Once that's done, add povray to path. Go to My Computer, right-click, click on the Advanced tab, select Environment Variables, click on path under System Variables and then Edit. Add
;C:\Program Files\POV-Ray\v3.7\bin

Like So



Let's get going!

1. Optional: Convert chk to fchk using formchk
Didn't work for me, but you can always try (I convert the files under linux)

Either way, you must have the fchk file before going to gabedit




2. Open fchk file in gabedit
You need to do a bit of setting up:

Set path and command for povray






To look at the fchk file:
a) Go to Display
Display Geometry/Orbitals/Density/Vibration


b) unset dipole (because otherwise you'll have an annoying arrow in your figure)
Untick dipole

c) Set desired atom colours.
In particular, I change N from dark blue to light blue so that it doesn't interfere with the orbital colours.
Atom colour

d) Set backgrounds (povray and screen) to white
Povray background

Window background


e) load fchk file
Go to Orbitals/Gaussian fchk


Open your fchk file


f) Set ball/stick parameters
Set Ball and Stick parameters
Apply

g) select level/MO
Note that you get the alpha OR beta orbitals. For a spin restricted system these are the same (apart from signage)

You should edit number of points. 65 is the default. 80 is slow but manageable. 90 is pushing it. Higher = smoother.

Computing...

"Get Isovalue" almost never works properly. Try 0.04-0.06.

Et voilá!
To select a different MO, go back to orbitals and click on Selection.
Selection

h) Edit surfaces
You can change colours and transparency
Transparency is an option

Adjust the transparency/opacity here
i) Export pov
To make a publication-worthy figure, export as pov
Export as Povray
Clicking 'Run' occasionally leads to crash, so it's safer to click on save. Make sure that the background in white.

Edit the command to +A0.01 instead of +A0.3 for less 'pixelated' figure on zooming in. Takes a bit longer to render though. The H/W values depend on your window shape.

Select save, not Run


3. Render povray
You now have a pov file (example.pov). The most straight-forward way to render it is to open the command prompt (terminal) in the same folder and run
pvengine +A0.01 +H604 +W620 example.pov
Rendering

assuming that the H/W values are the ones listed (or multiples of them) when you saved the pov file (it'll be listed in example.bat in the same folder).

And it looks like this:
A basic POV-Ray generated png


You can also run the .bat file associated with the pov file, but note that you'll have to put paths in "":
You need ""s
You can also render in the povray editor (open the povray with the editor):
Povray editor


Render Settings

The issue becomes the default H/W (resolution) values. Override using command line options: +HXXX +WYYY
You may have to associate .pov files with pvengine manually:

Edit -- but you'll be told that there's no program


Select a program to open



pvengine


Always use the selected program

06 February 2016

629. Google drive with rclone on debian jessie

My free dropbox account has 6Gb storage, whereas my google drive has 15Gb. Dropbox pro is way too expensive, so here's what you can do to get your google drive to work ok-ish with linux.

To set up rclone, do:
cd ~/Downloads
wget http://downloads.rclone.org/rclone-current-linux-amd64.zip
unzip rclone-current-linux-amd64.zip
cd rclone-v1.27-linux-amd64
sudo cp rclone /usr/bin/
rclone config
No remotes found - make a new one n) New remote q) Quit config n/q> n name> google_drive What type of source is it? Choose a number from below 1) amazon cloud drive 2) b2 3) drive 4) dropbox 5) google cloud storage 6) swift 7) hubic 8) local 9) onedrive 10) s3 11) yandex type> 3 Google Application Client Id - leave blank normally. client_id> Google Application Client Secret - leave blank normally. client_secret> Remote config Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine or Y didn't work y) Yes n) No y/n> y If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth Log in and authorize rclone for access Waiting for code... Got code -------------------- [google_drive] client_id = client_secret = token = {"access_token":"y**5","token_type":"Bearer","refresh_token":"1/o**T","expiry":"2016-02-06T18:41:22.167889627+11:00"} -------------------- y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y Current remotes: Name Type ==== ==== google_drive drive e) Edit existing remote n) New remote d) Delete remote q) Quit config e/n/d/q> q

Syncing is a bit of an issue as you can't sync based on last changed file. So, my solution is that each device has it's own folder that it syncs up to, and each device syncs down all other folders. For my two devices, nb and be, I have thus set it up like this:

Create new dirs and sync:
mkdir ~/gdrive/nbdrive -p
mkdir ~/gdrive/bedrive

On Nb the crontab looks like this:
*/2 *    * * * rclone sync /home/me/gdrive/nbdrive google_drive:/nbdrive
*/10 *   * * * rclone sync google_drive:/bedrive /home/me/gdrive/bedrive

and on Be it looks like this:
*/10 *    * * * rclone sync google_drive:/nbdrive /home/me/gdrive/nbdrive 
*/2 *   * * * rclone sync /home/me/gdrive/bedrive google_drive:/bedrive 

If I do work on a file on Be I then copy it to bedrive, and edit it. To edit it late on Nb I copy it from bedrive to nbdrive and edit it. Of course I could always sync manually and avoid this, but the above is a solution for people who might not feel comfortable working on the command line or if you want everything automated.

20 January 2016

628. Very briefly: Crystalmaker in debian jessie with wine-staging (1.9)

Update:
 I am seeing consistent crashes with files containing multiple structures (e.g. multi-xyz or multi-cif files). They open fine in a virtualbox instance of crystalmaker.

The terminal shows
fixme:shell:check_flags Unsupported flags: 2414
Before buying crystalmaker, make sure to try it extensively first as there is a free demo version available.

Original post:
This is a brief and somewhat incomplete post.
I recently bought a crystalmaker license, knowing that it had no support under linux. I figured that I'd live with running it in an XP VM. My allergies to all things windows made me very unhappy with that solution, however.

So I tried to install crystalmaker using wine in jessie (1.6.2) and the current (1.50.1) version of Crossover. The installation worked fine for both, but running the software lead to crashes.

I then installed the winehq-staging version (1.9):
sudo apt-get install apt-transport-https
wget https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key

I edited /etc/apt/sources.list
deb https://dl.winehq.org/wine-builds/debian/ jessie main
sudo apt-get update
sudo sudo apt-get install winehq-staging

Same issue.

I then finally actually read the crash message, which mentioned that
wine: Unimplemented function msvcp120.dll.?_Throw_C_error@std@@YAXH@Z called at address 0x7b83a70c (thread 004e), starting debugger...
That lead me to install vcrun2013 using winetricks:
winetricks -q vcrun2013 gdiplus

Crystalmaker now works perfectly (as far as I can see) under wine. Saving graphics as PNG works too. I haven't tried anything else as I'm not familiar with crystalmaker.



[NOTE: by running WINEPREFIX=~/.cxoffice/crystalmaker winetricks vcrun2013 I later got it to work in crossover. I haven't tried wine 1.6.2 again.]

[Note 2: gdiplus is needed to fix messages of the type
fixme:gdiplus:Gdip<...> graphics object has no HDC]

19 January 2016

627. Very briefly: Turn off screen blanking in GNOME/debian jessie

Update:
The only thing that worked for turning off screen-blanking when using youtube or vlc was an ugly little hack:
I installed xdotool and ran crontab -e and added:
*/2 * * * * DISPLAY=:0 XAUTHORITY=/home/andy/.Xauthority xdotool key Ctrl


Original post
In spite of not having any screen saver activate and in spite of setting "Blank Screen" to "Never' under Power options, my screen kept on blanking out after 1-3 minutes of watching TV using mythtv. I tried a lot of things, including using xset, but the only thing that worked in the end was editing my /etc/X11/xorg.conf (I use an nvidia driver) and adding the bits in red:
Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    Screen      2  "Screen2" RightOf "Screen1"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
    Option "BlankTime" "0"
    Option "StandbyTime" "0"
    Option "SuspendTime" "0"
    Option "OffTime" "0"
    Option "DPMS" "0"
EndSection
Now the screen never blanks when watching TV using mythtv. On the other hand, it still blanks when watching DVDs in VLC...

18 January 2016

626. Briefly: Gaussian and cloud computing -- Gaussian G09D with Slurm on aws/ec2

Note: you may want to install awscli and euca2ools. I didn't, so I don't actually know whether they are useful.

My instructions are quite rudimentary since I don't have much time to write these blog posts anymore. Hopefully there's enough information to get you through.


AWS
Either way, sign up for AWS. If you already have an amazon ID I think you can use that. Go to https://aws.amazon.com/

Select Launch an Instance and pick the ubuntu AIM and do Launch and Review. I launched it as a t2.micro instance type, as it is free and it's sufficient for set up but not to run jobs.

Hit launch, and create a new key pair. I called mine myfirstkeypair and saved the pem file in my ~/Downloads folder

In my Downloads folder:
ssh -i "myfirstkeypair.pem" ubuntu@ec2-11-222-33-444.us-west-2.compute.amazonaws.com
I then set a password in the ubuntu AWS image:
sudo passwd ubuntu

I added my id_rsa.pub to ~/.ssh/authorized_keys on the ubuntu AWS image to make logging in via ssh easier -- that way I won't need the pem file.


Set up Gaussian
I then connected with SCP and uploaded my gaussian files -- I went straight for EM64T G09D. It went quite fast at +5 MB/s

scp E6L-103X.tgz ubuntu@ec2-00-111-22-333.us-west-2.compute.amazonaws.com:/home/ubuntu/E6L-103X.tgz

Once that was done, on the ubuntu AWS instance I did:
sudo apt-get install csh 
sudo mkdir /opt/gaussian
cd /opt 
sudo chown ubuntu gaussian -R
cd /opt/gaussian
cp ~/E6L-103X.tgz .
tar xvf E6L-103X.tgz
cd g09
csh bsd/install

echo 'export GAUSS_EXEDIR=/opt/gaussian/g09/bsd:/opt/gaussian/g09/local:/opt/gaussian/g09/extras:/opt/gaussian/g09' >> ~/.bashrc
echo 'export GAUSS_SCRDIR=/home/ubuntu/scratch' >> ~/.bashrc
echo 'export PATH=$PATH:/opt/gaussian/g09' >> ~/.bashrc
source ~/.bashrc 
mkdir ~/scratch ~/jobs

NOTE that you can't run any gaussian jobs under a t2.micro instance. You will have to stop and relaunch as at least a t2.small instance or the jobs will be 'Killed' (that's what is echoed in the terminal when you try to run)
Note that if you terminate an image it will be deleted.

Stop the image and then create a snapshot or an image from it to keep everything you've installed.

Set up Slurm
You'll want a queue manager so that you can launch several jobs in serial. Also, you can set up your script so that it shuts down the image when your job is done to save money.

sudo apt-get update
sudo apt-get install slurm-llnl

ControlMachine=localhost ControlAddr=127.0.0.1 MpiDefault=none ProctrackType=proctrack/pgid ReturnToService=2 SlurmctldPidFile=/var/run/slurm-llnl/slurmctld.pid SlurmdPidFile=/var/run/slurm-llnl/slurmd.pid SlurmdSpoolDir=/var/lib/slurm-llnl/slurmd SlurmUser=slurm StateSaveLocation=/var/lib/slurm-llnl/slurmctld SwitchType=switch/none TaskPlugin=task/none FastSchedule=1 SchedulerType=sched/backfill SelectType=select/linear AccountingStorageType=accounting_storage/none ClusterName=rupert JobAcctGatherType=jobacct_gather/none SlurmctldLogFile=/var/log/slurm-llnl/slurmctld.log SlurmdLogFile=/var/log/slurm-llnl/slurmd.log NodeName=localhost NodeAddr=127.0.0.1 PartitionName=All Nodes=localhost
sudo /usr/sbin/create-munge-key
Edit /etc/default/munge:
OPTIONS=--force
Then run
sudo service slurm-llnl restart
sudo service munge restart 
Test using slurm.batch
#!/bin/bash # #SBATCH -p All #SBATCH --job-name=test #SBATCH --output=res.txt # #SBATCH --ntasks=1 #SBATCH --time=10:00 srun hostname srun sleep 60
and submit with
sbatch slurm.batch
 squeue
             JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
                 2       All     test   ubuntu  R       0:08      1 localhost

Benchmark:
#!/bin/csh #SBATCH -p All #SBATCH --time=9999999 #SBATCH --output=slurm.out #SBATCH --job-name=benchmark setenv GAUSS_SCRDIR /home/ubuntu/scratch setenv GAUSS_EXEDIR /opt/gaussian/g09/bsd:/opt/gaussian/g09/local:/opt/gaussian/g09/extras:/opt/gaussian/g09 /opt/gaussian/g09/g09< benchmark.in > benchmark.out
Using the same opt/freq benchmark as in post 621.

c4.2xlarge 2h 11 min [1h 20 min] 8 vcpu/16 Gb
c4.4xlarge 1h 15 min [     44 min] 16 vcpu/32 Gb
c4.8xlarge      41 min [     25 min] 36 vcpu/60 Gb

It scales surprisingly well, although not perfectly linearly. It's clear that it's cheaper to use a smaller instance, so if time isn't critical or the larger memory isn't needed, c4.8xlarge is not the first choice.

Dropbox:
You might want to use dropbox to transfer files back and forth, especially finished job files (useful if you shut down the machine using a slurm script as shown below)

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
~/.dropbox-dist/dropboxd
This computer isn't linked to any Dropbox account... Please visit https://www.dropbox.com/cli_link_nonce?nonce=0011223344556677889900aabbccddeef to link this device. This computer isn't linked to any Dropbox account...

Open that link in a browser, then go back to the terminal.
 
wget -O - https://www.dropbox.com/download?dl=packages/dropbox.py > dropbox.py
sudo mv dropbox.py /usr/local/bin
sudo chmod +x d/usr/local/bin/dropbox.py
dropbox.py autostart y

Now, since you don't want to use up space unnecessarily (you're paying for it after all), exclude as many directories as possible. To exclude all existing dropbox dirs, do
 
cd ~/Dropbox
dropbox.py exclude add `ld -d */`
dropbox.py exclude add `ld *.*`
dropbox.py exclude list

Note that it can't handle directories with spaces in the name, so you'll need to polish the list by hand. Next create a directory where you want to run and store your jobs,e .g.
mkdir ~/Dropbox/aws_jobs

When you run a gaussian job, make sure to specify where the .chk files should end up, e.g.
%chk=/home/ubuntu/scratch/benchmark.chk
so that you don't use up space/bandwidth for your chk files (unless of course you want to).

Stop after execution:
Use a batch script along these lines:
#!/bin/csh #SBATCH -p All #SBATCH --time=9999999 #SBATCH --output=slurm.out #SBATCH --job-name=benchmark setenv GAUSS_SCRDIR /home/ubuntu/scratch setenv GAUSS_EXEDIR /opt/gaussian/g09/bsd:/opt/gaussian/g09/local:/opt/gaussian/g09/extras:/opt/gaussian/g09 /opt/gaussian/g09/g09< benchmark.in > benchmark.out rm /home/ubuntu/scratch/*.* sudo shutdown -h now

12 November 2015

625. In Progress: Dead node -- no power, unless 8-pin EDS/ATX12V1 unplugged

One of my nodes died last night. It's got a Corsair GS700, AsRock 990FX Extreme 3 mobo and an AMD FX 8150 cpu. The mobo and PSU are 2 years old, whereas the CPU is over three.

In it's full configuration, it refuses to turn on. There's no indication that there's any power. No lights, no fan movements, no beeps.

I checked the PSU, and it's fine.

I then discovered that if I only plug in the 24-pin motherboard PSU connector, but don't attach the 8-pin EDS CPU power, the computer behaves as if there's power i.e. all fans, including on PIC-E VGA card, spin etc.

There's no output though, and no POST beeps.

Plugging in the EDS/ATX12V1 cable again leads to a dead system.

Removing the CPU or RAM still yields a dead system (not sure what a mobo without a CPU is supposed to do i.e. whether it's supposed to POST. Either way, it's dead).

The CMOS battery tests fine with a DMM.  The EDS/ATX12V1 output yields 12 V on all four yellow pins.

The power button is obviously working given that the system 'turns on' when the EDS cable is unplugged.

So it's down to the MOBO or CPU being faulty.

I've ordered a POST card and a CPU socket tester, and will update when I've done further diagnostics.

UPDATE 18/11: I put an old Phenom II in the socket. System still won't light up. This points towards the motherboard being dead. That's not a bad thing as the mobo might still be under warranty.

15 October 2015

624. Gaussian fails with "traps: l502.exe[12449] general protection ip:d75df7 sp:7f7de40dcce0 error:0 in l502.exe[400000+dc8000]" on i7-5820K

Update: 
* The systems is rock solid with nwchem and ADF.  Only G09 crashes
* Gaussian has now released G09E, and the release notes say: "A Sandybridge/Haswell binary distribution is also available". Remains to be found out if this new version solves the issue. I can't check, as I don't have access to that version.

Update 18 Oct 2015:
TL;DR version: G09D (EM64T and AMD64) crash within the first 30 min to 4 hours. An NWChem job has so far run 6 days without crashing and is still going strong.

Original post:
This isn't much of a post yet. I'm mostly posting this so that people searching online will see that they aren't alone.


I just built a new node:
AU$559 Intel BX80648I75820K 6 Core i7-5820K 3.3Ghz 15MB LGA-2011-V3 (No Heatsink)
AU$407 Gigabyte X99-SLI Intel X99 S2011-3 8xDDR4/4xPCI-E/Intel GBLan/ATX Motherboard
AU$50 DeepCool FrostWin v2.0 CPU cooler
AU$155x2 Patriot 16G Kit (8Gx2) DDR4 2133 Desktop RAM
AU$185 Antec HCG-900 High Current Gamer Gaming PSU
AU$39 Gigabyte N210SL-1GI 1GB GT210 PCI-E VGA Card
AU$68 Seagate 3.5" Barracuda 1TB ST1000DM003 SATA3 7200RPM 64MB HDD (carbon)
AU$76 Antec GX500B-W Dominator Window USB3.0 Gaming Case without PSU

I've got an installation of up-to-date Jessie on it, with the following kernel: Debian 3.16.7-ckt11-1+deb8u5 (2015-10-09) x86_64 GNU/Linux.


When running G09D rev. 01 EM64T I keep getting random errors along these lines (these are collected over a couple of days and between restarts):
[100433.566789] traps: l703.exe[11236] general protection ip:df18ca sp:7fc96f595268 error:0 in l703.exe[400000+a46000] [ 2587.899019] traps: l703.exe[3727] general protection ip:9c9757 sp:7fa6fc436ce0 error:0 in l703.exe[400000+a46000] [26439.755347] traps: l502.exe[3235] general protection ip:ab8a55 sp:7ffe29504c10 error:0 in l502.exe[400000+dc8000] [43030.457126] traps: l502.exe[427] general protection ip:11565a7 sp:7f2ec1fff268 error:0 in l502.exe[400000+dc8000] [ 2587.899019] traps: l703.exe[3727] general protection ip:9c9757 sp:7fa6fc436ce0 error:0 in l703.exe[400000+a46000] [37460.207608] traps: l703.exe[14649] general protection ip:a38ae0 sp:7f1a813cf8c0 error:0 in l703.exe[400000+a46000] [ 8865.403861] traps: l502.exe[12449] general protection ip:d75df7 sp:7f7de40dcce0 error:0 in l502.exe[400000+dc8000]


Sometimes the crashes happen after 30 minutes, sometimes after 3 hours. Most happen within four hours. I seem to remember that one ran up to 12 hours, but nothing's gone beyond that. Some short (1h 30 min) calculations have managed to run to completion.

I've checked each RAM stick with memtest+ -- they are fine -- and they are distributed as recommended in the motherboard manual.

The temperature is running below 40 degrees Celsius.

The harddrive is fine according to SMART.

I log everything every two minutes, and so can go back and look at what happened right before the crash, but there's nothing odd.


My current best three hypotheses are:

* There's an issue with G09D EM64T and the new generation of LGA2011-v3 i7 intel cpus specifically

* There's an issue with any version of G09D and the new generation of LGA2011-v3 i7 intel cpus

* There's an issue with my system which is independent of G09D.

To test, I'll be:
* Do runs with G09D rev. 01 AMD64
                         Done -- this also crashed.

* Do runs with NWChem 6.5 (ifort, mkl)
                         Running -- 6 days so far without a crash!

* Update the BIOS (long shot)

* Remove CPU and check for bent pins (long, arduous shot)

I'll be posting updates...

28 August 2015

623. Comparing frequency calculations in G09 and NWChem -- the importance of grid density

The vibrational entropy term will differ between calculations done in gaussian and nwchem unless you use "grid xfine" in nwchem. That the grid density is important is nothing new, but the magnitude of the effect on the entropy surprised me.

The difference can be large -- 30 cal/molK for [PPh4]+ at pbe0/cc-pvdz -- which becomes quite significant when multiplied by T (e.g. 298.15 K).

Note that the rotational entropy term also may differ, but that this would be due to different uses of symmetry in the calculations: http://molecularmodelingbasics.blogspot.com.au/2012/12/conformational-and-rotational-entropy.html

If you turn off symmetry (noautosym) in nwchem the rotational entropy will not be corrected. I've noticed that Gaussian, on the other hand, will sneakily apply correction if it finds an acceptable symmetry even if you request nosymm, so make sure that you scan through the output carefully.

Either way, vibrational entropy is not symmetry dependent. Instead you will have to worry about the grid fine-ness when comparing outputs.

If your molecule is very small, such as benzene or tetramethylphosphonium, it seems that you don't have to worry about this. However, even fairly small molecules such as [PPh4]+ will be affected.

Conv. Dens. = Convergence Density


CodeSymmGridConv. Dens.DFT EnergyZPEHCorrS(tot)S(trans)S(rot)S(vib)
G09NF1E-8-1266.584241520.3705160.389751147.07643.35835.00968.708
G09NU1E-8-1266.584303740.3704640.389691146.82943.35835.00968.461
NWNX1E-8-1266.584552230.3703480.389549146.69743.33934.99468.365
NWNX1E-5-1266.584552220.3703480.389549146.70443.33934.99468.371
NWYF1E-5-1266.584536840.3700340.385683118.02343.33933.61741.067
NWYF1E-8-1266.584536840.3700340.385683118.02343.33933.61741.067
NWNF1E-5-1266.584549280.3700340.385683119.39443.33934.99441.062
NWNF1E-8-1266.584549290.3700340.385683119.39443.33934.99441.061
NWYX1E-5-1266.584552740.3703480.389549145.33143.33933.61768.376
NWYX1E-8-1266.584552750.3703480.389549145.33743.33933.61768.382

F=fine. X=Extrafine. U=Ultrafine.
S(rot) values in blue are symmetry corrected. That's completely normal.

With "grid fine" NWChem gives a very different result to G09.

You can see the difference in the predicted IR spectra as well.

Fine (NWChem) (blue rings) vs G09 (red circles):
"grid xfine" (NWChem) (blue rings) vs G09 (red circles):


21 August 2015

622. Crude comparison of a simple frequency calculation in different computational packages

I've given the input files at the bottom of the post.

The job is a simple benzene frequency calculation at PBE0/def2-tzvp. The jobs were run on an AMD FX 8150 with 32 gb ram (debian jessie 64 bit linux)

Orca 3.0.3 and G09 (AM64L rev D.01) were supplied as precompiled binaries.

Nwchem 6.5 and Gamess US 5 Dec 2014 (R1) were compiled by me, and the poor performance of either code may thus be due solely to something that I've done. Both codes were linked against ACML 5.3.1 and compiled with gfortran.

I'm also not familiar with orca and gamess, and so I don't know how to get the best performance from either code. I defined the basis set explicitly in all codes.

Also note that for other frequency calculations Orca seems orders of magnitude slower than NWChem -- in fact they are so slow that I haven't let them finish after waiting for a week, when in Nwchem they take a day.

Basically, my empirical but poorly-supported-by-data view is that G09 is by far the fastest, then Nwchem, then Orca and finally Gamess. In the case of Gamess this may well be due to how I compiled it.

Nwchem was compiled roughly as was shown here: http://verahill.blogspot.com.au/2014/09/593-nwchem-65-on-debian-jessie-and.html

I'll post the compilation of Gamess US 5/12/2014 R1 later.

Results
Note: Orca used a symmetry number of 3 in the calculation of S(rot). I've 'corrected' it back to the non-symmetry corrected value so that it can be compared with the output from the other codes. Likewise, I've divided the entropy terms from Orca by 298.15 K.

Overall the results agree very well across the codes although the electronic energy in Orca is noticably different from the others.

Code Runtime 'DFT' energy (H) ZPE (H) Hcorr (H) S(tot) (Cal) S(trans) (Cal) S(rot) (Cal) S(vib) (Cal)
G09 12 min -232.04511372 0.100682 0.106028 69.033 38.979 25.625 4.428
Orca 17 min -232.04530127 0.100605 0.105960 69.062 38.974 25.628 4.461
Nwchem 41 min -232.04516624 0.100836 0.106162 68.950 38.962 25.614 4.375
Gamess 76 min -232.04517728 0.100701 0.10604 69.011 38.979 25.625 4.407

G09 input:
%nprocshared=8
%Mem=3500000000
%Chk=benzene_freq.chk
#P rPBE1PBE/GEN 5D 7F Freq=() NoSymm Integral(UltraFine )  Punch=(MO) Pop=() 

benzene freq

0 1 ! charge and multiplicity
 C     1.20188     0.693923     0.00000
 C     9.00000e-06     1.38776     0.00000
 C     -1.20188     0.693842     0.00000
 C     -1.20188     -0.693933     0.00000
 C     -1.60000e-05     -1.38777     0.00000
 C     1.20188     -0.693829     0.00000
 H     2.14078     1.23611     0.00000
 H     5.10000e-05     2.47197     0.00000
 H     -2.14085     1.23591     0.00000
 H     -2.14082     -1.23604     0.00000
 H     -2.60000e-05     -2.47197     0.00000
 H     2.14082     -1.23594     0.00000

 C  0
 S   6  1.00
   13575.34968200      0.00022246
    2035.23336800      0.00172327
     463.22562359      0.00892557
     131.20019598      0.03572798
      42.85301589      0.11076260
      15.58418577      0.24295628
 S   2  1.00
       6.20671385      0.41440263
       2.57648965      0.23744969
 S   1  1.00
       0.57696339      1.00000000
 S   1  1.00
       0.22972831      1.00000000
 S   1  1.00
       0.09516444      1.00000000
 P   4  1.00
      34.69723224      0.00533337
       7.95826228      0.03586411
       2.37808269      0.14215873
       0.81433208      0.34270472
 P   1  1.00
       0.28887547      1.00000000
 P   1  1.00
       0.10056824      1.00000000
 D   1  1.00
       1.09700000      1.00000000
 D   1  1.00
       0.31800000      1.00000000
 F   1  1.00
       0.76100000      1.00000000
 ****
 H  0
 S   3  1.00
      34.06134100      0.00602520
       5.12357460      0.04502109
       1.16466260      0.20189726
 S   1  1.00
       0.32723041      1.00000000
 S   1  1.00
       0.10307241      1.00000000
 P   1  1.00
       0.80000000      1.00000000
 ****



Orca input
%pal nprocs 8 end
! DFT pbe0 def2-tzvp printbasis
! freq
%basis
newgto H
S   3
  1     34.0613410              0.60251978E-02   
  2      5.1235746              0.45021094E-01   
  3      1.1646626              0.20189726       
S   1
  1      0.32723041             1.0000000        
S   1
  1      0.10307241             1.0000000        
P   1
  1      0.8000000              1.0000000        
end
newgto C
S   6
  1  13575.3496820              0.22245814352E-03      
  2   2035.2333680              0.17232738252E-02      
  3    463.22562359             0.89255715314E-02      
  4    131.20019598             0.35727984502E-01      
  5     42.853015891            0.11076259931    
  6     15.584185766            0.24295627626    
S   2
  1      6.2067138508           0.41440263448    
  2      2.5764896527           0.23744968655    
S   1
  1      0.57696339419          1.0000000        
S   1
  1      0.22972831358          1.0000000        
S   1
  1      0.95164440028E-01            1.0000000        
P   4
  1     34.697232244            0.53333657805E-02      
  2      7.9582622826           0.35864109092E-01      
  3      2.3780826883           0.14215873329    
  4      0.81433208183          0.34270471845    
P   1
  1      0.28887547253          1.0000000        
P   1
  1      0.10056823671          1.0000000        
D   1
  1      1.09700000             1.0000000        
D   1
  1      0.31800000             1.0000000        
F   1
  1      0.76100000             1.0000000      
end
end
* xyz 0 1
C             0.03998          -1.38721           0.00000
C             1.22135          -0.65898           0.00000
C             1.18137           0.72823           0.00000
C            -0.03998           1.38721           0.00000
C            -1.22135           0.65898           0.00000
C            -1.18137          -0.72823           0.00000
H             0.07121          -2.47097           0.00000
H             2.17552          -1.17381           0.00000
H             2.10431           1.29715           0.00000
H            -0.07121           2.47097           0.00000
H            -2.17552           1.17381           0.00000
H            -2.10431          -1.29715           0.00000
*

nwchem input
cratch_dir /home/me/scratch
Title "benzene freq"

Start  freq

echo

charge 0

geometry noautosym units angstrom
 C     1.20188     0.693923     0.00000
 C     9.00000e-06     1.38776     0.00000
 C     -1.20188     0.693842     0.00000
 C     -1.20188     -0.693933     0.00000
 C     -1.60000e-05     -1.38777     0.00000
 C     1.20188     -0.693829     0.00000
 H     2.14078     1.23611     0.00000
 H     5.10000e-05     2.47197     0.00000
 H     -2.14085     1.23591     0.00000
 H     -2.14082     -1.23604     0.00000
 H     -2.60000e-05     -2.47197     0.00000
 H     2.14082     -1.23594     0.00000
end

basis "ao basis" spherical print
H    S
    34.061341000000     0.006025197800
     5.123574600000     0.045021094000
     1.164662600000     0.201897260000
H    S
     0.327230410000     1.000000000000
H    S
     0.103072410000     1.000000000000
H    P
     0.800000000000     1.000000000000
C    S
 13575.349682000000     0.000222458144
  2035.233368000000     0.001723273825
   463.225623590000     0.008925571531
   131.200195980000     0.035727984502
    42.853015891000     0.110762599310
    15.584185766000     0.242956276260
C    S
     6.206713850800     0.414402634480
     2.576489652700     0.237449686550
C    S
     0.576963394190     1.000000000000
C    S
     0.229728313580     1.000000000000
C    S
     0.095164440028     1.000000000000
C    P
    34.697232244000     0.005333365781
     7.958262282600     0.035864109092
     2.378082688300     0.142158733290
     0.814332081830     0.342704718450
C    P
     0.288875472530     1.000000000000
C    P
     0.100568236710     1.000000000000
C    D
     1.097000000000     1.000000000000
C    D
     0.318000000000     1.000000000000
C    F
     0.761000000000     1.000000000000
END

dft
  mult 1
  direct
  XC pbe0
  grid xfine
  convergence density 1e-08
  mulliken
end

task dft energy
task dft freq

gamess US input:
 $SYSTEM MWORDS=3500 $END
 $CONTRL RUNTYP=Hessian $END
 $CONTRL SCFTYP=RHF $END
 $DFT  DFTTYP=PBE0 $END
 $CONTRL ICHARG=0  MULT=1 $END
 $CONTRL ISPHER=1 $END
 $SCF DIRSCF=.TRUE. $END
 $BASIS EXTFIL=.TRUE. GBASIS=DEF2TZVP $END
 $DATA
 Benzene
 C1
 C  6.000000 0.039980 -1.387210 0.000000
 C  6.000000 1.221350 -0.658980 0.000000
 C  6.000000 1.181370 0.728230 0.000000
 C  6.000000 -0.039980 1.387210 0.000000
 C  6.000000 -1.221350 0.658980 0.000000
 C  6.000000 -1.181370 -0.728230 0.000000
 H  1.000000 0.071210 -2.470970 0.000000
 H  1.000000 2.175520 -1.173810 0.000000
 H  1.000000 2.104310 1.297150 0.000000
 H  1.000000 -0.071210 2.470970 0.000000
 H  1.000000 -2.175520 1.173810 0.000000
 H  1.000000 -2.104310 -1.297150 0.000000
 $END