Encountering Error when pip install TensorToolbox

I’m using Python-3.8.7  When I do a pip install for TensorFlowbox with Intel Optimized Toolbox, I received errors.

% pip install TensorFlowbox

But it failed with its SpectralToolbox Dependencies.

.....
.....

Building wheels for collected packages: SpectralToolbox, orthpol-light
Building wheel for SpectralToolbox (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/python/intel/2017u3/intelpython3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-p5qjlor0/spectraltoolbox/setup.py'"'"'; __file__='"'"'/tmp/pip-install-p5qjlor0/spectraltoolbox/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-4k6ars4d
cwd: /tmp/pip-install-p5qjlor0/spectraltoolbox/
Complete output (56 lines):

Somehow the later version of Python3 has issues with SpectralToolbox and TensorToolbox. To compile TensorToolbox, you have to go back to earlier version of Python 3. I chose Python-3.6.9 (https://www.python.org/downloads/release/python-369/).

And it works.

Perquisites:

openmpi-3.1.4
gnu-6.5
m4-1.4.18
gmp-6.1.0
mpfr-3.1.4
mpc-1.0.3
isl-0.18
gsl-2.1

 

Compile

% tar -zxvf Python-3.6.9
% cd Python-3.6.9
% ./configure --prefix=/usr/local/python-3.6.9 --enable-optimizations
% make -j 16
% make install

Installing TensorToolbox

% pip install numpy scipy matplotlib
% pip install mpi4py
% pip install TensorToolbox

For more information, see TensorToolbox-1.0.22 (https://pypi.org/project/TensorToolbox/#description)

 

Fixing can’t load screen14 issues for ANSYS 2020-R1

I was having this strange issue when running ANSYS ICEM

"Fixing can't load screen14 issues, using variable
Signal 11 caught!
Segmentation violation - exiting after doing an emergency save"

The Issue can easily resolved. It is due to errors due to missing fonts libraries

# yum install xorg-x11-fonts-*
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.newmediaexpress.com
* epel: download.nus.edu.sg
* extras: mirror.newmediaexpress.com
* updates: mirror.newmediaexpress.com
Package xorg-x11-fonts-ISO8859-1-75dpi-7.5-9.el7.noarch already installed and latest version
Package xorg-x11-fonts-Type1-7.5-9.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-fonts-100dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-75dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-1-100dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-14-100dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-14-75dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-15-100dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-15-75dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-2-100dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-2-75dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-9-100dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ISO8859-9-75dpi.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-cyrillic.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-ethiopic.noarch 0:7.5-9.el7 will be installed
---> Package xorg-x11-fonts-misc.noarch 0:7.5-9.el7 will be installed
--> Finished Dependency Resolution

The Issue should be resolved.

Compiling Parallel HDF5-1.12.0 with OpenMPI and GCC6

HDF5 Download can be found here at https://www.hdfgroup.org/downloads/hdf5/. You will need to register an account before you can download

Prerequisites

  1. GNU GCC-6.5
  2. OpenMPI-3.1.4

Compiling

% tar -zxvf hdf5-1.12.0.tar.gz
% cd hdf5-1.12.0
% CC=mpicc ./configure --prefix=/usr/local/hdf5-1.12.0-gcc6 --enable-parallel --enable-hl --with-zlib=/usr/local/zlib-1.2.11-gcc6
Features:
---------
                   Parallel HDF5: yes
Parallel Filtered Dataset Writes: yes
              Large Parallel I/O: yes
              High-level library: yes
                Build HDF5 Tests: yes
                Build HDF5 Tools: yes
                    Threadsafety: no
             Default API mapping: v112
  With deprecated public symbols: yes
          I/O filters (external): deflate(zlib)
                             MPE:
                   Map (H5M) API: no
                      Direct VFD: no
              (Read-Only) S3 VFD: no
            (Read-Only) HDFS VFD: no
                         dmalloc: no
  Packages w/ extra debug output: AC,B2,CX,D,F,HL,I,O,S,ST,T,Z
                     API tracing: yes
            Using memory checker: no
 Memory allocation sanity checks: yes
          Function stack tracing: no
       Strict file format checks: yes
    Optimization instrumentation: yes
% make check
% make install

Compiling Gromacs-2019.3 with Intel 2018 MKL and AVX-512

Prerequisites

GCC-6.5 Compilers and associates libraries
m4-1.4.18
mpfr-3.1.4
cmake-3.15.1
gmp-6.1.0
mpc-1.0.3

Intel Compilers and Prerequisites

source /usr/local/intel/2018u3/bin/compilervars.sh intel64
source /usr/local/intel/2018u3/impi/2018.3.222/bin64/mpivars.sh intel64
source /usr/local/intel/2018u3/mkl/bin/mklvars.sh intel64
source /usr/local/intel/2018u3/parallel_studio_xe_2018/bin/psxevars.sh intel64
MKLROOT=/usr/local/intel/2018u3/mkl

Create a setup file

touch gromacs_cpu.sh

Put the following into the gromacs_cpu.sh

CC=mpicc CXX=mpicxx cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx
-DGMX_MPI=on -DGMX_FFT_LIBRARY=mkl -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-2019.3_intel18_mkl 
-DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_C_FLAGS:STRING="-cc=icc -O3 -xHost -ip" 
-DCMAKE_CXX_FLAGS:STRING="-cxx=icpc -O3 -xHost -ip" -DGMX_GPU=off -DCMAKE_BUILD_TYPE=Release -DGMX_SIMD=AVX_512

SIMD Support can be found at http://manual.gromacs.org/current/install-guide/index.html#simd-support

./gromacs_cpu.sh
make
make install

Testing and Verification

$ source /your/installation/prefix/here/bin/GMXRC
./gmxtest.pl all -np 2

Compiling LAMMPS-15Jun20 with GNU 6 and OpenMPI 3

Prerequisites

openmpi-3.1.4
gnu-6.5
m4-1.4.18
gmp-6.1.0
mpfr-3.1.4
mpc-1.0.3
isl-0.18
gsl-2.1
lammps-15Jun20

Download the latest tar.gz from https://lammps.sandia.gov/

 

Step 1: Untar LAMMPS

% tar -zxvf lammps-stable.tar.gz

Step 2: Make Standard Packages

% make yes-standard
% make no-gpu
% make no-mscg

Step 3: Compile message libraries

% cd lammps-15Jun20/lib/message/cslib/src
% make lib_parallel zmq=no

Copy and rename the produced cslib/src/libcsmpi.a or libscnompi.a file to cslib/src/libmessage.a

% cp cslib/src/libcsmpi.a to cslib/src/libmessage.a

Copy either lammps-15Jun20/lib/message/Makefile.lammps.zmq or Makefile.lammps.nozmq to lib/message/Makefile.lammps

% cp Makefile.lammps.nozmq to Makefile.lammps

Step 4: Compile poems

% cd lammps-15Jun20/lib/poems
% make -f Makefile.g++

Step 5: Compile latte
Download LATTE code and unpack the tarball either in this /lib/latte directory

% git clone https://github.com/lanl/LATTE

Inside lammps-15Jun20/lib/latte/LATTE
Modify the makefile.CHOICES according to your system architecture and compilers

% cd lammps-15Jun20/lib/latte/LATTE
% cp makefile.CHOICES makefile.CHOICES.gfort
% make
% cd lammps-15Jun20/lib/latte
% ln -s ./LATTE/src includelink
% ln -s ./LATTE liblink
% ln -s ./LATTE/src/latte_c_bind.o filelink.o
% cp Makefile.lammps.gfortran Makefile.lammps

Step 6. Compile Voronoi

Download voro++-0.4.6.tar.gz from http://math.lbl.gov/voro++/download/
Untar the voro++-0.4.6.tar.gz inside lammps-15Jun20/lib/voronoi/

% tar -zxvf voro++-0.4.6.tar.gz
% cd lammps-15Jun20/lib/voronoi/voro++-0.4.6
% make

Step 7: Compile kim

Download kim from https://openkim.org/doc/usage/obtaining-models . The current version is  kim-api-2.1.3.txz

Download at /lammps-15Jun20/lib/kim

% cd lammps-15Jun20/lib/kim
% tar Jxvf kim-api-2.1.3.txz
% cd kim-api-2.1.3
% mkdir build
% cd build
% cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/../../installed-kim-api-X.Y.Z
% make -j2
% cd /lammps-15Jun20/lib/kim//installed-kim-api-2.1.3/
% source ${PWD}/kim-api-X2.1.3/bin/kim-api-activate
% kim-api-collections-management install system EAM_ErcolessiAdams_1994_Al__MO_324507536345_002

Step 8: Compile USER-COLVARS

% cd lammps-15Jun/lib/colvars
% make -f Makefile.g++

Step 9: Finally Compile LAMMPS

% cd lammps-15Jun20/src
% make g++_openmpi -j 16

You should have binary called lmp_g++_openmpi
Do a softlink

ln -s lmp_g++_openmpi lammps

Test Failed… does not support .pth files

If you are doing a setup.py with specific directories

python setup.py install --prefix=/home/user1

If you are getting a PythonPath Error something like this.

TEST FAILED: /home/user1/lib/python3.7/site-packages/ does NOT support .pth files error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not on PYTHONPATH and which Python does not read ".pth" files from. 
The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /home/user1/lib/python3.7/site-packages/

and your PYTHONPATH environment variable currently contains:

You can solve like by putting in your .bashrc.

export PYTHONPATH="${PYTHONPATH}:/home/user1/lib/python3.7/site-packages/"
source ~/.bashrc

Installing SCons-3.1.2 with Intel Python Distribution

What is SCons?

SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software.

For more information, see https://scons.org/

Prerequisites

Python 3 Distribution. For this I used the Intel Python Distribution

Get the Source Code

git clone https://github.com/SCons/scons.git

Setup scons directory and run the setup script

cd $HOME/scons
/usr/local/intel/2020/intelpython3/bin/python setup.py install

Do note that the scons will write a site package at /usr/local/intel/2020/intelpython3/lib/python3.7/site-packages/SCons-3.9.9a993-py3.7.egg . You need to allow the necessary permission

Testing the package

cd /usr/local/scons
python runtest.py SCons/BuilderTests.py
1/1 (100.00%) /usr/local/intel/2020/intelpython3//bin/python SCons/BuilderTests.py
......................................
----------------------------------------------------------------------
Ran 38 tests in 0.096s
OK

References:

  1. SCons: A software construction tool
  2. SCons GitHub Site

 

Compiling Gromacs-2019.3 with Intel MKL and CUDA

Prerequisites

GCC-6.5 Compilers and associates libraries
m4-1.4.18
mpfr-3.1.4
cmake-3.15.1
gmp-6.1.0
mpc-1.0.3

Intel Compilers and Prerequisites

source /usr/local/intel/2018u3/bin/compilervars.sh intel64
source /usr/local/intel/2018u3/impi/2018.3.222/bin64/mpivars.sh intel64
source /usr/local/intel/2018u3/mkl/bin/mklvars.sh intel64
source /usr/local/intel/2018u3/parallel_studio_xe_2018/bin/psxevars.sh intel64
MKLROOT=/usr/local/intel/2018u3/mkl

Create a setup file

touch gromacs_gpgpu.sh

Put the following into the gromacs_cpu.sh

CC=mpicc CXX=mpicxx cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DGMX_MPI=on -DGMX_FFT_LIBRARY=mkl
-DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-2019.3_intel18_mkl_cuda10.1 -DREGRESSIONTEST_DOWNLOAD=ON
-DCMAKE_C_FLAGS:STRING="-cc=icc -O3 -xHost -ip"
-DCMAKE_CXX_FLAGS:STRING="-cxx=icpc -O3 -xHost -ip -I/usr/local/intel/2018u3/compilers_and_libraries_2018.3.222/linux/mpi/intel64/include/" 
-DGMX_GPU=on 
-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.1
-DCMAKE_BUILD_TYPE=Release
-DCUDA_HOST_COMPILER:FILEPATH=/usr/local/intel/2018u3/compilers_and_libraries_2018.3.222/linux/bin/intel64/icpc
./gromacs_gpgpu.sh
make
make install

Testing and Verification

$ source /your/installation/prefix/here/bin/GMXRC
./gmxtest.pl all -np 2

Compiling Gromacs-2019.3 with Intel 2018 and MKL

Prerequisites

GCC-6.5 Compilers and associates libraries
m4-1.4.18
mpfr-3.1.4
cmake-3.15.1
gmp-6.1.0
mpc-1.0.3

Intel Compilers and Prerequisites

source /usr/local/intel/2018u3/bin/compilervars.sh intel64
source /usr/local/intel/2018u3/impi/2018.3.222/bin64/mpivars.sh intel64
source /usr/local/intel/2018u3/mkl/bin/mklvars.sh intel64
source /usr/local/intel/2018u3/parallel_studio_xe_2018/bin/psxevars.sh intel64
MKLROOT=/usr/local/intel/2018u3/mkl

Create a setup file

touch gromacs_cpu.sh

Put the following into the gromacs_cpu.sh

CC=mpicc CXX=mpicxx cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx
-DGMX_MPI=on -DGMX_FFT_LIBRARY=mkl -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs-2019.3_intel18_mkl 
-DREGRESSIONTEST_DOWNLOAD=ON -DCMAKE_C_FLAGS:STRING="-cc=icc -O3 -xHost -ip" 
-DCMAKE_CXX_FLAGS:STRING="-cxx=icpc -O3 -xHost -ip" -DGMX_GPU=off -DCMAKE_BUILD_TYPE=Release
./gromacs_cpu.sh
make
make install

Testing and Verification

$ source /your/installation/prefix/here/bin/GMXRC
./gmxtest.pl all -np 2