AliceInitialize

Initializes the Alice database and MPI. AliceInitialize() calls MPI_Init() if that has yet to be called, so this routine should always be called near the beginning of your program -- usually the very first line!

Synopsis

int AliceInitialize(int *argc,char ***args,const char file[],const char help[])
Collective on MPI_COMM_WORLD or PETSC_COMM_WORLD if it has been set

Input Parameters

argc - count of number of command line arguments
args - the command line arguments
file - [optional] Alice database file, defaults to ~username/.alicerc (use PETSC_NULL for default)
help - [optional] Help message to print, use PETSC_NULL for no message

Options Database Keys

-start_in_debugger [noxterm,dbx,xdb,gdb,...] - Starts program in debugger + -on_error_attach_debugger [noxterm,dbx,xdb,gdb,...] - Starts debugger when error detected
-debugger_nodes [node1,node2,...] - Indicates nodes to start in debugger
-debugger_pause [sleeptime] (in seconds) - Pauses debugger
-trmalloc - Indicates use of Alice error-checking malloc
-trmalloc_off - Indicates not to use error-checking malloc
-fp_trap - Stops on floating point exceptions (Note that on the IBM RS6000 this slows code by at least a factor of 10.)
-no_signal_handler - Indicates not to trap error signals

Options Database Keys for Profiling

See the 'Profiling' chapter of the users manual for details.
-log_trace [filename] - Print traces of all Alice calls to the screen (useful to determine where a program hangs without running in the debugger). See PLogTraceBegin().
-log_info <optional filename> - Prints verbose information to the screen
-log_info_exclude <null,vec,mat,sles,snes,ts> - Excludes some of the verbose messages

Notes

If for some reason you must call MPI_Init() separately, call it before AliceInitialize().

Fortran Version

In Fortran this routine has the format
      call AliceInitialize(file,ierr)

ierr - error return code
file - [optional] Alice database file name, defaults to ~username/.alicerc (use PETSC_NULL_CHARACTER for default)

Important Fortran Note

In Fortran, you MUST use PETSC_NULL_CHARACTER to indicate a null character string; you CANNOT just use PETSC_NULL as in the C version. See the users manual for details.

Keywords

initialize, options, database, startup

See Also

AliceFinalize(), AliceInitializeFortran()

Level:beginner
Location:src/sys/src/objects/init.c
System Index
Table of Contents