Fixed a few problems.
This commit is contained in:
parent
5cd7aeb22b
commit
fcd7285425
@ -73,41 +73,38 @@ configured and may also be included by the user in his/her own code.
|
|||||||
\subsection{Linking into another program}
|
\subsection{Linking into another program}
|
||||||
|
|
||||||
A program linking with \hypre{} must be compiled with
|
A program linking with \hypre{} must be compiled with
|
||||||
\kbd{-I$HYPRE_DIR/include} and linked with
|
\kbd{-I\$HYPRE_DIR/include} and linked with
|
||||||
\kbd{-L$HYPRE_DIR/lib -l}{\it hypre library name}...
|
\kbd{-L\$HYPRE_DIR/lib -l}{\it hypre library name}...
|
||||||
\kbd{-l}{\it hypre library name}.
|
\kbd{-l}{\it hypre library name}..., where \kbd{\$HYPRE_DIR} is the
|
||||||
When using a formal \hypre{} installation, \kbd{$HYPRE_DIR} is
|
directory where \hypre{} is installed. Additionally, any other
|
||||||
\file{/usr/apps/hypre}.
|
libraries to which \hypre{} is linked must also be linked to by the
|
||||||
When using a private installation, the installer sets
|
users application. For example, the BLAS library or PETSc library are
|
||||||
\kbd{$HYPRE_DIR}. Additionally, any other libraries to which \hypre{}
|
often (but not always) linked in by \hypre{} and would also need to be
|
||||||
is linked must also be linked to by the users application e.g. the
|
linked in by the users application.
|
||||||
BLAS library or PETSc library are often (but not always) linked in by
|
|
||||||
\hypre{} and must therefore be linked in by the users
|
It may be useful to reference the \code{Makefile} in the \file{test}
|
||||||
application as well. It may be useful to reference the Makefile in
|
subdirectory. This makefile is designed to build test applications
|
||||||
the test subdirectory. This Makefile is designed to build a test
|
that link with and call \hypre{}. All include and linking flags that
|
||||||
application that links with and calls \hypre{}. All include and
|
are used by \hypre{} and needed by these test applications get
|
||||||
linking flags that are used by \hypre{} and needed by the application
|
exported to this file by the \file{configure} script.
|
||||||
get exported to this file by the configure script.
|
|
||||||
|
|
||||||
%==========================================================================
|
%==========================================================================
|
||||||
|
|
||||||
\section{Calling \hypre{} from Fortran}
|
\section{Calling \hypre{} from Fortran}
|
||||||
\label{Calling hypre from Fortran}
|
\label{Calling hypre from Fortran}
|
||||||
|
|
||||||
Fortran 77 subroutine arguments always pass copies of the argument addresses
|
Fortran 77 subroutine arguments always pass copies of the argument
|
||||||
upon execution of the subroutine call.
|
addresses upon execution of the subroutine call. This is referred to
|
||||||
This is referred to as call-by-address or call-by-reference.
|
as call-by-address or call-by-reference. In the called subroutine,
|
||||||
In the called subroutine, the memory space at the
|
the memory space at the argument address can be altered, but the
|
||||||
argument address can be altered, but the calling address cannot be
|
calling address cannot be altered.
|
||||||
altered.
|
|
||||||
|
|
||||||
C function parameters, whether pointers (addresses) or not, are
|
C function parameters, whether pointers (addresses) or not, are
|
||||||
directly copied upon
|
directly copied upon entry to the function. This is referred to as
|
||||||
entry to the function. This is referred to as call-by-value.
|
call-by-value. Altering the copied C parameter in the called function
|
||||||
Altering the copied C parameter in the
|
has no effect on the parameter in the calling function. A pointer
|
||||||
called function has no effect on the parameter in the calling function.
|
parameter in C can achieve the same effect as call-by-reference, and
|
||||||
A pointer parameter in C can achieve the same effect as call-by-reference,
|
by this mechanism the languages can interoperate in a straightforward
|
||||||
and by this mechanism the languages can interoperate in a straightforward
|
|
||||||
manner.
|
manner.
|
||||||
|
|
||||||
Portability across typical platforms is currently achieved with the
|
Portability across typical platforms is currently achieved with the
|
||||||
|
|||||||
@ -82,7 +82,7 @@ to enter the problem into \hypre{}, and the \code{PFMG} Multigrid
|
|||||||
solver is used to solve the system.
|
solver is used to solve the system.
|
||||||
|
|
||||||
This example and all other examples in this manual are written in C,
|
This example and all other examples in this manual are written in C,
|
||||||
but \hypre{} also supports Fortran. See Chapter
|
but \hypre{} also supports Fortran. See Section
|
||||||
\ref{Calling hypre from Fortran} for details.
|
\ref{Calling hypre from Fortran} for details.
|
||||||
|
|
||||||
\begin{display}
|
\begin{display}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user