Bug (what bug...?) reporting: Email: asarje@lbl.gov
- Licensing
- Supported Platforms 1. Operating System Platforms 2. System Hardware (Compute Environment) 3. System Hardware (Processor Architectures)
- Software Pre-requisites
- HipGISAXS Directory Layout
- Building the Binary and Library
- Running the Binary
- Inputs
- Using the Library in an Application
- Appendix 1. Special System Specific Build Instructions
The HipGISAXS software is only available to be downloaded and used by employees of academic research institutions, not-for-profit research laboratories, or governmental research facilities. Please read the accompanying LICENSE file before downloading the software. By downloading the software, you are agreeing to be bound by the terms of this Non-Commercial End User License Agreement. This licensing information is also provided as a PDF file along with the documentation.
HipGISAXS has been successfully tested on the following platforms.
- GNU/Linux x86_64: Ubuntu, Red Hat Linux, SUSE Linux, Cray Linux Environment (XK7, XE6, XC30, XC40).
- Darwin x86_64: Mac OS X (El Capitan, Yosemite).
- You could try HipGISAXS on any UNIX based OS: generally it should work.
- Windows: Will probably be supported in future.
- Generic x86 laptop/desktop/server.
- Clusters/Supercomputers based on x86 processors.
- Generic x86 laptop/desktop/server equipped with Nvidia GPUs.
- Clusters/Supercomputers equipped with Nvidia GPUs as accelerators on each node.
- Intel/AMD processors (64-bit).
- Nvidia GPUs with compute capability >= 2.0.
- Intel MIC architecture: support under development.
This software uses several third-party libraries, and they need to be installed and available in order to compile and run HipGISAXS. For ease, if possible use the installations already available on your system, if any. Alternatively, download and install them yourself. The following are the dependencies of this software:
- GNU C/C++ compilers, version >= 4.7, OR
Intel C/C++ compilers, version >= 15 (with GNU compatibility >= 4.7).
To compile with GPU support enabled, it is recommended to use GNU compilers. - Scons, version >= 2.0.
Scons can be obtained from: http://scons.org
NOTE: Scons is based on Python, so you need to have Python installed too. - Boost C++ Libraries.
Boost can be obtained from: http://www.boost.org - Tiff Library (libtiff).
Tiff library can be obtained from: http://remotesensing.org/libtiff
NOTE:libtiff
should be built with C++ support enabled. Also, disablejpeg
support unless you have JPEG libraries installed. Brief instructions on buildinglibtiff
are given in the appendix.
- Nvidia CUDA toolkit version >= 6.0.
CUDA can be obtained from Nvidia CUDA downloads
NOTE: CUDA required to enable GPU support.
NOTE: CUDA is NOT required if compiling for CPU-only version. - OpenMPI compiled with GNU or Intel compilers which ever you are using to compile HipGISAXS. Version > 1.4.4.
OpenMPI can be obtained from its website
Alternative implementations of MPI may also be used, such as MPICH and MVAPICH.
NOTE: MPI library is required to enable support for multi-node systems.
NOTE: MPI library is NOT required if compiling for single node/server/desktop/laptop. - Parallel HDF5 library.
HDF5 can be obtained from the HDF5 group website
NOTE: HDF5 library is NOT required if you do not plan to use input files in this format.
NOTE: HDF5 depends on the zlib and szip libraries.
zlib can be obtained from: http://www.zlib.net
szip can be obtained from: http://www.hdfgroup.org/doc_resource/SZIP
HipGISAXS
|- README.md : Duh!
|- LICENSE : This contains all the licensing information for HipGISAXS.
|- SConstruct : Scons file for installation.
|- SConscript : Scons file for installation.
|- bin : This contains HipGISAXS binaries generated by compilation.
|- build : A few Makefiles for various systems are provided in this.
|- data : This provides some sample input shape definition files.
|- doc : This will contain detailed documentation of HipGISAXS.
|- examples : This contains some example input files in HiG format.
|- extras : This contains some extra stuff such as syntax highlighting config for Vim.
|- include : All the source headers are within this directory. It contains subdirectories.
|- lib : The HipGISAXS library, libhipgisaxs.a, is generated here.
|- man : This has the man pages.
|- obj : All the object files generated during build are stored here.
|- samples : This contains some samples on how to use the HipGISAXS library.
|- src : This is the main source code directory. It contains many subdirectories.
To build the HipGISAXS application binary and static library, use scons
. Make sure you are passing paths to all the dependencies through --extrapath=
option of scons:
$ scons --extrapath=<path1>,<path2>,<etc>
To enable GPU support, use --with-cuda
option:
$ scons --extrapath=<path1>,<path2>,<etc> --with-gpu
To enable MPI support, use --with-mpi
option:
$ scons --extrapath=<path1>,<path2>,<etc> --with-gpu --with-mpi
or,
$ scons --extrapath=<path1>,<path2>,<etc> --with-mpi
The generated binary, hipgisaxs
, will be located in the bin
directory.
The generated static library, libhipgisaxs.a
, will be located in the lib
directory.
... and you are done. Go enjoy HipGISAXS!
NOTE: See Appendix at the end of this file for more detailed and customized building information.
-
Make sure all the paths (data, output) and other variables are correctly set in the input HiG file.
-
Execute the binary with the input file as an argument. For example,
$ ./bin/hipgisaxs examples/01-pyramid.hig
The HipGISAXS binary takes as input a file in HiG format.
Please refer to detailed HipGISAXS documentation for details of the HiG format. Detailed information on the inputs is available at https://webhipgisaxs.lbl.gov
A few sample input files are located in the directory examples
, with extensions .hig
.
Update the input files as needed.
The main components in the input file to update are the following:
-
Shape name defines the input filename containing triangulated shape data. It should point to the correct location of the file (relative path):
... shape = { ... name = "data/flexrod.obj" } ...
This file needs to be either in HDF5 format or the OBJ format.
Some sample shape files are provided in the directory "data", with extensions ".hd5". -
Output locatation needs to be defined as pathprefix and runname in the computation object:
... computation = { ... pathprefix = ".", runname = "myflexrod", ... } ...
The
pathprefix
is a relative path to a directory.
Therunname
is appended with a timestamp, and a directory by this resulting name is created in the directory specified bypathprefix
.
All output files are stored in this generated directory. -
Resolution alters the final image resolution, and also affects the run time:
... computation = { ... resolution = [ 1000 500 ], ... } ...
Obviously, simulations with lower resolutions finish faster.
Modify the provided input file templates as needed.
Please refer to the examples provided in the samples
directory.
It contains simple code which uses the HipGISAXS library.
The corresponsing Makefile is also provided as a reference.
-
Ensure all above prerequisites are available on the system.
-
Ensure all system environment variables are set accordingly to include the prerequisites.
-
Once all the required software are available, use the
scons
command to build the binary. Example:$ scons --extrapath=$PATHS_TO_SOFTWARE --with-mpi --with-cuda
-
On successful build, the binary will be generated in the
bin
directory, calledhipgisaxs
.
B. NERSC Systems
-
All required software, except
libtiff
are available as modules on Edison. An example set of modules you can load are given in thebuild/modules.edison
file. You could justsource
this file:$ source build/modules.edison
-
You will need to install
libtiff
. Please refer to the required software section above. -
An example build command is given in the
build/build-edison.sh
. If needed, make sure the paths are correctly set, including your installation oflibtiff
. Since Edison requires cross compilation for its compute nodes, make sure theCC
andCXX
environment variables are also set. Example:$ CC=cc CXX=CC scons --with-mpi --extrapath=$BOOST_ROOT,$TIFFDIR
NOTE: For those users who are member of the 'als' group at NERSC, an installation of libtiff
is available under /project/projectdirs/als/local/tiff-4.0.6
.
4. On successful build, the binary will be generated in the bin
directory, called hipgisaxs
.
-
All required software, except
libtiff
are available as modules on Cori. An example set of modules you can load are given in thebuild/modules.cori
file. You could justsource
this file:$ source build/modules.cori
-
You will need to install
libtiff
. Please refer to the required software section above. -
Build command is same as for the Edison system (see above), given in the
build/build-edison.sh
. If needed, make sure the paths are correctly set, including your installation oflibtiff
. Since Cori requires cross compilation for its compute nodes, make sure theCC
andCXX
environment variables are also set. Example:$ CC=cc CXX=CC scons --with-mpi --extrapath=$BOOST_ROOT,$TIFFDIR
NOTE: For those users who are member of the als
group at NERSC, an installation of libtiff
is available under /project/projectdirs/als/local/tiff-4.0.6
.
4. On successful build, the binary will be generated in the bin
directory, called hipgisaxs
.
C. OLCF Systems
-
All required software as modules on Titan, except
libtiff
which is already installed systemwide. An example set of modules you can load are given in thebuild/modules.titan
file. You could justsource
this file:$ source build/modules.titan
-
An example build command is given in the
build/build-titan.sh
. If needed, make sure the paths are correctly set. Since Titan requires cross compilation for its compute nodes, make sure theCC
andCXX
environment variables are also set. Example:$ CUDA_TOOLKIT_PATH=$CRAY_CUDATOOLKIT_DIR CXX=CC CC=cc scons --with-mpi --with-cuda --extrapath=$BOOST_DIR
-
On successful build, the binary will be generated in the
bin
directory, calledhipgisaxs
.
-
All the required softwares are already available on these systems. If you want to use your own installation of any of the required softwares, make sure you use its corresponding paths in the following.
-
An example build command is given in the
build/build-bragg.sh
orbuild/build-andromeda.sh
. If needed, make sure the paths are correctly set. -
Once all the required software are available, use the
scons
command to build the binary. Example:$ scons --extrapath=/usr/local/cuda --with-mpi --with-cuda
-
On successful build, the binary will be generated in the
bin
directory, calledhipgisaxs
.
- The source for the TIFF library can be obtained from http://remotesensing.org/libtiff.
- Use the
configure
script to generate the required build files. C++ support should be enabled. Additionally, disable JPEG support unless you are willing to install JPEG libraries as well. Example:$ ./configure --prefix=<my_install_path> --disable-zlib --disable-jpeg --enable-cxx
- Compile the source with
make
:$ make
- Install the library at your specified path
<my_install_path>
:$ make install