PLUTO
al_init.c File Reference

ArrayLib Initialization routines. More...

#include "al_hidden.h"
Include dependency graph for al_init.c:

Go to the source code of this file.

Functions

int AL_Init (int *argc, char ***argv)
 
int AL_Initialized ()
 

Variables

static int AL_initialized = AL_FALSE
 

Detailed Description

ArrayLib Initialization routines.

ArrayLib Initialization routines

Authors
A. Malagoli (University of Chicago)
Date
Jul 17, 1999

Definition in file al_init.c.

Function Documentation

int AL_Init ( int *  argc,
char ***  argv 
)

Initialize the AL Tool. It contains a call to MPI_Init().

Parameters
[in]argcinteger pointer to number of arguments
[in]argvpointer to argv list

Definition at line 18 of file al_init.c.

25 {
26  int myrank, nproc, errcode;
27  int flag;
28 
29  errcode = MPI_Initialized(&flag);
30 
31  if( !flag )
32  errcode = MPI_Init(argc, argv);
33 
34  MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
35  MPI_Comm_size(MPI_COMM_WORLD, &nproc);
36 
37 #ifdef DEBUG
38  printf("AL_Init: Called MPI_init from C: %d\n",errcode);
39 #endif
40 
41  /* Initialize the SZ pointers stack */
43 
44  /* Synchronize just in case */
45  MPI_Barrier(MPI_COMM_WORLD);
46 
48 
49  return errcode;
50 }
#define AL_TRUE
Definition: al_codes.h:28
static int AL_initialized
Definition: al_init.c:15
int AL_Init_stack_()
Definition: al_szptr_.c:33

Here is the call graph for this function:

Here is the caller graph for this function:

int AL_Initialized ( )

Test whether or not AL was initialized

Returns
This function returns AL_TRUE if AL is initialized, AL_FALSE otherwise.

Definition at line 53 of file al_init.c.

58 {
59  return AL_initialized;
60 }
static int AL_initialized
Definition: al_init.c:15

Variable Documentation

int AL_initialized = AL_FALSE
static

Definition at line 15 of file al_init.c.