# S/PHI/nX Binary Distribution (*.rpm)

Written by sixten on . Posted in All Posts, S/PHI/nX

Following the build notes (Fedora, CentOS) this article sheds light on the installation sequence of the binary packages.

The Fedora binaries of S/PHI/nX and SxAccelerate as provided by Gemmantics are available as rpm files. RPM – the format of the Redhat package manager – is the native package format of Fedora.

I follow the previous discussion about installing S/PHI/nX on Debian systems. To keep the article as a whole some parts are copied instead of linked.

We provide two versions:

1. The complete S/PHI/nX program package and
2. a single bundle containing only the SxAccelerate framework.

The complete S/PHI/nX program package provides

• SxAccelerate,
• S/PHI/nX libraries,
• Intel MKL runtime environment,
• S/PHI/nX executable, and

The second package provides only the SxAccelerate framework in both Debug and Release mode. The download of this package is mainly interesting for C++ developers.

Notes about installing Debian along with building instructions for S/PHI/nX can be found in the previous blog.

# Installing

You can either install the full S/PHI/nX program package or only the programming environment SxAccelerate. Either way, just execute the following commands under root privileges.

 # install wget and netCDF (if available) yum install wget netcdf # download package wget http://download.gemmantics.com\ /sx/OS_NAME/OS_VERSION/x86_64\ /sphinx-2.0.2-2.x86_64.rpm # install S/PHI/nX package rpm --nodeps -i sphinx-2.0.2-2.x86_64.rpm  # install wget and netCDF (if available) yum install netcdf # download package wget http://download.gemmantics.com\ /sx/OS_NAME/OS_VERSION/x86_64\ /sxaccelerate-1.0.1-1.x86_64.rpm # install S/PHI/nX package rpm --nodeps -i sxaccelerate-1.0.1-1.x86_64.rpm 

Please replace OS_NAME and OS_VERSION with the corresponding identifiers, i.e.:

Operating System OS_NAME OS_VERSION
CentOS 6.3 CentOS 6.3
Fedora 15 Fedora 15

# First Steps with S/PHI/nX

After installing the complete S/PHI/nX the package you can start to perform the first “hello world” calculation. The S/PHI/nX distribution comes with a few example files which can be found in:

/opt/sphinx/VERSION/share/examples
/opt/sxaccelerate/VERSION/share/examples

In order to perform the first test calculation with S/PHI/nX please copy one or all of the example folders to your home directory:

# prepare some working environment
cd ~
mkdir sxwork
cd sxwork

# copy examples to ~/sxwork
cp -r /opt/sphinx/VERSION/share/examples/* .


# Input

Let’s begin with a very simple example, namely the computation of the total energy of gallium arsenide bulk (GaAs). Please copy the folder GaAs2-bulk-CG to your work directory.

cd GaAs2-bulk-CG
vim input.sx


S/PHI/nX reads typically from the input.sx located in the current working directory.

format sphinx;
include ;

project   = "Test: GaAs bulk";
aLat      = 10.2;

pseudoPot {
species { include "ga-lda-ham.sx"; }
species { include "as-lda-ham.sx"; }
}

structure  {
include <structures/fcc.sx>;
species {
atom { coords = [0,0,0]; relative; }
}

species {
atom { coords = [1/4,1/4,1/4]; relative; }
}
}

basis  {
eCut    = 20;  // Ry
kPoint { coords = [1/2, 1/2, 1/2]; weight = 1; relative; }
folding = 4* [1, 1, 1];
}

PWHamiltonian  {
nEmptyStates = 0;
ekt          = 0;
xc           = LDA;
}

initialGuess  {
waves { lcao { maxSteps=1; rhoMixing=0; } }
rho { atomicOrbitals; }
}

main  {
CCG {
dEnergy=1e-7;
finalDiag;
}
}



Every S/PHI/nX program begins with the header statement “format sphinx;” (line 1). The S/PHI/nX file format is a markup-language defined as a set of hierarchal groups. In this example there are groups to specify the atomic structure (line 12) and the corresponding potentials (line 7). GaAs bulk crystalizes in the Zincblende structure. The plane-wave basis configuration can be found in lines 23-27. The Hamiltonian (line 29-33) will use LDA as exchange-correlation functional. In the main loop (lines 40-45) the conjugate-gradient method will be applied to compute the total energy.

# Launch

After inspecting the input file S/PHI/nX can be started by running the following command:

# compute the total energy of GaAs bulk
/opt/sphinx/VERSION/bin/sphinx --log


The command line argument “--log” redirects all output to stdout to the log file “sphinx.log”. The computation takes only a few seconds.

# Output

During the computation S/PHI/nX generates a variety of output files:

The main log file is sphinx.log. It contains all relevant information of the entire run.

Furthermore, S/PHI/nX computes the self-consistent electronic charge density rho.sxb and corresponding wave functions waves.sxb.

The computed one-particle spectra can be found in eps.dat.

The energy convergence can be inspected from the file energy.dat as can be seen from this figure.

A S/PHI/nX run may generate additional output files depending on the configuration provided in the input file.

# Next steps

The S/PHI/nX Wiki contains more detailed information about the input file and usage of S/PHI/nX.

Please also consider to subscribe to the S/PHI/nX mailing lists where all questions concerning S/PHI/nX can be posted. You can join the S/PHI/nX discussion forum by sending a blank email to
sxusers-subscribe at mpie dot de.