BNL Home

software

Comsuite Installation

Prerequisites

Comsuite consists of programs, executables, and scripts, written in Fortran90, c (c++) and Python. Before you start the installation, you must make sure that the following packages are installed in your system.

  • Fortran, C, CXX compiler and blas/lapack library. The followings have been tested
    • ifort, icpc and mkl
  • MPI
  • python (required package : numpy, scipy, tabulate, itertools, mpi4py, cython, matplotlib, Builtins, sympy, pymatgen, pyyaml and h5py)

Data storage in Parallel HDF5 is also supported.

Build and Install

The installation consists of three simple steps (Download, Extract, and Compile)

Download COMSUITE (comsuite.zip)

  • Extract COMSUITE package. You need to unzip the downloaded COMSUITE package and cd to that directory. The directory contains the following sub-directories:
    • bin -- executable binaries and scripts
    • ComLowH -- program to construct low-energy Hamiltonian and tcalculate Delta
    • ComWann -- program to construct Wannier function by using wannier90 package (http://wannier.org/)
    • ComCoulomb -- program to calculate bosonic Weiss field
    • ComCTQMC -- ctqmc impurity solver
    • ComDC -- program to calculate double counted self-energy within local GW approximation
    • example -- examples.
    • gw -- FlapwMBPT code(https://www.bnl.gov/cmpmsd/flapwmbpt/)
    • wannier90-2.1 -- the most recent version of Wannier90.
    • ComRISB -- program to perform Gutzwiller-rotationally invariant slave-boson calculations.
  • compile COMSUITE package in the extracted directory.
  • First, define the installation directory in the shell. For example in bash shell, use the following command
    export COMSUITE_BIN=install_directory/bin

    and add $COMSUITE_BIN to your system $PATH
  • Then, the compilers, libraries, and flags should be defined in the arch.mk file. An example to install COMSUITE in Cori at NERSC is as follows.
    ##### fortran
    F90 = ifort
    PF90 = ftn
    compfl = -O3
    
    ### phdf5
    USE_HDF5 = defined  ### comment out this line if you don’t want to compile with hdf5 (for LDA+DMFT and LQSGW+DMFT)
    
    ifdef USE_HDF5
        FPPFLAGS += -DUSE_HDF5
        F90 = h5pfc
    endif
    
    
    ### C and C++
    CXX = CC
    CXX_MPI = CC
    
    ##### lapack library
    LAPACK_LIB = -mkl
    
    #### ComCTQMC
    
    BASE_CPPFLAGS = -DNDEBUG
    BASE_LIBS = -lm
    
    CXXFLAGS_CTQMC = -std=c++11 -fexceptions -Wall -O3
    
    #### ComRISB ######################
    
    
    FIX_FORM = -fixed
    FREE_FORM = -free
    PF90_RISB=h5pfc
    CXXFLAGS_RISB = -O2
    

Below is the meaning of the each flag in the arch.mk.

F90 = ifort ; identify Fortran compiler for a serial fortran program

PF90 = ftn ; identify Fortran compiler for a MPI fortran program

compfl = -O3 ; compilation flag for Fortran programs

USE_HDF5 = defined ; compilation option to enable program to read and write data in hdf5 file format (only works for LDA+DMFT and LQSGW+DMFT for now). Comment out this line if you don’t want to compile with hdf5

CXX = CC ; standard environment variable to identify the serial C++ compiler.

CXX_MPI = CC; identify the parallel C++ compiler

ifdef USE_HDF5 ;
  FPPFLAGS += -DUSE_HDF5
; preprocessor definition to compile with HDF5 file format
  F90 = h5pfc; identify Fortran compiler for hdf5 file format
endif

LAPACK_LIB = -mkl ; specify LAPACK library

BASE_CPPFLAGS = -DNDEBUG ; generic C-preprocessor flags. NDEBUG stands for no-debug code.

BASE_LIBS = -lm ; generic libraries that are compiler independent. The -lm flag requests the math library.

CXXFLAGS_CTQMC = -std=c++11 -fexceptions -Wall -O3 ; list of compilation flags for C++ compiler for ComCTQMC. The -std=c++11 specifies that the code is written based on the C++ 2011 standard. The -fexceptions flag tells the compiler that it should generate code that support exceptions. The -Wall turns on all warnings.

FIX_FORM = -fixed: specify Fortran standard fixed format

FREE_FORM = -free: specify free format

PF90_RISB = h5pfc: identify hdf5 supported fortran compiler for COMRISB. Here we note that ComRISB support hdf5 partially, so that “USE_HDF5=defined” should be commented out for ComRISB.

CXXFLAGS_RISB = -O2: c compiler option for ComRISB

  • After setting up arch.mk, you need to run the following commands:
    • $ make clean
    • $ make

All executable files then are in bin directory (You don’t need to create bin directory by yourself). You can set the bin directory as install directory. If the package is compiled with library using static option, you may copy the bin directory somewhere setting up new install directory.

If you want compile COMSUITE package (for LDA+DMFT and LQSGW+DMFT) to store data in hdf5 file format, you should set:

USE_HDF5 = defined

Otherwise you comment out above flag. Then, it will store data in Fortran binary format.