\frame{ \frametitle{} \hspace{1em} \begin{centering} \hspace{-1cm}\includegraphics[height=3cm]{cactuslogo}\\ \Huge Examples\\ \end{centering} } \frame[containsverbatim]{ \frametitle{Hello World, Standalone} Standalone in C: \begin{verbatim} #include int main(void) { printf("Hello World!\n"); return 0; } \end{verbatim} } \frame[containsverbatim]{ \frametitle{Hello World Thorn} \begin{itemize} \item \verb|interface.ccl|: \begin{verbatim} implements: HelloWorld\end{verbatim} \item \verb|schedule.ccl|: \begin{verbatim} schedule HelloWorld at CCTK_EVOL { LANG: C } "Print Hello World message"\end{verbatim} \item \verb|param.ccl|: empty \item \verb|REAME|: \tiny \begin{verbatim} Cactus Code Thorn HelloWorld Author(s) : Frank Löffler Maintainer(s): Frank Löffler Licence : GPL -------------------------------------------------------------------------- 1. Purpose Example thorn for tutorial Introduction to Cactus \end{verbatim} \end{itemize} } \frame[containsverbatim]{ \frametitle{Hello World Thorn cont.} \begin{itemize} \item \verb|src/HelloWorld.c|: \begin{verbatim} #include "cctk.h" #include "cctk_Arguments.h" void HelloWorld(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS CCTK_INFO("Hello World!"); return; }\end{verbatim} \item \verb|make.code.defn|: \begin{verbatim} SRCS = HelloWorld.c\end{verbatim} \end{itemize} } \frame[containsverbatim]{ \frametitle{Hello World Thorn} \begin{itemize} \item parameter file: \begin{verbatim} ActiveThorns = "HelloWorld" Cactus::cctk_itlast = 10\end{verbatim} \item run: \verb|[mpirun] | \end{itemize} } \frame[containsverbatim]{ \frametitle{Hello World Thorn} \begin{itemize} \item Screen output:\tiny \begin{verbatim} 10 1 0101 ************************ 01 1010 10 The Cactus Code V4.0 1010 1101 011 www.cactuscode.org 1001 100101 ************************ 00010101 100011 (c) Copyright The Authors 0100 GNU Licensed. No Warranty 0101 Cactus version: 4.0.b17 Compile date: May 06 2009 (13:15:01) Run date: May 06 2009 (13:15:54-0500) [...] Activating thorn Cactus...Success -> active implementation Cactus Activation requested for --->HelloWorld<--- Activating thorn HelloWorld...Success -> active implementation HelloWorld -------------------------------------------------------------------------------- INFO (HelloWorld): Hello World! INFO (HelloWorld): Hello World! [...] 8x -------------------------------------------------------------------------------- Done. \end{verbatim} \end{itemize} }