Showing posts with label ecce 7.0. Show all posts
Showing posts with label ecce 7.0. Show all posts

05 June 2015

611. Building ecce on debian jessie

NOTE:
* I've confirmed that ECCE built like this installs and works perfectly on a Thinkpad SL410 with intel graphics

* It also compiles and runs perfectly on a home built desktop with external nvidia card (GF119) using the binary non-free nvidia drivers

* It also compiles and runs perfectly on a home built desktop with onboard nvidia (GeForce 7025/nForce 630a) using the nouveau drivers. I had issues on this desktop before, but reinstalled debian jessie from scratch. Before that I used nvidia-legacy drivers, which may or may not  (probably not) have had something to do with it not working.

* UPDATE: instead of putting
#include <freetype.h>
the recommended method is to use
#include FT_FREETYPE_H
I've updated the patch_script.sh below accordingly. Same goes for ftoutln.h vs FT_OUTLINE_H, but the latter didn't work (error saying #include must use "" or <>)

* UPDATE: If you're having issues with undetected -lGL and -lGLU in the wxwidgets step, it's because
667       endif
668       cat configure.orig | sed -e 's%^SEARCH_INCLUDE="\\%SEARCH_INCLUDE="$ECCE_HOME/${ECCE_SYSDIR}3rdparty/mesa/include \\%' >! configure
669       chmod a+x configure
670 

needs to be changed to
667       endif
668       cat configure.orig | sed -e 's%^SEARCH_INCLUDE="\\%SEARCH_INCLUDE="$ECCE_HOME/${ECCE_SYSDIR}3rdparty/mesa/include $ECCE_HOME/${ECCE_SYSDIR}3rdparty/mesa/lib \\%' >! configure
669       chmod a+x configure
670 
I had this issue on a debian wheezy system with the vendor nvidia libraries.
I wouldn't have spotted this bug otherwise.

* Another error from my debian wheezy nvidia system: if you get
checking how to run the C preprocessor... x86_64-linux-gnu-gcc -E ./configure: line 2880: syntax error near unexpected token `Using' ./configure: line 2880: `  AC_MSG_NOTICE(Using external PCRE library from $PCRE_CONFIG)'
then make sure you're not using autoconf2.13, which is an obsolete version. I think I have it due to my system originally being installed back in 2010.

* Finally, I'm currently  working on fixing minor things that have been nagging me in ecce. One is the basis set quicklist (in src/dsm/edsiimpl/ICalcUtils.C), but obviously that's a personal preference. A more serious one is the 256 character limit for csh commands:
Exceeds maximum C shell command length of 256 characters
Note that this isn't the C shell complaining -- this is a built-in limit in ecce (in src/comm/rcommand/RCommand.C). I've changed that limit to 16384 characters (the real limit is much, much higher)
I've also added two basis sets to ECCE, and have tinkered with the exchange-correlation functionals.

I'll try to push the fixes back upstreams when I'm ready if they'll accept them; otherwise I'll create my own github/sourceforge repo.

THE POST:
Building ECCE on debian wheezy was a breeze. Building ECCE on debian jessie was painful.

In the end it boiled down to two things:
*freetype headers are no longer in freetype2/freetype/ but in freetype2/

*-Wformat-security is turned on by default

mkdir ~/tmp/ecce_compile -p
cd ~/tmp/ecce_compile
sudo apt-get install bzip2 build-essential autoconf libtool ant pkg-config
sudo apt-get install gtk+-2.0-dev libxt-dev csh gfortran openjdk-7-jdk python-dev
sudo apt-get install libjpeg-dev imagemagick xterm libfreetype6-dev libfl-dev libtool-bin

As usual I'm not 100% sure when it comes to the necessary packages. libfl-dev might not be needed.

Download the ECCE source code and put the ecce-v7.0-src.tar.bz2 file in ~/tmp/ecce_compile. Put the patch_script.sh file (see below in this post for the code) in ~/tmp/ecce_compile. Then do
 
tar xvf ecce-v7.0-src.tar.bz2 
cd ecce-v7.0/
export ECCE_HOME=`pwd`
cd build/
./build_ecce

You'll now step through a list over programs and libraries that are needed and what ECCE can find. If you're having issues with e.g. javac and java being different versions, use sudo update-alternative --config javac.

At the end you'll be asked whether to skip these checks next time -- answer y(es).

Next do
./build_ecce|tee xerxes.log && ./build_ecce |tee mesa.log && ./build_ecce |tee wxwidgets.log
sh ../../patch_script.sh && ./build_ecce|tee wxpython.log 
./build_ecce|tee httpd.log && ./build_ecce|tee ecce.log

If all went well you've managed to build the ecce binaries. If not, go through wxpython.log and check for errors relating to format-security statements. Then go through ecce.log and look for issues with freetype.

What to do with the binaries? Follow one of the many ECCE installation posts on this blog, e.g. http://verahill.blogspot.com.au/2013/08/487-version-70-of-ecce-out-now.html

NOTE that if you get ''Invalid null command." trying to execute install_ecce.v7.0.csh, install tcsh and do
tcsh install_ecce.v7.0.csh

The patch_script.sh file -- when copying, make sure to check that the lines end where they are supposed to and not broken up.
#!/bin/bash cp ${ECCE_HOME}/build/3rdparty-dists/wxPython-src-2.8.12.1.tar.bz2 ${ECCE_HOME}/3rdparty/build/ cd ${ECCE_HOME}/3rdparty/build/ tar xvf wxPython-src-2.8.12.1.tar.bz2 rm wxPython-src-2.8.12.1.tar.bz2 cd ${ECCE_HOME}/3rdparty/build/wxPython-src-2.8.12.1/wxPython grep -rsl "PyErr_Format(PyExc_RuntimeError, mesg)" *|xargs -I {} sed -i 's/PyErr_Format(PyExc_RuntimeError, mesg)/PyErr_Format(PyExc_RuntimeError, "%s", mesg)/g' {} cd ${ECCE_HOME}/3rdparty/build/wxPython-src-2.8.12.1/wxPython/src/gtk/ sed -i 's/wxLogFatalError(m)/wxLogFatalError("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogError(m)/wxLogError("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogWarning(m)/wxLogWarning("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogMessage(m)/wxLogMessage("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogInfo(m)/wxLogInfo("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogDebug(m)/wxLogDebug("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogVerbose(m)/wxLogVerbose("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogStatus(pFrame, m)/wxLogStatus(pFrame, "%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogStatus(m)/wxLogStatus("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogSysError(m)/wxLogSysError("%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogGeneric(level, m)/wxLogGeneric(level, "%s", m.c_str())/g' _misc_wrap.cpp sed -i 's/wxLogTrace(mask, m)/wxLogTrace(mask, "%s", m.c_str())/g' _misc_wrap.cpp cd ${ECCE_HOME}/src grep -srl "<freetype/freetype.h>" |xargs -I {} sed -i 's,<freetype/freetype.h>,FT_FREETYPE_H,g' {} grep -srl "freetype/" |xargs -I {} sed -i 's,freetype/,,g' {} cd ${ECCE_HOME}/build


What I found during troubleshooting:

In files such as:
./3rdparty/build/wxPython-src-2.8.12.1/wxPython/src/gtk/_core_wrap.cpp
./3rdparty/build/wxPython-src-2.8.12.1/wxPython/src/gtk/_gdi_wrap.cpp
./3rdparty/build/wxPython-src-2.8.12.1/wxPython/src/gtk/_windows_wrap.cpp
./3rdparty/build/wxPython-src-2.8.12.1/wxPython/src/gtk/_controls_wrap.cpp
there are sections which look like this:
863 } else { 864 PyErr_Format(PyExc_RuntimeError, mesg); 865 }
Compiling with -Wformat-security means that you'll have to patch all those expression to
863 } else { 864 PyErr_Format(PyExc_RuntimeError, "%s", mesg); 865 }
There were similar issue with wxLog*(m) statements in other files, e.g.
3rdparty/build/wxPython-src-2.8.12.1/wxPython/src/gtk/_misc_wrap.cpp -> ("%s", m.c_str()) 3093 m.Replace(wxT("%"), wxT("%%")); 3094 wxLogFatalError(m); 3095 } .. 3177 m.Replace(wxT("%"), wxT("%%")); 3178 wxLogTrace(mask, m); 3179 }

18 December 2013

537. Building ECCE 7.0 on CentOS 6.4

Following a report that there were issues building ECCE 7 on Centos 6.4 I decided to investigate.

1. Download 
Download the centos 6.4 iso: At ftp://mirror.stanford.edu/pub/mirrors/centos/6.4/isos/x86_64/ I downloaded ftp://mirror.stanford.edu/pub/mirrors/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso

wget ftp://mirror.stanford.edu/pub/mirrors/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso

2. Install centos in virtualbox
Not much to say other than that I gave the VM 12 gb disk and 1024 mb ram.
During installation I selected Install or Upgrade an existing system (option 1).  I went with all the defaults during installation.

3. Basic setup
Following the installation I rebooted.

First I activated eth by editing /etc/sysconfig/network-scripts/ifcfg-eth0 and changing onboot from no to yes. I rebooted and installed Gnome

Then install X and gnome.
yum groupinstall -y 'X Window System'
yum groupinstall -y 'Desktop'
useradd verahill
passwd verahill

Edit /etc/inittab and change
id:3:initdefault:
to
id:5:initdefault:

Reboot.

Install openGL libraries. The way to do that depends on what graphics chip your have, e.g. libgl1-nvidia-glx for nvidia. In my virtualbox example I didn't have to do anything.  

4. ECCE
Launch gnome-terminal
Become root and install packages, then exit:
su
yum install vim csh gcc gcc-c++ gcc-gfortran java-1.7.0-openjdk-devel python-devel ant gtk2-devel libjpeg-turbo-devel libtool ImageMagick libXt-devel xterm mesa-libGLU-devel kernel-devel perl-Digest-Perl-MD5 perl-Digest-MD5
yum install 
exit
mkdir ~/tmp
cd ~/tmp
Download ecce from http://ecce.pnl.gov/using/download.shtml into ~/tmp
tar xvf ecce-v7.0-src.tar.bz2
cd ecce-v7.0/
export ECCE_HOME=`pwd`
cd build/
./build_ecce
./build_ecce
./build_ecce
./build_ecce
./build_ecce
./build_ecce
./build_ecce

Everything builds just fine.

You can then install the ecce_install.v7.0.csh file created in the parent directory by following e.g. this post: http://verahill.blogspot.com.au/2013/08/487-version-70-of-ecce-out-now.html

03 December 2013

533. Adding a new Exchange/Correlation functional to ECCE. M06 for G03 (G09)

Nothing fancy here. I'd just like to be able to select the M06 functional, which is available in G09, using the ECCE interface.

At some point in the future I might set up separate files for G09, but for now I run G09 using the G03 files in ECCE.

See here and here for how to add basis sets to ECCE.

You'll need to edit 2-3 files. I did this in ECCE v7.0.

Edit apps/scripts/codereg/ged03theory.py
185 xcFuncChoice = ["None", 186 "M06 (hybrid)", 187 "SVWN 5 (local)", 188 "SVWN 1/RPA (local)", 189 "BLYP (nonlocal)",
Edit apps/scripts/parsers/ai.gauss03
635 if ($xcFun eq "SVWN 1/RPA (local)") {# convert our terminology to Gaussian's 636 $result = "SVWN"; 637 } elsif ($xcFun eq "SVWN 5 (local)") { 638 $result = "SVWN5"; 639 } elsif ($xcFun eq "M06 (hybrid)") { 640 $result = "M06"; 641 } elsif ($xcFun eq "BLYP (nonlocal)") {

Editing apps/scripts/parsers/Gaussian-03.expt isn't necessary to get this to work, but I did it anyway. Not sure if it 'does' anything:
557 if ($method =~ /b.*3lyp/ || 558 $method =~ /m06/ || 559 $method =~ /bhandh/ || 560 $method =~ /vscx/ || 561 $method =~ /hcth407/ || 562 $method =~ /hcth147/ ||

You should now be able to select M06 in the Theory Details dialogue:


07 August 2013

491. Compiling ECCE v7.0 (on debian)

See here for more information about what's new:
http://ecce.pnl.gov/using/releasenotes.shtml

Building ECCE 7.0 is done in the same way as previous versions:
http://verahill.blogspot.com.au/2013/01/325-compiling-ecce-64-on-debian-testing.html

While ECCE is distributed as binaries as well, only a 32 bit version is available. To run on 32 bit linux you need to compile your own copy.

See here for Fedora 18 and here for Scientific Linux 6.3. Note that you no longer need to fix the GetOpts issue -- that's already fixed in the new version.

To add new basis sets, read scripts/gbs.README in the ecce source directory, or in apps/scripts/gbs.REAME in the installation directory.

Anyway, building on debian wheezy is simple:
First go to http://ecce.pnl.gov/using/download.shtml and give
sudo apt-get install bzip2 build-essential autoconf libtool ant pkg-config gtk+-2.0-dev libxt-dev csh gfortran openjdk-6-jdk python-dev libjpeg-dev imagemagick xterm
mkdir ~/tmp
cd ~/tmp
tar xvf ecce-v7.0-src.tar.bz2
cd ecce-v7.0/
export ECCE_HOME=`pwd`
cd build/
./build_ecce
Checking prerequisites for building ECCE... If any of the following tools aren't found or aren't the right version, hit -c at the prompt and either find or install the tool before re-running this script. The whereis command is useful for finding tools not in your path. Found gcc in: /usr/bin/gcc ECCE requires gcc 3.2.x or 4.x.x This version: gcc (Debian 4.7.2-5) 4.7.2 [..]. Found java in: /usr/bin/java ECCE requires java 1.5.x or 1.6.x This version: java version "1.7.0_25" Hit return if this java is OK... Found javac in: /usr/bin/javac ECCE requires javac to be the same version as java above This version: javac 1.7.0_25 [..] Found xterm in: /usr/bin/xterm Hit return if xterm was found... The /home/verahill/tmp/ecce/ecce-v7.0/scripts/sysdir script identifies the build platform directory as: Because this value is no platform-specific parent directory will be created for ECCE executables, libraries, etc. This works fine unless your site needs support for multiple platforms. Finished checking prerequisites for building ECCE. Do you want to skip these checks for future build_ecce invocations (y/n)? Y

If you're having issues with e.g. mismatching java and javac versions, use e.g.
sudo update-alternatives --config javac 
to correct it.

If you hit Y at the last question, when you re-run ./build_ecce you'll then start building:
./build_ecce
Xerces built
./build_ecce
Mesa OpenGL built
./build_ecce
wxWidgets built
./build_ecce
running build_ext wxPython built
./build_ecce
Apache HTTP server built
./build_ecce
Copying JMS server distribution jms_server.tar.bz2 Making server tar file ecce_server.tar Copying WebHelp tar file eccewebhelp.tar.bz2 Making combined tar file ecce.v7.0.tar Copying NWChem distribution Concatenating install script and combined tar file ecce.v7.0.tar create_ecce_bin finished ECCE built and distribution created in /home/verahill/tmp/ecce-v7.0
You can now install ~/tmp/ecce-v7.0/install_ecce.v7.0.csh as shown in this post: http://verahill.blogspot.com.au/2013/08/487-version-70-of-ecce-out-now.html

02 August 2013

487. Version 7.0 of ECCE out now

What's new:
1. There's a whole new type of calculation added, called 'Condensed Phase Reaction Study':

The previous reaction module has been renamed 'Gas Phase Reaction Study'. The real difference between the two types is that the Condensed Phase module uses the plan wave module in NWChem and thus uses explicit solvation, while the Gas Phase reaction module uses DFT/MP2. The latter can obviously use implicit solvation if requested.

2. The Def2-series of basis sets (Weigen and Alrichs, Phys. Chem. Chem. Phys, 2005, 7, 3297-3305) have been added to ECCE, and tools for adding basis sets on your own are now distributed with the ECCE sources. One of them is based on http://sourceforge.net/projects/nwbas2ecce/ , the scripts of which have been renamed gbsNWChemConverter and gsbDescriber. To add new basis sets, look at scripts/gbs.README in the ecce source directory, or in apps/scripts/gbs.REAME in the installation directory.

3. The precision of basis sets explicitly defined using coefficients and exponents has been greatly increased. Before, the energies obtained using the implicit nwchem basis sets and those obtained by defining the basis set through exponents and coefficients in the input could differ by 0.1 milli-Hartree in extreme cases. That should no longer be the case.

4. The COSMO parameter Rsolv can now be set in the Theory dialogue.

5. Other
There are other, non-obvious changes under the hood, such as an updated (2.2.25) apache httpd. The realease notes detail most of these.

Note that ECCE only runs on linux, and uses python 2.7. I haven't had much luck compiling it on Arch (due to python 3 seemingly being the default in Arch), but it runs fine on Debian Squeeze, Wheezy and Jessie, Fedora 18 and Scientific Linux 6.4 and Ubuntu something-or-other.


To install the binaries:

Note that there are only 64 bit binaries available. If you want to use ECCE on a 32 bit OS, you can, but you will have to compile the sources yourself. Luckily, this is very easy. Until I make a separate post, see here: http://verahill.blogspot.com.au/2013/01/325-compiling-ecce-64-on-debian-testing.html

To get the binaries (or sources) go to http://ecce.pnl.gov/using/download.shtml

Give your email and name so that the PNNL can track the number of users, as these things often impact on funding for different projects.

On the next page, select the version to download. Most likely you want the full binaries: install_ecce.v7.0.rhel5-gcc4.1.2-m64.csh

Download that file to e.g. ~/Downloads, and fire up your terminal -- in my case I'm doing an upgrade from a pre-release version of ECCE 7.0:
sudo apt-get install csh openjdk-7-jre
csh install_ecce.v7.0.rhel5-gcc4.1.2-m64.csh
Extracting ECCE distribution from install_ecce.v7.0.rhel5-gcc4.1.2-m64.csh... Main ECCE installation menu =========================== 1) Help on main menu options 2) Prerequisite software check 3) Full install 4) Full upgrade 5) Application software install 6) Application software upgrade 7) Server install 8) Server upgrade IMPORTANT: If you are uncertain about any aspect of installing or running ECCE at your site, please refer to the detailed ECCE Installation and Administration Guide at http://ecce.pnl.gov/docs/installation/2864B-Installation.pdf Hit at prompts to accept the default value in brackets. Selection: [1] Host name: [beryllium] New application installation directory: [/home/verahill/tmp/ecce/7.0-rc_final/ecce-v7.0/apps] Existing application directory to upgrade: New server installation directory: [/home/verahill/.ecce/e-v7.0b/server] Existing server directory to upgrade: Backup existing server user data (yes/no)? [yes] Yes ECCE v7.0 will be installed using the settings: Installation type: [full upgrade] Host name: [beryllium] Application installation directory: [/home/verahill/.ecce/ecce-v7.0b/apps] Application directory to upgrade: [/home/verahill/.ecce/ecce-v7.0/apps] Server installation directory: [/home/verahill/.ecce/ecce-v7.0b/server] Server directory to upgrade: [/home/verahill/.ecce/ecce-v7.0/server] Backup existing server user data: [yes] Are these choices correct (yes/no/quit)? [yes] Installing ECCE application software in /home/verahill/.ecce/ecce-v7.0b/apps... Extracting application distribution... Extracting NWChem distribution... Extracting client WebHelp distribution... Configuring application software... Configuring NWChem... Installing ECCE server in /home/verahill/.ecce/e-v7.0b/server... Extracting data server in /home/verahill/.ecce/e-v7.0b/server/httpd... Extracting data libraries in /home/verahill/.ecce/e-v7.0b/server/data... Extracting Java Messaging Server in /home/verahill/.ecce/e-v7.0b/server/activemq... Configuring ECCE server... Copying user data from server to be upgraded... Copying share data from server to be upgraded... ECCE installation succeeded. *************************************************************** !! You MUST perform the following steps in order to use ECCE !! -- Unless only the user 'verahill' will be running ECCE, start the ECCE server as 'verahill' with: /home/verahill/.ecce/e-v7.0b/server/ecce-admin/start_ecce_server -- To register machines to run computational codes, please see the installation and compute resource registration manuals at http://ecce.pnl.gov/using/installguide.shtml -- Before running ECCE each user must source an environment setup script. For csh/tcsh users add this to ~/.cshrc: if ( -e /home/verahill/.ecce/e-v7.0b/apps/scripts/runtime_setup ) then source /home/verahill/.ecce/e-v7.0b/apps/scripts/runtime_setup endif For sh/bash users, add this to ~/.profile or ~/.bashrc: if [ -e /home/verahill/.ecce/e-v7.0b/apps/scripts/runtime_setup.sh ]; then . /home/verahill/.ecce/e-v7.0b/apps/scripts/runtime_setup.sh fi ***************************************************************

Edit your ~/.bashrc and add the following lines (edited for your system):
export ECCE_HOME=/home/verahill/.ecce/ecce-v7.0b/apps alias stopecce='/home/verahill/.ecce/ecce-v7.0b/server/ecce-admin/stop_ecce_server' alias startecce='/home/verahill/.ecce/ecce-v7.0b/server/ecce-admin/start_ecce_server'
You can then start ecce by typing...ecce.