Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ProfugusMC
ProfugusMC
Commits
02d57448
Commit
02d57448
authored
Mar 01, 2018
by
Hamilton, Steven P
Browse files
Removing references to SPN.
parent
d3744e56
Changes
10
Hide whitespace changes
Inline
Side-by-side
README.rst
View file @
02d57448
...
...
@@ -23,7 +23,6 @@ to be useful as proof-of-concept for actual production work.
Profugus
is
also
used
as
a
test
-
bed
mini
-
app
for
the
ASCR
projects
XPRESS
and
MCREX
.
Profugus
Development
Team
=========================
...
...
@@ -61,10 +60,6 @@ Profugus Packages
Profugus
constains
the
following
code
mini
-
apps
:
**
SPn
**
Mini
-
app
of
Simplified
Spherical
Harmonics
(
"SPn"
)
computational
kernel
.
**
MC
**
Mini
-
app
of
Monte
Carlo
computational
kernel
.
...
...
@@ -103,12 +98,8 @@ Building The Code
The
most
straightforward
method
for
building
Profugus
is
to
use
the
scripts
in
`
Profugus
/
install
`.
Profugus
uses
the
`
TriBITS
`
build
system
.
This
system
is
a
set
of
package
-
based
extensions
to
standard
cmake
.
So
,
first
you
need
to
obtain
*
Trilinos
*
and
*
TriBITS
*
and
put
them
in
your
top
-
level
Profugus
directory
::
>
cd
Profugus
>
git
clone
https
://
github
.
com
/
TriBITSPub
/
TriBITS
.
git
>
ln
-
s
$
PATH_TO_TRILINOS
.
cmake
.
The
components
of
TriBITS
and
Trilinos
that
are
required
are
included
in
the
Profugus
distribution
.
The
preferred
mechanism
for
using
the
build
scripts
is
to
make
a
*
target
*
directory
where
the
build
is
to
be
performed
::
...
...
@@ -131,9 +122,6 @@ configure time) are specified in the `install/base.cmake`::
##---------------------------------------------------------------------------##
#
Default
build
all
packages
SET
(
Profugus_ENABLE_Utils
ON
CACHE
BOOL
""
)
SET
(
Profugus_ENABLE_Matprop
ON
CACHE
BOOL
""
)
SET
(
Profugus_ENABLE_SPn
ON
CACHE
BOOL
""
)
SET
(
Profugus_ENABLE_MC
ON
CACHE
BOOL
""
)
#
Turn
on
tests
...
...
@@ -145,101 +133,31 @@ configure time) are specified in the `install/base.cmake`::
SET
(
Profugus_ENABLE_ALL_OPTIONAL_PACKAGES
ON
CACHE
BOOL
""
)
SET
(
Profugus_ENABLE_SECONDARY_STABLE_CODE
ON
CACHE
BOOL
""
)
#
Up
the
max
num
procs
SET
(
MPI_EXEC_MAX_NUMPROCS
8
CACHE
STRING
""
)
#
Turn
off
binutils
SET
(
Teuchos_ENABLE_BinUtils
OFF
CACHE
BOOL
""
)
#
Turn
off
Zoltan2
SET
(
Profugus_ENABLE_Zoltan2
OFF
CACHE
BOOL
""
)
#
Compiler
options
SET
(
BUILD_SHARED_LIBS
ON
CACHE
BOOL
""
)
SET
(
CMAKE_CXX_FLAGS
"-std=c++11 -Wno-deprecated-declarations"
CACHE
STRING
""
)
SET
(
Profugus_ENABLE_CXX11
:
BOOL
=
ON
)
#
TriBITS
stuff
SET
(
Profugus_ENABLE_INSTALL_CMAKE_CONFIG_FILES
OFF
CACHE
BOOL
""
)
SET
(
Profugus_DEPS_XML_OUTPUT_FILE
""
CACHE
FILEPATH
""
)
By
default
,
all
of
the
packages
inside
of
Profugus
are
turned
on
.
Furthermore
,
*
C
++-
11
*
is
**
required
**.
The
default
options
specify
the
appropriate
compiler
flags
for
gcc
.
The
tests
are
also
turned
on
by
default
;
to
disable
tests
in
any
upstream
package
simply
do
not
explicitly
*
ENABLE
*
that
package
.
For
example
,
to
build
the
*
SPn
*
explicitly
*
ENABLE
*
that
package
.
For
example
,
to
build
the
*
MC
*
package
and
all
of
its
tests
but
only
include
required
*
source
*
from
upstream
packages
,
the
user
would
specify
::
SET
(
Profugus_ENABLE_
SPn
ON
CACHE
BOOL
""
)
SET
(
Profugus_ENABLE_
MC
ON
CACHE
BOOL
""
)
In
this
case
,
only
the
pieces
of
*
Utils
*
needed
to
build
*
SPn
*
are
In
this
case
,
only
the
pieces
of
*
Utils
*
needed
to
build
*
MC
*
are
compiled
.
All
tests
can
be
turned
off
by
setting
**
Profugus_ENABLE_TESTS
**
to
**
OFF
**.
The
`
install
`
directory
contains
several
build
scripts
that
are
all
suffixed
by
the
platform
name
.
For
example
,
to
build
on
a
Linux
*
x86_64
*
system
the
"install/cmake_x86_64.sh"
script
can
be
used
::
#
!/bin/sh
##---------------------------------------------------------------------------##
##
CMAKE
FOR
X86_64
##---------------------------------------------------------------------------##
#
CLEANUP
rm
-
rf
CMakeCache
.
txt
rm
-
rf
CMakeFiles
#
SOURCE
AND
INSTALL
SOURCE
=<
SET_SOURCE_DIR
>
INSTALL
=<
SET_INSTALL_DIR
>
#
BUILD
OPTIONS
BUILD
=
"DEBUG"
MPI
=
"ON"
#
TPL
PATHS
HDF5_PATH
=
"/vendors/hdf5_parallel"
MPI_PATH
=
"/opt/openmpi/gcc/current"
##---------------------------------------------------------------------------##
cmake
\
-
DCMAKE_BUILD_TYPE
:
STRING
=
"$BUILD"
\
-
DTPL_ENABLE_MPI
:
BOOL
=$
MPI
\
-
DCMAKE_INSTALL_PREFIX
:
PATH
=$
INSTALL
\
\
-
DMPI_BASE_DIR
:
PATH
=$
MPI_PATH
\
\
-
DTPL_ENABLE_HDF5
:
BOOL
=
ON
\
-
DHDF5_INCLUDE_DIRS
:
PATH
=$
HDF5_PATH
/
include
\
-
DHDF5_LIBRARY_DIRS
:
PATH
=$
HDF5_PATH
/
lib
\
\
-
DBLAS_LIBRARY_DIRS
:
PATH
=/
vendors
/
gcc
/
atlas
/
lib
\
-
DLAPACK_LIBRARY_DIRS
:
PATH
=/
vendors
/
gcc
/
atlas
/
lib
\
-
DBLAS_LIBRARY_NAMES
:
STRING
=
"f77blas;cblas;atlas"
\
-
DLAPACK_LIBRARY_NAMES
:
STRING
=
"lapack"
\
\
-
DProfugus_CONFIGURE_OPTIONS_FILE
:
FILEPATH
=
"${SOURCE}/install/base.cmake"
\
-
DProfugus_ASSERT_MISSING_PACKAGES
:
BOOL
=
OFF
\
\
${
SOURCE
}
##---------------------------------------------------------------------------##
##
end
of
cmake_x86_64
.
sh
##---------------------------------------------------------------------------##
The
source
and
install
locations
must
be
set
.
Also
,
to
enable
a
optimized
build
set
**
BUILD
**
to
**
RELEASE
**.
Adjust
the
paths
and
libraries
for
LAPACK
to
fit
your
platform
.
The
example
assumes
that
the
ATLAS
LAPACK
is
available
.
Any
standard
LAPACK
distribution
will
work
.
HDF5
is
**
not
**
required
,
to
build
/
run
/
test
the
applications
;
however
,
problem
output
will
be
severely
curtailed
if
a
parallel
HDF5
option
is
not
provided
.
If
HDF5
is
not
available
,
setting
::
-
DTPL_ENABLE_HDF5
:
BOOL
=
OFF
\
will
disable
HDF5
.
suffixed
by
the
platform
name
.
The
source
and
install
locations
must
be
set
.
Also
,
to
enable
a
optimized
build
set
**
BUILD
**
to
**
RELEASE
**.
Adjust
the
paths
and
libraries
for
LAPACK
to
fit
your
platform
.
The
example
assumes
that
the
ATLAS
LAPACK
is
available
.
Any
standard
LAPACK
distribution
will
work
.
To
complete
the
configuration
,
execute
this
script
inside
the
*
target
*
directory
and
then
make
/
test
/
install
::
...
...
TPLsList.cmake
View file @
02d57448
...
...
@@ -11,7 +11,6 @@
# Trilinos/cmake/TrilinosTPLs.cmake
#
SET
(
Profugus_TPLS_FINDMODS_CLASSIFICATIONS
SILO
"cmake/TPLs/"
SS
HDF5
"cmake/TPLs/"
SS
)
...
...
packages/MC/CMakeLists.txt
View file @
02d57448
...
...
@@ -24,13 +24,6 @@ TRIBITS_PACKAGE(MC)
## B) Set up package-specific options
##---------------------------------------------------------------------------##
## ML OPTIONS
## Turn on ML if that package is enabled
IF
(
${
PROJECT_NAME
}
_ENABLE_ML
)
SET
(
USE_ML 1
)
ENDIF
()
# Setup M4 for FORTRAN processing
APPEND_SET
(
CMAKE_MODULE_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
...
...
@@ -240,5 +233,5 @@ TRIBITS_EXCLUDE_AUTOTOOLS_FILES()
TRIBITS_PACKAGE_POSTPROCESS
()
##---------------------------------------------------------------------------##
## end of
Utils
/CMakeLists.txt
## end of
MC
/CMakeLists.txt
##---------------------------------------------------------------------------##
packages/MC/cmake/Dependencies.cmake
View file @
02d57448
...
...
@@ -11,7 +11,7 @@
SET
(
LIB_REQUIRED_DEP_PACKAGES
Teuchos Matprop Utils
)
SET
(
LIB_OPTIONAL_DEP_PACKAGES CudaUtils
Epetra SPn
)
SET
(
LIB_OPTIONAL_DEP_PACKAGES CudaUtils
)
SET
(
TEST_REQUIRED_DEP_PACKAGES
)
SET
(
TEST_OPTIONAL_DEP_PACKAGES
)
...
...
packages/MC/mc/test/CMakeLists.txt
View file @
02d57448
...
...
@@ -5,7 +5,7 @@
##---------------------------------------------------------------------------##
## Copyright (C) 2014 Oak Ridge National Laboratory, UT-Battelle, LLC.
##---------------------------------------------------------------------------##
## CMAKE for
spn
## CMAKE for
MC
##---------------------------------------------------------------------------##
INCLUDE
(
UtilsTest
)
...
...
packages/MC/mc/test/mesh4x4.xml
View file @
02d57448
<?xml version='1.0' encoding='ASCII'?>
<ParameterList
name=
"profugus
SPN
input"
>
<ParameterList
name=
"profugus
MC
input"
>
<ParameterList
name=
"CORE"
>
<Parameter
name=
"axial list"
type=
"Array(string)"
value=
"{core}"
/>
<Parameter
name=
"axial height"
type=
"Array(double)"
value=
"{0.25}"
/>
...
...
@@ -19,7 +19,6 @@
<Parameter
name=
"axial mesh"
type=
"Array(int)"
value=
"{1}"
/>
<Parameter
name=
"symmetry"
type=
"string"
value=
"full"
/>
<Parameter
name=
"Pn_order"
type=
"int"
value=
"0"
/>
<Parameter
name=
"SPn_order"
type=
"int"
value=
"3"
/>
<Parameter
name=
"problem_name"
type=
"string"
value=
"acceleration"
/>
</ParameterList>
</ParameterList>
packages/MC/mc_driver/mc.cc
View file @
02d57448
...
...
@@ -3,7 +3,7 @@
* \file mc_driver/mc.cc
* \author Thomas M. Evans
* \date Wed Mar 12 22:24:55 2014
* \brief
SPn
Mini-App executable.
* \brief
MC
Mini-App executable.
* \note Copyright (C) 2014 Oak Ridge National Laboratory, UT-Battelle, LLC.
*/
//---------------------------------------------------------------------------//
...
...
packages/MC/sim_ce/Composition.hh
deleted
100644 → 0
View file @
d3744e56
//---------------------------------*-C++-*-----------------------------------//
/*!
* \file MC/sim_ce/Composition.hh
* \author Thomas M Evans
* \date Fri Jan 08 15:23:48 2016
* \brief Composition class declaration.
* \note Copyright (c) 2016 Oak Ridge National Laboratory, UT-Battelle, LLC.
*/
//---------------------------------------------------------------------------//
#ifndef MC_sim_ce_Composition_hh
#define MC_sim_ce_Composition_hh
#include <cstdint>
#include <vector>
#include "harness/DBC.hh"
namespace
profugus
{
//===========================================================================//
/*!
* \class Composition
* \brief Simple composition definition for simulated CE data.
*/
/*!
* \example sim_ce/test/tstComposition.cc
*
* Test of Composition.
*/
//===========================================================================//
class
Composition
{
public:
//@{
//! Typedefs.
using
size_t
=
std
::
uint32_t
;
using
Vec_Zaids
=
std
::
vector
<
size_t
>
;
using
Vec_Dbl
=
std
::
vector
<
double
>
;
//@}
private:
// ZAID.
Vec_Zaids
d_zaids
;
// Number density (/barn-cm).
Vec_Dbl
d_N
;
public:
Composition
()
=
default
;
//! Add zaids and number densities.
void
add
(
Vec_Zaids
zaids
,
Vec_Dbl
num_den
)
{
d_zaids
=
std
::
move
(
zaids
);
d_N
=
std
::
move
(
num_den
);
}
//! Number of nuclides.
size_t
num_nuclides
()
const
{
return
d_N
.
size
();
}
//@{
//! ZAID access.
const
Vec_Zaids
&
zaids
()
const
{
return
d_zaids
;
}
size_t
zaid
(
size_t
n
)
const
{
REQUIRE
(
n
<
d_zaids
.
size
());
return
d_zaids
[
n
];
}
//@}
//@{
//! Number density access.
const
Vec_Dbl
&
number_dens
()
const
{
return
d_N
;
}
double
number_den
(
size_t
n
)
const
{
REQUIRE
(
n
<
d_N
.
size
());
return
d_N
[
n
];
}
//@}
};
}
// end namespace profugus
#endif // MC_sim_ce_Composition_hh
//---------------------------------------------------------------------------//
// end of MC/sim_ce/Composition.hh
//---------------------------------------------------------------------------//
packages/MC/sim_ce/test/CMakeLists.txt
deleted
100644 → 0
View file @
d3744e56
##---------------------------------------------------------------------------##
## File : MC/sim_ce/test/CMakeLists.txt
## Author: 9te
## Date : Mon Jan 11 14:58:03 2016
## Copyright (c) 2016 Oak Ridge National Laboratory, UT-Battelle, LLC.
##---------------------------------------------------------------------------##
## TriBITS package file for MC/sim_ce
##---------------------------------------------------------------------------##
ADD_UTILS_TEST
(
tstComposition.cc NP 1
)
##---------------------------------------------------------------------------##
## end of MC/sim_ce/test/CMakeLists.txt
##---------------------------------------------------------------------------##
packages/MC/sim_ce/test/tstComposition.cc
deleted
100644 → 0
View file @
d3744e56
//---------------------------------*-C++-*-----------------------------------//
/*!
* \file MC/sim_ce/test/tstComposition.cc
* \author Thomas M Evans
* \date Mon Jan 11 15:24:34 2016
* \brief Composition class definitions.
* \note Copyright (c) 2016 Oak Ridge National Laboratory, UT-Battelle, LLC.
*/
//---------------------------------------------------------------------------//
#include "../Composition.hh"
#include "gtest/utils_gtest.hh"
//---------------------------------------------------------------------------//
// Test fixture
//---------------------------------------------------------------------------//
class
CompositionTest
:
public
::
testing
::
Test
{
protected:
// >>> TYPEDEFS
using
Composition
=
profugus
::
Composition
;
using
Vec_Zaids
=
Composition
::
Vec_Zaids
;
using
Vec_Dbl
=
Composition
::
Vec_Dbl
;
protected:
void
SetUp
()
{
/* * */
}
protected:
// >>> DATA
};
//---------------------------------------------------------------------------//
// TESTS
//---------------------------------------------------------------------------//
TEST_F
(
CompositionTest
,
construction
)
{
Composition
a
,
b
;
// construct a
{
Vec_Zaids
z
=
{
1001
,
8016
};
Vec_Dbl
N
=
{
0.06684
,
0.03342
};
a
.
add
(
z
,
N
);
}
// construct b (with move)
{
Vec_Zaids
z
=
{
8016
,
92234
,
92235
,
92236
,
92238
};
Vec_Dbl
N
=
{
0.046227
,
7.49947e-06
,
0.000865724
,
3.96543e-06
,
0.0222363
};
b
.
add
(
std
::
move
(
z
),
std
::
move
(
N
));
}
EXPECT_EQ
(
2
,
a
.
num_nuclides
());
EXPECT_EQ
(
5
,
b
.
num_nuclides
());
Vec_Zaids
rza
=
{
1001
,
8016
};
Vec_Dbl
rNa
=
{
0.06684
,
0.03342
};
Vec_Zaids
rzb
=
{
8016
,
92234
,
92235
,
92236
,
92238
};
Vec_Dbl
rNb
=
{
0.046227
,
7.49947e-06
,
0.000865724
,
3.96543e-06
,
0.0222363
};
EXPECT_VEC_EQ
(
rza
,
a
.
zaids
());
EXPECT_VEC_EQ
(
rzb
,
b
.
zaids
());
EXPECT_VEC_EQ
(
rNa
,
a
.
number_dens
());
EXPECT_VEC_EQ
(
rNb
,
b
.
number_dens
());
for
(
int
n
=
0
;
n
<
2
;
++
n
)
{
EXPECT_EQ
(
rza
[
n
],
a
.
zaid
(
n
));
EXPECT_EQ
(
rNa
[
n
],
a
.
number_den
(
n
));
}
}
//---------------------------------------------------------------------------//
// end of MC/sim_ce/test/tstComposition.cc
//---------------------------------------------------------------------------//
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment