Skip to content
Lori A. Burns edited this page Jun 4, 2015 · 5 revisions

Installation Instructions for PSI4

  1. List of Specific Configuration Options

    The example configuration options in the previous subsection are usually sufficient. However, if not, you may need to make use of one or more of the following options to the configure script:

    • --prefix=directory --- Use this option if you wish to install the PSI4 package somewhere other than the default directory, /usr/local/psi.

    • --with-cxx=compiler --- Use this option to specify a C++ compiler. One should use compilers that generate reentrant code, if possible. The default search order for compilers is: xlC_r (AIX only), g++, c++, icpc, cxx.

    • --with-fc=compiler --- Use this option to specify a Fortran-77 compiler, which is used to determine linking coventions for BLAS and LAPACK libraries and to provide system routines for those libraries. Note that no fortran compiler is necessary on Mac OS X systems (see below). The default search order for compilers is: xlf_r (AIX only), gfortran, g77, ifort, f77, f2c.

    • --with-f77symbol=value --- This option allows manual assignment of the FORTRAN77 symbol convention, which is necessary for C programs to link Fortran-interface libraries such as BLAS and LAPACK. This option should only be used by experts and even then should almost never be necessary. Allowed values are:

      • lc : lower-case
      • lcu : lower-case with underscore (default)
      • uc : upper-case
      • ucu : upper-case with underscore
    • --with-ld=linker --- Use this option to specify a linker. The default is 'ld'.

    • --with-ar=archiver --- Use this option to specify an archiver. The default is to look for 'ar' automatically.

    • --with-ar-flags=flags --- Use this option to specify additional archiver flags. The default is 'r'.

    • --with-incdirs=directories --- Use this option to specify extra directories where to look for header files. Directories should be specified prepended by -I, i.e. -Idir1 -Idir2, etc. If several directories are specified, enclose the list with single right-quotes, e.g.,

      --with-incdirs='-I/usr/local/include -I/home/psi4/include'
      
    • --with-libs=libraries --- Use this option to specify extra libraries which should be used during linking. Libraries should be specified by their full names or in the usual -l notation, e.g. -lm /usr/lib/libm.a. If several libraries are specified, enclose the list with single right-quotes, e.g.,

      --with-libs='-libm -lgcc_s'
      
    • --with-libdirs=directories --- Use this option to specify extra directories where to look for libraries. Directories should be specified prepended by -L, e.g., -Ldir1 -Ldir2. If several directories are specified, enclose the list with single right-quotes, e.g.,

      --with-libdirs='-L/usr/local/lib -I/home/psi4/lib'
      
    • --with-blas=library --- Use this option to specify a BLAS library. (Many BLAS libraries can be detected automatically.) If your BLAS library has multiple components, enclose the file list with single right-quotes, e.g.,

      --with-blas='-lf77blas -latlas'
      
    • --with-lapack=library --- Use this option to specify a LAPACK library. (Many LAPACK libraries can be detected automatically.) If your LAPACK library has multiple components, enclose the file list with single right-quotes, e.g.,

      --with-lapack='-llapack -lcblas -latlas'
      
    • --with-max-am-eri=integer --- Specifies the maximum angular momentum level for the primitive Gaussian basis functions when computing electron repulsion integrals. This is set to h-type functions (AM=5) by default.

    • --with-max-am-deriv1=integer --- Specifies the maximum angular momentum level for first derivatives of the primitive Gaussian basis functions. This is set to g-type functions (AM=4) by default.

    • --with-max-am-deriv2=integer --- Specifies the maximum angular momentum level for second derivatives of the primitive Gaussian basis functions. This is set to f-type functions (AM=3) by default.

    • --with-debug=yes/no --- Turns on debugging flags (-g) if yes. This is set to no by default.

    • --with-opt=yes/no --- Turns off compiler optimizations (-OX) if no. This is set to yes by default.

    • --with-strict=yes --- Turns on strict compiler warnings.

  2. Python interpreter

    Usually Python will be detected automatically. If this fails, or if you have multiple versions installed and want to specify a particular one, set the PYTHON environmental variable to the full path name of the Python interpreter you want to use. This defaults to the python in your path. For example, if you want to use python2.6 located in /usr/bin set the environmental variable to be:

    PYTHON=/usr/bin/python2.6
    

    Note

    If the variable PYTHON is set, the config program must be present with a similar name. For instance, in the above example the following must exist:

    /usr/bin/python2.6-config
    

    You either set the environmental variable before you call configure, or tell configure about it:

    ../configure PYTHON=/usr/bin/python2.6
    
  • Step 2: Compilation

    Running make (which must be GNU's 'make' utility) in $objdir will compile the PSI4 libraries and executable modules.

    Warning

    The libint integrals library creates rather large files (multiple GB) during compilation, especially if higher angular momentum functions are enabled. These are normally written to directory /tmp, which on some systems may be too small. Alternatively, the user can specify a location for these files by setting the environmental variable $PSI_SCRATCH (if this is not set, $SCRATCH will also be checked). See User Configuration below about $PSI_SCRATCH. These files should be written to a local disk (not a network-mounted NFS share) if possible, otherwise the compilation may be very slow.

  • Step 3: Testing

    To execute automatically the ever-growing number of test cases after compilation, simply execute make tests in the $objdir directory. This will run each (relatively small) test case and report the results. Failure of any of the test cases should be reported to the developers. By default, any such failure will stop the testing process. If you desire to run the entire testing suit without interruption, execute make tests TESTFLAGS='-u -q'. Note that you must do a make testsclean in $objdir to run the test suite again.

  • Step 4: Installation

    Once testing is complete, installation into $prefix is accomplished by running make install in $objdir. Executable modules are installed in $prefix/bin, include files in $prefix/include, libraries in $prefix/lib, and basis set data and various control structures in $prefix/share.

  • Step 5: Building Documentation

    This is not recommended because all of the documentation should be available at http://sirius.chem.vt.edu/psi4manual/latest/index.html (link "docs" off http://www.psicode.org), and it is automatically updated. However, if your system has the appropriate utilities (notably the sphinx package and LaTeX), you may build the package documentation from the top-level $objdir by running make doc. The resulting files will appear in the $prefix/doc area.

  • Step 6: Cleaning

    All object files and libraries can be removed to save disk space by running make clean in $objdir.

  • Step 7: User Configuration

    After the PSI4 package has been successfully installed, the user will need to add the installation directory into his/her path. If the package has been installed in the default location /usr/local/psi, then in C shell, the user should add something like the following to their .cshrc file:

    setenv PSI /usr/local/psi
    set path = ($path $PSI/bin)
    

    Next, the user needs to tell the PSI4 I/O manager how to handle scratch files. Identify the path to a fast scratch disk for which the user has write access. If the local /tmp volume is large enough, it might be used. However, a dedicated scratch volume (using RAID0 striping for speed) is recommended.

    Warning

    Scratch should NOT be a NFS-mounted volume, as writes to a remote disk over the network can be very slow and can tie up the network and negatively impact other users.

    Specify scratch location by editing the .cshrc file to set the scratch environment variable :envvar:`PSI_SCRATCH`. If the selected location is /scratch/user, add something like the following:

    setenv PSI_SCRATCH /scratch/user
    

    In a bash shell, the corresponding commands to be added to .bashrc is the following:

    export PSI=/usr/local/psi
    PATH=$PSI/bin:$PATH ; export PATH
    export PSI_SCRATCH=/scratch/user
    

    More advanced control of scratch files and is handled through a .psi4rc file, which is discussed at section :ref:`sec:psirc`.

    Note

    For developers: during compilation and testing, PSI4 finds its basis sets, grids, etc., in psi4/lib. After installation, PSI4 will look in $prefix/share/psi. If you want to specify a non-standard location for this information, you can do this by setting the environmental variable $PSI4DATADIR to the directory containg the basis, grids, etc., subdirectories.

V. Miscellaneous Architecture-Specific Notes

  • Linux on x86 and x86_64
    1. Intel compilers: We had trouble with icpc 12.0.x. Use 12.1 or later.

VI. Common Problems with PSI Compilation

  • No rule to make target foo.h, needed by bar.d. Stop.

    This commonly happens after pulling updates from the repository. It happens when a library header file is removed or renamed by the update, but there are still old dependency files in the object directory, which think that they still need to know about that header. There's a simple remedy, just run

    >>> make DODEPEND=no dclean
    

    in the object directory.

  • Make gets stuck in an infinite loop

    This means that the makefiles have not been properly updated. Running

    >>> autoconf
    

    in the top-level Psi directory, followed by

    >>> ./config.status --recheck
    >>> ./config.status
    

    in the object directory should fix it. This procedure will need to be run whenever an update changes the directory structure.

  • Incompatible g++/icpc

    The Intel compilers require an installed set of C++ headers. Unfortunately, the GNU compilers tend to be more cutting-edge than the Intel compilers, meaning that Intel is always playing catch-up to new features in g++. This means the two are often incompatible, leading to trouble if one wants to use icpc to compile PSI4 (or anything else...). Your best bet in general is to not upgrade Linux too fast, and always keep the very latest Intel compilers around.

  • Missing symbols like "do_fio" or "e_wsfe"

    See :ref:`Section IV(3) <sec:install_IV_3>` above.

  • Unable to read the PSI4 Python folder - check the PSIDATADIR environmental variable

    Once PSI4 has been sucessfully compiled (make), it can be run in either of two ways. By proceeding with make install, the executable and other goodies (basis sets, etc.) are copied over to the location specified by --prefix, from whence the executable can be run directly. Alternatively, the executable can be run in situ (useful for developing in PSI4), but since $objdir can be anywhere with respect to the non-compiled source code, you need to convey that path through setting the environment variable :envvar:`PSIDATADIR` to the lib directory in the main PSI4 checkout.

    The bulleted error message occurs when trying to run PSI4 after make without setting :envvar:`PSIDATADIR`. Just type make install and run PSI4 from the installation directory.