Compiling GAMESS-v2020.2 with Intel MPI

GAMESS Download Site can be found at https://www.msg.chem.iastate.edu/GAMESS/download/dist.source.shtml

Compiling GAMESS

% tar -zxvf gamess-current.tar.gz
% cd gamess
% ./config

You have to answer the following question on

  • Machine Type? – I chose “linux64
  • GAMESS directory? -I chose “/usr/local/gamess
  • GAMESS Build Directory – I chose “/usr/local/gamess
  • Version? [00] – I chose default [00]
  • Choice of Fortran Compilers – I chose “ifort”
  • Version Number of ifort – I chose “18” (You can check by issuing the command ifort -V)
  • Standard Math Library – I chose “mkl”
  • Path of MKL – I chose “/usr/local/intel/2018u3/compilers_and_libraries_2018.3.222/linux/mkl
  • Type “Proceed” next
  • Communication Library – I chose “mpi” (I’m using Infiniband)
  • Enter MPI Library – I chose “impi
  • Enter Location of impi – I chose “/usr/local/intel/2018u3/impi/2018.3.222
  • Build experimental support of LibXC – I chose “no
  • Build Beta Version of Active Space CCT3 and CCSD3A – I chose “no
  • Build LIBCCHEM – I chose “no
  • Build GAMESS with OpenMP thread support – I chose “yes”

Once done, you should see

Your configuration for GAMESS compilation is now in
     /usr/local/gamess/install.info
Now, please follow the directions in
     /usr/local/gamess/machines/readme.unix

Compiling ddi

Edit DDI Node Sizes by editing /usr/local/gamess/ddi/compddi
Look at Line 90 and 91. You may want to edit MAXCPUS and MAXNODES. Once done, you can compile ddi

% ./compddi >& compddi.log &

Compiling GAMESS

The compilation will take a while. So relax…..

% ./compall >& compall.log &

Linking Executable Form of GAMESS with the command

./lked gamess 01 >& lked.log &

Edit the Scratch Directory setting at rungms

% vim rungms
set SCR=/scratch/$USER

Compiling flac-1.3.3 with GNU 6.5

If you are hoping to compile flac-1.3.3 with libogg-1.3.4, do the following

Step 1: Download latest libogg from Xiph.org

Step 2: Untar and Compile the libogg

% tar -zxvf libogg-1.3.4.tar.gz% cd libogg-1.3.4
% ./configure --prefix=/usr/local/libogg-1.3.4
% make && make install

Step 3: Download flac-1.3.3 from https://github.com/xiph/flac

Step 4: Untar and Compile flac-1.3.3 with libogg-1.3.4

% git clone https://github.com/xiph/flac.git
% cd flac
% ./autogen.sh
% ./configure --prefix=/usr/local/flac-1.3.3 --with-ogg-libraries=/usr/local/libogg-1.3.4/lib --with-ogg-includes=/usr/local/libogg-1.3.4/include/

-=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-

  Configuration summary :

    FLAC version : ............................ 1.3.3

    Host CPU : ................................ x86_64
    Host Vendor : ............................. unknown
    Host OS : ................................. linux-gnu

    Compiler is GCC : ......................... yes
    GCC version : ............................. 4.8.5
    Compiler is Clang : ....................... no
    SSE optimizations : ....................... yes
    Asm optimizations : ....................... yes
    Ogg/FLAC support : ........................ yes
    Stack protector  : ........................ yes
    Fuzzing support (Clang only) : ............ no

% make && make install

Compiling KALDI with OpenMPI and MKL

KALDI (Kaldi Speech Recognition Toolkit)

Step 1: Git Clone kaldi packages

% git clone https://github.com/kaldi-asr/kaldi.git

Step 2: Check Dependencies.

Do run the following steps in the blog entry Fixing zlib Dependencies Issues for kaldi

Step 3: Load OpenMPI-3.1.4 with GNU-6.5

You may wish to compile OpenMPI with GNU-6.5 according to Compiling OpenMPI-3.1.6 with GCC-6.5

Step 4: Compile kaldi tools

% cd /usr/local/kaldi/tools
% make
.....
.....
All done OK.

(This make take a long well)

Step 5: Compile src of the main kaldi

% source /usr/local/intel/2018u3/mkl/bin/mklvars.sh intel64
% export CXXFLAGS="-I/usr/local/zlib-1.2.11/include"
% ./configure --use-cuda=no
% make -j clean depend
% make -j 4

Python [Errno 13] Permission denied

Issues

If you are facing issues like this when using python libraries like “queue = multiproccesing.Queue()”, you may face this issue

Error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/intel/2020/intelpython3/lib/python3.7/multiprocessing/context.py", line 102, in Queue
return Queue(maxsize, ctx=self.get_context())
File "/usr/local/intel/2020/intelpython3/lib/python3.7/multiprocessing/queues.py", line 42, in __init__
self._rlock = ctx.Lock()
File "/usr/local/intel/2020/intelpython3/lib/python3.7/multiprocessing/context.py", line 67, in Lock
return Lock(ctx=self.get_context())
File "/usr/local/intel/2020/intelpython3/lib/python3.7/multiprocessing/synchronize.py", line 162, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
File "/usr/local/intel/2020/intelpython3/lib/python3.7/multiprocessing/synchronize.py", line 59, in __init__
unlink_now)
PermissionError: [Errno 13] Permission denied

When executing the code with root privilege, it was working fine, but a normal user doesn’t have permission to access shared memory.

Resolution:

You can counter-check the issue by checking /dev/shm

% ls -ld /dev/shm

Change Permission to 777

% chmod 777 /dev/shm

Turn on the sticky bit

% chmod +t /dev/shm
% ls -ld /dev/shm
drwxrwxrwt 4 root root 520 Mar 5 13:32 /dev/shm

Compiling airss-0.9.1 with GNU

Ab initio random structure searching (AIRSS) is a very simple, yet powerful and highly parallel, approach to structure prediction. For more information, Do take a look at https://airss-docs.github.io/

Installation Guide can be found at https://airss-docs.github.io/getting-started/installation/

 

Installation is quite a breeze. But there are a few additional steps if you have issues.

Step 1: Download airss package

% wget https://www.mtg.msm.cam.ac.uk/files/airss-0.9.1.tgz

Step 2: Load the GNU Compilers (Must be greater than version 5 and above)

Step 3: Compiling the application

% tar -xvf airss-0.9.1.tgz
% cd airss-0.9.1
% make

If you have error such as

% wget -c --timeout=1 --tries=2 -nv https://www.mtg.msm.cam.ac.uk/files/symmol.zip
Read error (Connection timed out) in headers
.....
.....

You may want to download manually and placed the symmol.zip at airss-0.9.1/external/symmol. Run the make again.

% make ; make install ; make neat
% make check
.....
.....
--------------------
Tests run in .check:
--------------------

Running example 1.1 (Crystals):

Al-44343-3411-1 -0.00 7.564 -6.654 8 Al Fm-3m 1
Al-44343-3411-2 -0.00 8.465 0.797 8 Al C2/m 1

Running example 1.2 (Clusters):

Al-44735-1896-1 0.00 615.385 -3.410 13 Al Ih 1
Al-44735-1896-2 0.00 615.385 0.362 13 Al C1 1
.....
.....

Fixing zlib Dependencies Issues for kaldi

What is Kaldi?

Kaldi is a toolkit for speech recognition, intended for use by speech recognition researchers and professionals. Find the code repository at http://github.com/kaldi-asr/kaldi.

Downloading Kaldi

% git clone https://github.com/kaldi-asr/kaldi.git

Checking Dependencies

Before you can compile, you may want to check the required dependencies

% cd kaldi/tools
% vim INSTALL

Running the Dependencies Test

% cd kaldi/tools/extras

Load Intel Compilers and MLK

export MKLROOT=/usr/local/intel_2018/mkl/lib

Run the Check_Dependencies Test

% ./check_dependencies.sh
./check_dependencies.sh: zlib is not installed.
./check_dependencies.sh: Some prerequisites are missing; install them using the command:
sudo yum install zlib-devel

(This error is strange because becuase zlib and zlib-devel has already been installed)

I used instead a compiled zlib. For more information how to compile zlib, see Compile zlib-1.2.8 with Intel-15.0.6

Next CXXFLAGS on your .bashrc.

CXXFLAGS="-I/usr/local/zlib-1.2.11/include"

Source ~/.bashrc once again.

% source ~/.bashrc
[user1@node1 extras]$ ./check_dependencies.sh
./check_dependencies.sh: all OK.

Compiling Quantum ESPRESSO-6.7.0 with BEEF and Intel MPI 2018 on CentOS 7

Step 1: Download Quantum ESPRESSO 6.5.0 from Quantum ESPRESSO v. 6.7

% tar -zxvf q-e-qe-6.7.0.tar.gz

Step 2: Remember to source the Intel Compilers and indicate MKLROOT in your .bashrc

export MKLROOT=/usr/local/intel_2018/mkl/lib
source /usr/local/intel/2018u3/parallel_studio_xe_2018/bin/psxevars.sh intel64
source /usr/local/intel/2018u3/compilers_and_libraries/linux/bin/compilervars.sh intel64
source /usr/local/intel/2018u3/impi/2018.3.222/bin64/mpivars.sh intel64

Step 3a: Install libbeef

  1. Installing libbeef with Intel Compilers

Step 3b: Make a file call setup.sh and copy the contents inside

export F90=mpiifort
export F77=mpiifort
export MPIF90=mpiifort
export CC=mpiicc
export CPP="icc -E"
export CFLAGS=$FCFLAGS
export AR=xiar
#export LDFLAGS="-L/usr/local/intel/2018u3/mkl/lib/intel64"
#export CPPLAGS="-I/usr/local/intel/2018u3/mkl/include/fftw"
export BEEF_LIBS="-L/usr/local/libbeef-0.1.3/src -lbeef"
export BLAS_LIBS="-lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core"
export LAPACK_LIBS="-lmkl_blacs_intelmpi_lp64"
export SCALAPACK_LIBS="-lmkl_scalapack_lp64 -lmkl_blacs_intelmpi_lp64"
#export FFT_LIBS="-lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lmkl_scalapack_lp64"
./configure --enable-parallel --enable-openmp --enable-shared --with-libbeef=yes --with-scalapack=intel --prefix=/usr/local/espresso-6.7.0 | tee Configure.out
% ./setup.sh
% make all
% make install

(I prefer make all without the “make all -j 16” so I can see all the errors and trapped seriously)

If successful, you will see in your bin folder

Configuring External libraries for R-Studio for CentOS 7

RStudio can be configured by adding entries to 2 configuration files. It may not exist by default and you may need to create

/etc/rstudio/rserver.conf
/etc/rstudio/rsession.conf

If you need to add additional libraries to the default LD_LIBRARY_PATH for R sessions. You have to add the parameters to the /etc/rstudio/rserver.conf

Step 1: Enter External Libraries settings
For example, you may want to add GCC-6.5 libraries

# Server Configuration File
rsession-ld-library-path=/usr/local/gcc-6.5.0/lib64:/usr/local/gcc-6.5.0/lib

Step 2a: Stop the R Server Services

# /usr/sbin/rstudio-server stop

Step 2b: Verify the Installation

# rstudio-server verify-installation

Step 2c: Start the R Server Services

# /usr/sbin/rstudio-server start
# /usr/sbin/rstudio-server status

(Make sure there is no error)

References:

  1. RStudio Server: Configuring the Server