-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
1,258 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
#it is prounouced eye-gore | ||
makefiles+=local/Make.defs.igor | ||
USE_HDF=TRUE | ||
PROTO_HOME=/home/dtgraves/_proto/proto | ||
USE_PROTO=TRUE | ||
OPENMPCC=TRUE | ||
USE_HDF=FALSE | ||
USE_MF=TRUE | ||
USE_EB=TRUE | ||
USE_64=TRUE | ||
CXX=g++ | ||
CPP=cpp | ||
FC=gfortran | ||
HDFINCFLAGS = -I/home/graves/_hdf5/include | ||
HDFLIBFLAGS = -L/home/graves/_hdf5/lib -lhdf5 -lhdf5_hl -ldl -lz | ||
HDFMPIINCFLAGS= -I/home/graves/_hdf5/include | ||
HDFMPILIBFLAGS= -L/home/graves/_hdf5/lib -lhdf5 -lhdf5_hl -ldl -lz | ||
HDFINCFLAGS = -I/home/dtgraves/_hdf5/include | ||
HDFLIBFLAGS = -L/home/dtgraves/_hdf5/lib -lhdf5 -lhdf5_hl -ldl | ||
HDFMPIINCFLAGS= -I/home/dtgraves/_hdf5/include | ||
HDFMPILIBFLAGS= -L/home/dtgraves/_hdf5/lib -lhdf5 -lhdf5_hl -ldl | ||
|
||
|
||
ifeq ($(USE_PROTO),TRUE) | ||
XTRACPPFLAGS += -I$(PROTO_HOME)/include -DDIM=$(DIM) -DUSE_PROTO=1 -DPR_TURN_OFF_TIMERS=1 | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#ifdef CH_LANG_CC | ||
/* | ||
* _______ __ | ||
* / ___/ / ___ __ _ / / ___ | ||
* / /__/ _ \/ _ \/ V \/ _ \/ _ \ | ||
* \___/_//_/\___/_/_/_/_.__/\___/ | ||
* Please refer to Copyright.txt, in Chombo's root directory. | ||
*/ | ||
#endif | ||
|
||
#ifndef _PROTOINTERFACE_H_ | ||
#define _PROTOINTERFACE_H_ | ||
|
||
#ifdef USE_PROTO | ||
#include "Proto.H" | ||
#endif | ||
#include "IntVect.H" | ||
#include "Box.H" | ||
#include "BaseFab.H" | ||
|
||
|
||
|
||
#ifdef USE_PROTO | ||
|
||
|
||
using Proto::Point; | ||
using Proto::BoxData; | ||
using Proto::Var; | ||
///these functions are meant to interface with the Proto language. | ||
namespace ProtoCh | ||
{ | ||
|
||
|
||
///get point from intvect | ||
extern Point getPoint( const IntVect& a_iv); | ||
|
||
/// gets proto box from chombo box | ||
extern Proto::Box getProtoBox( const Box& a_box); | ||
|
||
///get intvect from point | ||
extern IntVect getIntVect(const Point & a_pt); | ||
|
||
///get chombo box from proto box | ||
extern Box getBox(const Proto::Box & a_bx); | ||
|
||
/// | ||
template <typename T, int ncomp> | ||
void aliasBoxData(BoxData<T, ncomp> & a_boxdata, const BaseFab<T>& a_bfr, const int a_startcomp = 0) | ||
{ | ||
CH_assert( a_bfr.nComp() == (ncomp + a_startcomp)); | ||
Proto::Box region = getProtoBox(a_bfr.box()); | ||
a_boxdata.define(a_bfr.dataPtr(a_startcomp), region, ncomp); | ||
} | ||
|
||
|
||
} | ||
|
||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#ifdef CH_LANG_CC | ||
/* | ||
* _______ __ | ||
* / ___/ / ___ __ _ / / ___ | ||
* / /__/ _ \/ _ \/ V \/ _ \/ _ \ | ||
* \___/_//_/\___/_/_/_/_.__/\___/ | ||
* Please refer to Copyright.txt, in Chombo's root directory. | ||
*/ | ||
#endif | ||
|
||
#include "ProtoInterface.H" | ||
#include "SPACE.H" | ||
#include "UsingNamespace.H" | ||
|
||
#ifdef USE_PROTO | ||
|
||
///get point from intvect | ||
Point | ||
ProtoCh::getPoint( const IntVect& a_iv) | ||
{ | ||
Point retval; | ||
for(int idir = 0; idir < SpaceDim; idir++) | ||
{ | ||
retval[idir] = a_iv[idir]; | ||
} | ||
return retval; | ||
|
||
} | ||
|
||
/// gets proto box from chombo box | ||
Proto::Box | ||
ProtoCh::getProtoBox( const Box& a_box) | ||
{ | ||
Point ptlo = getPoint(a_box.smallEnd()); | ||
Point pthi = getPoint(a_box.bigEnd()); | ||
return Proto::Box(ptlo, pthi); | ||
} | ||
|
||
///get intvect from point | ||
IntVect | ||
ProtoCh::getIntVect(const Point & a_pt) | ||
{ | ||
IntVect retval; | ||
for(int idir = 0; idir < SpaceDim; idir++) | ||
{ | ||
retval[idir] = a_pt[idir]; | ||
} | ||
return retval; | ||
} | ||
|
||
///get chombo box from proto box | ||
Box | ||
ProtoCh::getBox(const Proto::Box & a_bx) | ||
{ | ||
IntVect ivlo = getIntVect(a_bx.low()); | ||
IntVect ivhi = getIntVect(a_bx.high()); | ||
return Box(ivlo, ivhi); | ||
} | ||
|
||
|
||
|
||
#endif | ||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
\documentclass[12pt,a4paper]{article} | ||
\title{Chombo/Proto Poisson example } | ||
\date{} | ||
\begin{document} | ||
\maketitle | ||
|
||
\begin{abstract} | ||
|
||
Given a charge distribution $\rho$, and a field $\phi$ | ||
the spatial Helmoltz equation is given by | ||
\begin{equation} | ||
(\alpha I + \beta \nabla) \phi = \rho. | ||
\end{equation} | ||
where $\alpha$ and $\beta$ are constants. | ||
The Chombo Proto example solves the spatial Helmholtz equation in two | ||
or three dimensions using geometric multigrid with standard V-cycles. | ||
|
||
We present the performance for a single level calculation on a single | ||
node of a Cori Haswell node. The boundary conditions are periodic | ||
and the charge distribution has compact support of $r = 0.2$. | ||
Further parameters are as follows. | ||
\begin{itemize} | ||
\item Identity coefficient, $\alpha = 1$. | ||
\item Laplacian coefficient, $\beta = -0.1$. | ||
\item Number of smoothings per relaxation, $n_{s} = 4$. | ||
\item Grid dimensions = $512^3$. | ||
\item Domain size $L_x=L_y=L_z =1$. | ||
\end{itemize} | ||
|
||
All calculations are done with a varying number of threads, keeping | ||
the number of computational units constant. If $N_t$ is the number | ||
of OpenMP threads and $N_m$ is the number of MPI processes, for all | ||
calculations, $N_t N_m = 32$. Floating point rates are calculated as | ||
a post-processing step. | ||
|
||
\end{abstract} | ||
|
||
|
||
\begin{table}[h] | ||
\begin{center} | ||
\begin{tabular}{|c|c||c|c|} \hline | ||
$N_t$ & $N_m$ & $T_{vcycle}$ & $F_{resid}$ \\ | ||
\hline | ||
1 & 32 & 1.223 & 78.1 GFlop \\ | ||
2 & 16 & 2.450 & 39.0 GFlop \\ | ||
4 & 8 & 2.480 & 30.6 GFlop \\ | ||
8 & 4 & 2.334 & 18.4 GFlop \\ | ||
16 & 2 & 2.695 & 10.5 GFlop \\ | ||
32 & 1 & 2.361 & 6.5 MFlop \\ | ||
\hline | ||
\end{tabular} | ||
\end{center} | ||
\caption{AMRPoisson performance. } | ||
\label{fig::solut2dl0} | ||
\end{table} | ||
|
||
|
||
\begin{table}[h] | ||
\begin{center} | ||
\begin{tabular}{|c|c||c|c|} \hline | ||
$N_t$ & $N_m$ & $T_{vcycle}$ & $F_{resid}$ \\ | ||
\hline | ||
1 & 32 & 3.89 & 20.1 GFlop\\ | ||
2 & 16 & 6.53 & 12.7 GFlop\\ | ||
4 & 8 & 6.47 & 12.6 GFlop\\ | ||
8 & 4 & 6.27 & 12.6 GFlop\\ | ||
16 & 2 & 6.00 & 12.6 GFlop\\ | ||
32 & 1 & 5.85 & 12.7 GFlop\\ | ||
\hline | ||
\end{tabular} | ||
\end{center} | ||
\caption{7 point stencil proto performance. Same stencil as AMRPoisson} | ||
\label{fig::solut2dl0} | ||
\end{table} | ||
|
||
|
||
\begin{table}[h] | ||
\begin{center} | ||
\begin{tabular}{|c|c||c|c|} \hline | ||
$N_t$ & $N_m$ & $T_{vcycle}$ & $F_{resid}$\\ | ||
\hline | ||
1 & 32 & 12.4 & 22.9 GFlop\\ | ||
2 & 16 & 20.7 & 14.7 GFlop\\ | ||
4 & 8 & 20.7 & 14.4 GFlop\\ | ||
8 & 4 & 19.7 & 14.7 GFlop\\ | ||
16 & 2 & 18.8 & 14.9 GFlop\\ | ||
32 & 1 & 18.6 & 14.9 GFlop\\ | ||
\hline | ||
\end{tabular} | ||
\end{center} | ||
\caption{27 point stencil proto performance. } | ||
\label{fig::solut2dl0} | ||
\end{table} | ||
|
||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
ebase = Multigrid | ||
|
||
# the location of the Chombo "lib" directory | ||
CHOMBO_HOME = ../../../../lib | ||
|
||
# names of Chombo libraries needed by this program, in order of search. | ||
LibNames = BoxTools | ||
|
||
# the locations of the source code directories | ||
base_dir = . | ||
src_dirs = ../src | ||
|
||
|
||
# input file for 'run' target | ||
INPUT = regression.inputs | ||
# shared code for building example programs | ||
include $(CHOMBO_HOME)/mk/Make.example | ||
|
||
# application-specific variables | ||
|
||
# application-specific targets |
Oops, something went wrong.