photon  1.1
Files | Functions
Library Initialization

Functions that initialize and shutdown the library. More...

Files

file  photon_main.h
 

Functions

int photon_init (photonConfig cfg)
 
int photon_finalize ()
 
int photon_initialized ()
 
int photon_cancel (photon_rid request, int flags)
 

Detailed Description

Functions that initialize and shutdown the library.

Function Documentation

◆ photon_cancel()

int photon_cancel ( photon_rid  request,
int  flags 
)

Cancels a previously posted request.

Parameters
requestThe request to cancel
flagsFlags that determine the cancel behavior (none implemented)
Returns
PHOTON_OK on success, PHOTON_ERROR if no matching request found

Definition at line 336 of file libphoton.c.

◆ photon_finalize()

int photon_finalize ( )

Finalizes the Photon library. Shuts down backends and frees allocated data structures. Call this at the end, or shutdown, of your application.

Returns
PHOTON_OK on success or an error code

Definition at line 348 of file libphoton.c.

◆ photon_init()

int photon_init ( photonConfig  cfg)

Initializes the Photon library.

This must be called before other Photon functions. photon_init() initializes the the backends and any hardware setup as specified in the configuration.

If Photon is built with –enable-mpi, photon_init() may be called as a direct replacement for MPI_init(). In this case, photon_config_t::address and photon_config_t::nproc are set to the appropriate values on successful return. However, if MPI_Init() was previously called, then Photon expects user-supplied values in the the passed-in photon_config_t struct.

Parameters
cfgA pointer to a photon_config_t structure
Returns
PHOTON_OK on success or an error code

Definition at line 91 of file libphoton.c.

◆ photon_initialized()

int photon_initialized ( )

Checks the initialization state of the library

Returns
1 if the library has been initialized, 0 otherwise

Definition at line 76 of file libphoton.c.