diff options
author | yye00 <yye00@fc86f234-e40e-4302-a95b-5e02f8c343c9> | 2004-04-13 18:34:13 +0000 |
---|---|---|
committer | yye00 <yye00@fc86f234-e40e-4302-a95b-5e02f8c343c9> | 2004-04-13 18:34:13 +0000 |
commit | c65bb5ac5c23ed40974b04313c311032be0d2914 (patch) | |
tree | 757aff59d5801425fa24ed943b98377d85dea13d | |
parent | 0f3067da5ca1ce987e498d43cc6986f6b22b5f36 (diff) |
PETSC Thorn
git-svn-id: http://svn.cactuscode.org/arrangements/CactusExternal/PETSc/trunk@2 fc86f234-e40e-4302-a95b-5e02f8c343c9
-rw-r--r-- | README | 9 | ||||
-rw-r--r-- | configuration.ccl | 10 | ||||
-rw-r--r-- | doc/documentation.tex | 144 | ||||
-rw-r--r-- | interface.ccl | 5 | ||||
-rw-r--r-- | param.ccl | 2 | ||||
-rwxr-xr-x | petsc.sh | 104 | ||||
-rw-r--r-- | schedule.ccl | 2 | ||||
-rw-r--r-- | src/make.code.defn | 8 |
8 files changed, 284 insertions, 0 deletions
@@ -0,0 +1,9 @@ +CVS info : $Header$ + +Cactus Code Thorn PETSC +Thorn Author(s) : Yaakoub Y El-Khamra <yye00@cc.lsu.edu> +Thorn Maintainer(s) : Yaakoub Y El-Khamra <yye00@cc.lsu.edu> +-------------------------------------------------------------------------- + +Purpose of the thorn: +This thorn implements PETSC by means of a configuration script. diff --git a/configuration.ccl b/configuration.ccl new file mode 100644 index 0000000..ad1ab64 --- /dev/null +++ b/configuration.ccl @@ -0,0 +1,10 @@ +# Configuration definitions for thorn PETSC +# $Header$ + +# NO_SOURCE + +PROVIDES PETSC +{ + SCRIPT petsc.sh + LANG sh +} diff --git a/doc/documentation.tex b/doc/documentation.tex new file mode 100644 index 0000000..74eb986 --- /dev/null +++ b/doc/documentation.tex @@ -0,0 +1,144 @@ +% *======================================================================* +% Cactus Thorn template for ThornGuide documentation +% Author: Ian Kelley +% Date: Sun Jun 02, 2002 +% $Header$ +% +% Thorn documentation in the latex file doc/documentation.tex +% will be included in ThornGuides built with the Cactus make system. +% The scripts employed by the make system automatically include +% pages about variables, parameters and scheduling parsed from the +% relevant thorn CCL files. +% +% This template contains guidelines which help to assure that your +% documentation will be correctly added to ThornGuides. More +% information is available in the Cactus UsersGuide. +% +% Guidelines: +% - Do not change anything before the line +% % START CACTUS THORNGUIDE", +% except for filling in the title, author, date, etc. fields. +% - Each of these fields should only be on ONE line. +% - Author names should be separated with a \\ or a comma. +% - You can define your own macros, but they must appear after +% the START CACTUS THORNGUIDE line, and must not redefine standard +% latex commands. +% - To avoid name clashes with other thorns, 'labels', 'citations', +% 'references', and 'image' names should conform to the following +% convention: +% ARRANGEMENT_THORN_LABEL +% For example, an image wave.eps in the arrangement CactusWave and +% thorn WaveToyC should be renamed to CactusWave_WaveToyC_wave.eps +% - Graphics should only be included using the graphicx package. +% More specifically, with the "\includegraphics" command. Do +% not specify any graphic file extensions in your .tex file. This +% will allow us to create a PDF version of the ThornGuide +% via pdflatex. +% - References should be included with the latex "\bibitem" command. +% - Use \begin{abstract}...\end{abstract} instead of \abstract{...} +% - Do not use \appendix, instead include any appendices you need as +% standard sections. +% - For the benefit of our Perl scripts, and for future extensions, +% please use simple latex. +% +% *======================================================================* +% +% Example of including a graphic image: +% \begin{figure}[ht] +% \begin{center} +% \includegraphics[width=6cm]{MyArrangement_MyThorn_MyFigure} +% \end{center} +% \caption{Illustration of this and that} +% \label{MyArrangement_MyThorn_MyLabel} +% \end{figure} +% +% Example of using a label: +% \label{MyArrangement_MyThorn_MyLabel} +% +% Example of a citation: +% \cite{MyArrangement_MyThorn_Author99} +% +% Example of including a reference +% \bibitem{MyArrangement_MyThorn_Author99} +% {J. Author, {\em The Title of the Book, Journal, or periodical}, 1 (1999), +% 1--16. {\tt http://www.nowhere.com/}} +% +% *======================================================================* + +% If you are using CVS use this line to give version information +% $Header$ + +\documentclass{article} + +% Use the Cactus ThornGuide style file +% (Automatically used from Cactus distribution, if you have a +% thorn without the Cactus Flesh download this from the Cactus +% homepage at www.cactuscode.org) +\usepackage{../../../../doc/latex/cactus} + +\begin{document} + +% The author of the documentation +\author{Yaakoub Y El-Khamra \textless yye00@cc.lsu.edu\textgreater} + +% The title of the document (not necessarily the name of the Thorn) +\title{} + +% the date your document was last changed, if your document is in CVS, +% please use: +% \date{$ $Date$ $} +\date{April 12 2004} + +\maketitle + +% Do not delete next line +% START CACTUS THORNGUIDE + +% Add all definitions used in this documentation here +% \def\mydef etc + +% Add an abstract for this thorn's documentation +\begin{abstract} + +\end{abstract} + +% The following sections are suggestive only. +% Remove them or add your own. + +\section{Introduction} + +\section{Physical System} + +\section{Numerical Implementation} + +\section{Using This Thorn} + +\subsection{Obtaining This Thorn} + +\subsection{Basic Usage} + +\subsection{Special Behaviour} + +\subsection{Interaction With Other Thorns} + +\subsection{Examples} + +\subsection{Support and Feedback} + +\section{History} + +\subsection{Thorn Source Code} + +\subsection{Thorn Documentation} + +\subsection{Acknowledgements} + + +\begin{thebibliography}{9} + +\end{thebibliography} + +% Do not delete next line +% END CACTUS THORNGUIDE + +\end{document} diff --git a/interface.ccl b/interface.ccl new file mode 100644 index 0000000..fb50007 --- /dev/null +++ b/interface.ccl @@ -0,0 +1,5 @@ +# Interface definition for thorn PETSC +# $Header$ + +implements:PETSC +inherits: diff --git a/param.ccl b/param.ccl new file mode 100644 index 0000000..a104694 --- /dev/null +++ b/param.ccl @@ -0,0 +1,2 @@ +# Parameter definitions for thorn PETSC +# $Header$ diff --git a/petsc.sh b/petsc.sh new file mode 100755 index 0000000..ff2472f --- /dev/null +++ b/petsc.sh @@ -0,0 +1,104 @@ +#! /bin/sh +#/*@@ +# @file setup.sh +# @date Fri 29 Aug 2003 +# @author Thomas Radke +# @desc +# Setup for an external PETSc installation +# @enddesc +# @@*/ + +# /*@@ +# @routine CCTK_Search +# @date Wed Jul 21 11:16:35 1999 +# @author Tom Goodale +# @desc +# Used to search for something in various directories +# @enddesc +#@@*/ + +CCTK_Search() +{ + eval $1="" + if test $# -lt 4 ; then + cctk_basedir="" + else + cctk_basedir="$4/" + fi + for cctk_place in $2 + do +# echo $ac_n " Looking in $cctk_place""...$ac_c" #1>&6 + if test -r "$cctk_basedir$cctk_place/$3" ; then +# echo "$ac_t""... Found" #1>&6 + eval $1="$cctk_place" + break + fi + if test -d "$cctk_basedir$cctk_place/$3" ; then +# echo "$ac_t""... Found" #1>&6 + eval $1="$cctk_place" + break + fi +# echo "$ac_t"" No" #1>&6 + done + + return +} + + +choose_petsc=`echo $PETSC | tr '[:upper:]' '[:lower:]'` + +# Work out PETSc's installation directory +if [ -z "$PETSC_DIR" ]; then + CCTK_Search PETSC_DIR '/usr /usr/local /usr/local/petsc /usr/local/packages/petsc /usr/local/apps/petsc' include/petsc.h + if [ -z "$PETSC_DIR" ] ; then + exit 2 + fi +fi + + +# Check what architecture is available +if [ -z "$PETSC_ARCH" ]; then + if [ ! -d "$PETSC_DIR/lib/libg" ]; then + exit 2 + fi + PETSC_ARCH=`/bin/ls -1 $PETSC_DIR/lib/libg | head -n1` +fi + +# Set platform-specific libraries +if [ -z "$PETSC_ARCH_LIBS" ]; then + case "$PETSC_ARCH" in + alpha) PETSC_ARCH_LIBS='dxml' ;; + IRIX64) PETSC_ARCH_LIBS='fpe blas complib.sgimath' ;; + linux) PETSC_ARCH_LIBS='flapack fblas g2c mpich' ;; + linux_intel) PETSC_ARCH_LIBS='mkl_lapack mkl_def guide' ;; + linux-gnu) PETSC_ARCH_LIBS='mkl_lapack mkl_def guide' ;; + linux64_intel) PETSC_ARCH_LIBS='mkl_lapack mkl guide' ;; + rs6000_64) PETSC_ARCH_LIBS='essl' ;; + *) echo " No PETSc support for architecture '$PETSC_ARCH' !" + echo ' Please file a bug report to cactusmaint@cactuscode.org.' + exit 2 + esac +fi + +# Set the PETSc libs, libdirs and includedirs +PETSC_LIB_DIRS='$(PETSC_DIR)/lib/libO/$(PETSC_ARCH)' +PETSC_INC_DIRS='$(PETSC_DIR)/include $(PETSC_DIR)/bmake/$(PETSC_ARCH)' +PETSC_LIBS="petscts petscsnes petscsles petscdm petscmat petscvec petsc $PETSC_ARCH_LIBS" + +echo "BEGIN DEFINE" +echo "#define CCTK_PETSC 1" +echo "END DEFINE" + +echo "BEGIN DEFINITION" +echo "HAVE_PETSC = 1" +echo "PETSC_DIR = $PETSC_DIR" +echo "PETSC_ARCH = $PETSC_ARCH" +echo "PETSC_LIBS = $PETSC_LIBS" +echo "PETSC_LIB_DIRS = $PETSC_LIB_DIRS" +echo "PETSC_INC_DIRS = $PETSC_INC_DIRS" +echo "END DEFINITION" + + +echo 'LIBRARY $(PETSC_LIBS) X11 $(MPI_LIBS)' +echo 'LIBRARY_DIRECTORY $(PETSC_LIB_DIRS) $(X_LIB_DIR)' +echo 'INCLUDE_DIRECTORY $(PETSC_INC_DIRS)' diff --git a/schedule.ccl b/schedule.ccl new file mode 100644 index 0000000..4a8ed8b --- /dev/null +++ b/schedule.ccl @@ -0,0 +1,2 @@ +# Schedule definitions for thorn PETSC +# $Header$ diff --git a/src/make.code.defn b/src/make.code.defn new file mode 100644 index 0000000..ebe7d44 --- /dev/null +++ b/src/make.code.defn @@ -0,0 +1,8 @@ +# Main make.code.defn file for thorn PETSC +# $Header$ + +# Source files in this directory +SRCS = + +# Subdirectories containing source files +SUBDIRS = |