Commit 0371d436 authored by DOE CODE's avatar DOE CODE Committed by Tim Sowers
Browse files

Initial commit.

parents
# This is a global Makefile containg some compilation shortcuts.
# All the effective Makefiles are located in the different subdirectories.
# C++ compiler: standard choice is g++, the GNU C++ compiler.
CC=g++
MPICC=mpiCC
export CC
export MPICC
# C++ compiler flags. Unless you have changed the compiler, you probably don't
# need to change this
CPPFLAGS=-Wall -g -std=c++0x -fopenmp -O3
export CPPFLAGS
# Libraries: if these libraries are installed system-wide, and the library path
# is correctly set, you may not need to set the path with the -L directive.
# N.B. Under the KUBUNTU distribution, we have observed that the link to the
# GSL_BLAS library had to be explicitly included. The program will not
# build with -lgsl alone.
#LAPACK_LIB=-lgfortran -llapack -lblas
LAPACK_LIB=-L/usr/lib -lgfortran -llapack -lblas
#GSL_LIB=-lgsl -lgslblas
GSL_LIB=-lgsl
export LAPACK_LIB
export GSL_LIB
# Choice of the solver
# Possible solvers are: SOLVER_QMR
SOLVER=SOLVER_QMR
export SOLVER
# Nothing should be changed below unless you know what you are doing.
SRCDIR=./src
TESTSDIR=./tests/src
TOOLSDIR=./tools
DOCDIR=./doc/DoxygenDoc
all: Solver Tools Tests Doc
Solver:
$(MAKE) -C $(SRCDIR)
Tests:
$(MAKE) -C $(TESTSDIR)
Tools: buildImpulsedState \
buildWavePacket \
calcInitEigenStates \
pRefine
Doc:
$(MAKE) -C $(DOCDIR)
buildImpulsedState:
$(MAKE) -C $(TOOLSDIR)/buildImpulsedState
buildWavePacket:
$(MAKE) -C $(TOOLSDIR)/buildWavePacket
pRefine:
$(MAKE) -C $(TOOLSDIR)/pRefine
calcInitEigenStates:
$(MAKE) -C $(TOOLSDIR)/calcInitEigenStates
clean:
$(MAKE) clean -C $(SRCDIR)
$(MAKE) clean -C $(TESTSDIR)
$(MAKE) clean -C $(DOCDIR)
$(MAKE) clean -C $(TOOLSDIR)/buildImpulsedState
$(MAKE) clean -C $(TOOLSDIR)/buildWavePacket
$(MAKE) clean -C $(TOOLSDIR)/calcInitEigenStates
$(MAKE) clean -C $(TOOLSDIR)/pRefine
-------------------------------------------------------------------------
| FINITE ELEMENT SOLVER FOR FISSION DYNAMICS |
-------------------------------------------------------------------------
A. OVERVIEW
========
Felix is a software package to solve the equations of the time-dependent
generator coordinate method (TDGCM) in N-dimensions (N>=1) under the Gaussian
overlap approximation. The TDGCM solver included in the package uses finite
element analysis and is written entirely in C++. Several additional tools, some
in C++, some in Python and some in bash scripting language, are also included
for convenience. The Felix package has only been tested in a Linux environment.
The package contains
- this "README" file;
- a "Makefile" for the installation;
- src/: C++ source files of the TDGCM solver and of several tools;
- tools/: additional C++, python or shell tools to handle the inputs and
outputs of the TDGCM solver;
- tests/: unitary test suite of the C++ classes and a global testbench of the
TDGCM solver;
- benchmarks/: a few preset inputs and their corresponding outputs;
- doc/: DoxyGen documentation of the package.
The full Felix package depends on several standard Open Source libraries:
- The TDGCM solver itself requires BLAS, LAPACK, and a Fortran compiler with
OpenMP support
- The documentation requires DoxyGen-1.8.6 or higher
- For the full set of tools, the user must also install GSL, PETSc, SLEPc and
Boost. In particular, the environment variables PETSC_DIR, PETSC_ARCH,
SLEPC_DIR and SLEPC_ARCH must be set.
These various libraries may be installed from the package manager of your
favorite Linux distribution if you have root access. They may also be compiled
directly from their source if you have only user access; refer to the following
websites for compilation instructions:
- BLAS, LAPACK: http://www.netlib.org/lapack/
- Doxygen: http://www.stack.nl/~dimitri/doxygen/manual/install.html
- GSL: http://www.gnu.org/software/gsl/
- PETSc: http://www.mcs.anl.gov/petsc/
- SLEPc: http://www.grycap.upv.es/slepc/
- Boost: http://www.boost.org/doc/libs/1_54_0/libs/test/doc/html/index.html
Most of the time, these libraries are installed and available on leadership
computing facilities.
B. THE TDGCM SOLVER
================
1) Installation
------------
- Dependencies: BLAS, LAPACK, Fortran compiler with openmp support
- Executable: src/tdgcmFE
In the root directory of the Felix package, type
make Solver
The executable is called 'tdgcmFE' is located in src/
2) First run
---------
The directory tests/ contains several sets of inputs that can be used to test
the TDGCM solver. We show below how to run the test that corresponds to the
time-evolution of a wave-packet in a 1D harmonic oscillator potential. In the
directory 'tests/inputs/HO1D/', run
../../../src/tdgcmFE -f sol1plus2 -m 1000
This will run 1000 time iterations of the solver with the "sol1plus2" input
dataset. Basic information about the run is printed on the standard output and
should look like this:
------------- TDGCM-FE v-develop -------------
Nbr of threads= 1
Creating output directories... [OK]
=> Parsing input files...
Nbr of nodes= 801
dim = 1
Building Mesh
Building Field
Parsing .init [OK]
=> Processing the map...
Nbr of nodes in the mesh boundary= 2
Determining the frontier line [OK]
Frontier size= 0
Opposite frontier size= 0
Filling M matrix... [OK]
Filling H matrix... [OK]
Absorbtion zone width= -1
Nbr of nodes in the absorbtion zone= 0
Filling A matrix... [OK]
=> Pre-calculations for the flux
=> Initialize the time loop
Initial norm2 = 0.9996716076
Normalizing initial wave packet [OK]
Initial energy = 13.17993316
Matrix inversion tolerance (with Hermitian norm)= 3.279727037e-12
Initialize QMR solver... [OK]
=> Begin iterations...
[ 0] t=0.000e+00 e_it=0.00000000e+00 n_it=0 e_n=0.00000000e+00 n=1.00000000e+00
[ 100] t=1.000e-02 e_it=1.38060882e-12 n_it=11 e_n=-2.23043806e-13 n=1.00000000e+00
[ 200] t=2.000e-02 e_it=7.03666126e-13 n_it=11 e_n=-6.20281604e-13 n=1.00000000e+00
[ 300] t=3.000e-02 e_it=5.79630628e-14 n_it=17 e_n=-1.78290716e-12 n=1.00000000e+00
[ 400] t=4.000e-02 e_it=5.54384179e-13 n_it=18 e_n=-3.09419157e-12 n=1.00000000e+00
[ 500] t=5.000e-02 e_it=1.49262577e-14 n_it=19 e_n=-4.61308769e-12 n=1.00000000e+00
[ 600] t=6.000e-02 e_it=1.85812749e-12 n_it=18 e_n=-6.25099972e-12 n=1.00000000e+00
[ 700] t=7.000e-02 e_it=4.71459450e-13 n_it=17 e_n=-8.22997226e-12 n=1.00000000e+00
[ 800] t=8.000e-02 e_it=9.55534698e-15 n_it=18 e_n=-1.01272324e-11 n=1.00000000e+00
[ 900] t=9.000e-02 e_it=3.00350546e-12 n_it=17 e_n=-1.20289334e-11 n=1.00000000e+00
[ 1000] t=1.000e-01 e_it=1.53445100e-12 n_it=16 e_n=-1.43725032e-11 n=1.00000000e+00
3) Running the code
----------------
The code uses as inputs a set of datafiles with a common prefix and different
extensions.
Mandatory input files:
- *.coor ...: unsorted list giving the coordinate of the points defining the
potential energy surface (PES);
- *.geo ....: structural data needed to construct the finite element
representation of the PES;
- *.init ...: the real and imaginary part of the initial wave-function at
each simplex;
- *.val ....: the value of the potential and of the inertia tensor at each
point of the PES.
Optional input files:
- *.opt ....: list of options to run the code
- *.front ..: list of vertices defining the frontier used to compute the
time integrated flux of the collective wave-packet
In the example discussed above, the common prefix is 'sol1plus2', and the
actual files are, therefore, 'sollplus2.coor', 'sollplus2.front', etc.
Assuming the executable and all input files are in the same directory, the code
is run with
./tdgcmFe [options] -f inputPrefix
To see the list of all available options, run
./tdgcmFE --help
Results of the calculations are recorded in the directory './results'; If this
directory does not exist, the code will create it. The './results' directory
contains two subdirectories './results/flux/' and './results/gFunction/' which
contain, respectively, the time-integrated flux of the wave-packet across a
frontier and the real and imaginary part of the collective wave-function at
different timesteps.
By default, the solver uses every available core on the machine. As usual, the
number of OpenMP threads can be controlled by setting the environnement
variable 'OMP_NUM_THREADS'. For example, to test the solver with only on 1
core, type in the current session
export OMP_NUM_THREADS=1
C. TOOLS
=====
All the tools are located in the directory './tools/'. They are written in C++,
Python-2, or bash shell scripting language. Only the C++ tools need to be
compiled. Each of them can be compiled independently by going into the
directory './tools/toolName/' and typing
make
where 'toolName' is one of 'buildImpulsedState', 'buildWavePacket',
'calcInitEigenStates', 'cropField', 'pRefine'. Note that the tool
'calcInitEigenStates', relies on the PETSc, SLEPc and GSL libraries. The
environment variables PETSC_DIR, PETSC_ARCH, SLEPC_DIR and SLEPC_ARCH must be
set to their proper value for the tool to compile.
If all the libraries in Section I are available, you can build all the tools at
once by typing
make Tools
D. UNITARY TESTS
=============
1) Installation
------------
- Dependencies: LAPACK, gfortran, OpenMP, slepc, petsc, gsl, xerces-c,
boost_unit_test_framework
- Executable: tests/tdgcmFeTest
The test suite requires additional libraries. Most notably, the slepc, petsc
and gsl libraries are all required by the tool calcInitEigenStates which is
tested by the suite. Moreover, the test suite is built on the Boost-1.54
framework of unitary tests and thus relies on the library
boost_unit_test_framework.
If all these different libraries are properly installed on your system, the
test suite may be compiled from the main directory by typing:
make Tests
For any custom compilation, you can also modify the file "tests/src/Makefile".
2) Run
---
The test suite is divided in two main branches:
- A "unit" test suite testing the behaviour of several methods of the
classes present in the "src" directory. Its execution time must be of the
order of a minute. This suite is meant to be be runned after any new
developement step in the code. Ideally, any new developement in the code
should also be accompanied with its new unitary tests to be added in the
suite.
- A "physics" test suite that checks the global behaviour of the solver for
a list of benchmarks. The input files of the benchmarks are stored in the
"tests/inputs/*" directories. The execution time of this test suite is of
the order of several hours when only one core is used.
The commands to run the test suites from the main directory are:
./tests/src/tdgcmFeTest --run_test=unit
./tests/src/tdgcmFeTest --run_test=physics -wf
A handfull of options from the Boost test framework can be applied.
Check the available options at http://www.boost.org/doc/libs/1_54_0/libs/test/doc/html/index.html.
In addition, the default behaviour of the "physics" test suite is to remove the
results directories of the benchmarks. If the write files flag "-wf" is added
to the command line, then all these temporary directories will be conserved.
\ No newline at end of file
-40
-39.9
-39.8
-39.7
-39.6
-39.5
-39.4
-39.3
-39.2
-39.1
-39
-38.9
-38.8
-38.7
-38.6
-38.5
-38.4
-38.3
-38.2
-38.1
-38
-37.9
-37.8
-37.7
-37.6
-37.5
-37.4
-37.3
-37.2
-37.1
-37
-36.9
-36.8
-36.7
-36.6
-36.5
-36.4
-36.3
-36.2
-36.1
-36
-35.9
-35.8
-35.7
-35.6
-35.5
-35.4
-35.3
-35.2
-35.1
-35
-34.9
-34.8
-34.7
-34.6
-34.5
-34.4
-34.3
-34.2
-34.1
-34
-33.9
-33.8
-33.7
-33.6
-33.5
-33.4
-33.3
-33.2
-33.1
-33
-32.9
-32.8
-32.7
-32.6
-32.5
-32.4
-32.3
-32.2
-32.1
-32
-31.9
-31.8
-31.7
-31.6
-31.5
-31.4
-31.3
-31.2
-31.1
-31
-30.9
-30.8
-30.7
-30.6
-30.5
-30.4
-30.3
-30.2
-30.1
-30
-29.9
-29.8
-29.7
-29.6
-29.5
-29.4
-29.3
-29.2
-29.1
-29
-28.9
-28.8
-28.7
-28.6
-28.5
-28.4
-28.3
-28.2
-28.1
-28
-27.9
-27.8
-27.7
-27.6
-27.5
-27.4
-27.3
-27.2
-27.1
-27
-26.9
-26.8
-26.7
-26.6
-26.5
-26.4
-26.3
-26.2
-26.1
-26
-25.9
-25.8
-25.7
-25.6
-25.5
-25.4
-25.3
-25.2
-25.1
-25
-24.9
-24.8
-24.7
-24.6
-24.5
-24.4
-24.3
-24.2
-24.1
-24
-23.9
-23.8
-23.7
-23.6
-23.5
-23.4
-23.3
-23.2
-23.1
-23
-22.9
-22.8
-22.7
-22.6
-22.5
-22.4
-22.3
-22.2
-22.1
-22
-21.9
-21.8
-21.7
-21.6
-21.5
-21.4
-21.3
-21.2
-21.1
-21
-20.9
-20.8
-20.7
-20.6
-20.5
-20.4
-20.3
-20.2
-20.1
-20
-19.9
-19.8
-19.7
-19.6
-19.5
-19.4
-19.3
-19.2
-19.1
-19
-18.9
-18.8
-18.7
-18.6
-18.5
-18.4
-18.3
-18.2
-18.1
-18
-17.9
-17.8
-17.7
-17.6
-17.5
-17.4
-17.3
-17.2
-17.1
-17
-16.9
-16.8
-16.7
-16.6
-16.5
-16.4
-16.3
-16.2
-16.1
-16
-15.9
-15.8
-15.7
-15.6
-15.5
-15.4
-15.3
-15.2
-15.1
-15
-14.9
-14.8
-14.7
-14.6
-14.5
-14.4
-14.3
-14.2
-14.1
-14
-13.9
-13.8
-13.7
-13.6
-13.5
-13.4
-13.3
-13.2
-13.1
-13
-12.9
-12.8
-12.7
-12.6
-12.5
-12.4
-12.3
-12.2
-12.1
-12
-11.9
-11.8
-11.7
-11.6
-11.5
-11.4
-11.3
-11.2
-11.1
-11
-10.9
-10.8
-10.7
-10.6
-10.5
-10.4
-10.3
-10.2
-10.1
-10
-9.9
-9.8
-9.7
-9.6
-9.5
-9.4
-9.3
-9.2
-9.1
-9
-8.9
-8.8
-8.7
-8.6
-8.5
-8.4
-8.3
-8.2
-8.1
-8
-7.9
-7.8
-7.7
-7.6
-7.5
-7.4
-7.3
-7.2
-7.1
-7
-6.9
-6.8
-6.7
-6.6
-6.5
-6.4