1
1
openmpi/orte/mca/filem/filem.h
Rainer Keller 8e1b23779f - Replace combinations of
#if defined (c_plusplus)
          defined (__cplusplus)
   followed by
      extern "C" {
   and the closing counterpart by BEGIN_C_DECLS and END_C_DECLS.

   Notable exceptions are:
    - opal/include/opal_config_bottom.h:
      This is our generated code, that itself defines BEGIN_C_DECL and
      END_C_DECL
    - ompi/mpi/cxx/mpicxx.h:
      Here we do not include opal_config_bottom.h:                                 
    - Belongs to external code:                                                    
      opal/mca/backtrace/darwin/MoreBacktrace/MoreDebugging/MoreBacktrace.c        
      opal/mca/backtrace/darwin/MoreBacktrace/MoreDebugging/MoreBacktrace.h        
    - opal/include/opal/prefetch.h:
      Has C++ specific macros that are protected:                                  

    - Had #if ... } #endif  _and_ END_C_DECLS (aka end up with 2x
      END_C_DECLS)
      ompi/mca/btl/openib/btl_openib.h
    - opal/event/event.h has #ifdef __cplusplus as BEGIN_C_DECLS...
    - opal/win32/ompi_process.h: had extern "C"\n {...
      opal/win32/ompi_process.h: dito
    - ompi/mca/btl/pcie/btl_pcie_lex.l: needed to add *_C_DECLS
      ompi/mpi/f90/test/align_c.c: dito
    - ompi/debuggers/msgq_interface.h: used #ifdef __cplusplus
    - ompi/mpi/f90/xml/common-C.xsl: Amend

   Tested on linux using --with-openib and --with-mx

   The following do not contain either opal_config.h, orte_config.h or
   ompi_config.h
   (but possibly other header files, that include one of the above):
      ompi/mca/bml/r2/bml_r2_ft.h
      ompi/mca/btl/gm/btl_gm_endpoint.h
      ompi/mca/btl/gm/btl_gm_proc.h
      ompi/mca/btl/mx/btl_mx_endpoint.h
      ompi/mca/btl/ofud/btl_ofud_endpoint.h
      ompi/mca/btl/ofud/btl_ofud_frag.h
      ompi/mca/btl/ofud/btl_ofud_proc.h
      ompi/mca/btl/openib/btl_openib_mca.h
      ompi/mca/btl/portals/btl_portals_endpoint.h
      ompi/mca/btl/portals/btl_portals_frag.h
      ompi/mca/btl/sctp/btl_sctp_endpoint.h
      ompi/mca/btl/sctp/btl_sctp_proc.h
      ompi/mca/btl/tcp/btl_tcp_endpoint.h
      ompi/mca/btl/tcp/btl_tcp_ft.h
      ompi/mca/btl/tcp/btl_tcp_proc.h
      ompi/mca/btl/template/btl_template_endpoint.h
      ompi/mca/btl/template/btl_template_proc.h
      ompi/mca/btl/udapl/btl_udapl_eager_rdma.h
      ompi/mca/btl/udapl/btl_udapl_endpoint.h
      ompi/mca/btl/udapl/btl_udapl_mca.h
      ompi/mca/btl/udapl/btl_udapl_proc.h
      ompi/mca/mtl/mx/mtl_mx_endpoint.h
      ompi/mca/mtl/mx/mtl_mx.h
      ompi/mca/mtl/psm/mtl_psm_endpoint.h
      ompi/mca/mtl/psm/mtl_psm.h
      ompi/mca/pml/cm/pml_cm_component.h
      ompi/mca/pml/csum/pml_csum_comm.h
      ompi/mca/pml/dr/pml_dr_comm.h
      ompi/mca/pml/dr/pml_dr_component.h
      ompi/mca/pml/dr/pml_dr_endpoint.h
      ompi/mca/pml/dr/pml_dr_recvfrag.h
      ompi/mca/pml/example/pml_example.h
      ompi/mca/pml/ob1/pml_ob1_comm.h
      ompi/mca/pml/ob1/pml_ob1_component.h
      ompi/mca/pml/ob1/pml_ob1_endpoint.h
      ompi/mca/pml/ob1/pml_ob1_rdmafrag.h
      ompi/mca/pml/ob1/pml_ob1_recvfrag.h
      ompi/mca/pml/v/pml_v_output.h
      opal/include/opal/prefetch.h
      opal/mca/timer/aix/timer_aix.h
      opal/util/qsort.h
      test/support/components.h

This commit was SVN r21855.

The following SVN revision numbers were found above:
  r2 --> open-mpi/ompi@58fdc18855
2009-08-20 11:42:18 +00:00

374 строки
11 KiB
C

/*
* Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
/**
* @file
*
* Remote File Management (FileM) Interface
*
*/
#ifndef MCA_FILEM_H
#define MCA_FILEM_H
#include "orte_config.h"
#include "orte/constants.h"
#include "orte/types.h"
#include "opal/mca/mca.h"
#include "opal/mca/base/base.h"
#include "opal/class/opal_object.h"
BEGIN_C_DECLS
/**
* A set of flags that determine the type of the file
* in question
*/
#define ORTE_FILEM_TYPE_FILE 0
#define ORTE_FILEM_TYPE_DIR 1
#define ORTE_FILEM_TYPE_UNKNOWN 2
/**
* Type of moment
*/
#define ORTE_FILEM_MOVE_TYPE_PUT 0
#define ORTE_FILEM_MOVE_TYPE_GET 1
#define ORTE_FILEM_MOVE_TYPE_RM 2
#define ORTE_FILEM_MOVE_TYPE_UNKNOWN 3
/**
* Hints that describe the local or remote file target for
* optimization purposes.
*/
#define ORTE_FILEM_HINT_NONE 0
#define ORTE_FILEM_HINT_SHARED 1
/**
* Define a Process Set
*
* Source: A single source of the operation.
* Sink: Desitination of the operation.
*/
struct orte_filem_base_process_set_1_0_0_t {
/** This is an object, so must have a super */
opal_list_item_t super;
/** Source Process */
orte_process_name_t source;
/** Sink Process */
orte_process_name_t sink;
};
typedef struct orte_filem_base_process_set_1_0_0_t orte_filem_base_process_set_1_0_0_t;
typedef struct orte_filem_base_process_set_1_0_0_t orte_filem_base_process_set_t;
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_filem_base_process_set_t);
/**
* Define a File Pair
*
* Local: Local file reference
* Remove: Remote file reference
*
* Note: If multiple process sinks are used it is assumed that the
* file reference is the same for each of the sinks. If this is not
* true then more than one filem request needs to be created.
*/
struct orte_filem_base_file_set_1_0_0_t {
/** This is an object, so must have a super */
opal_list_item_t super;
/* Local file reference */
char * local_target;
/* Local file reference hints */
int local_hint;
/* Remove file reference */
char * remote_target;
/* Remote file reference hints */
int remote_hint;
/* Type of file to move */
int target_flag;
};
typedef struct orte_filem_base_file_set_1_0_0_t orte_filem_base_file_set_1_0_0_t;
typedef struct orte_filem_base_file_set_1_0_0_t orte_filem_base_file_set_t;
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_filem_base_file_set_t);
/**
* Definition of a file movement request
* This will allow:
* - The movement of one or more files
* - to/from one or more processes
* in a single call of the API function. Allowing the implementation
* to optimize the sending/receiving of data.
* Used for the following:
*
*/
struct orte_filem_base_request_1_0_0_t {
/** This is an object, so must have a super */
opal_list_item_t super;
/*
* A list of process sets
*/
opal_list_t process_sets;
/*
* A list of file pairings
*/
opal_list_t file_sets;
/*
* Internal use:
* Number of movements
*/
int num_mv;
/*
* Internal use:
* Boolean to indianate if transfer is complete
*/
bool *is_done;
/*
* Internal use:
* Boolean to indianate if transfer is active
*/
bool *is_active;
/*
* Internal use:
* Exit status of the copy command
*/
int32_t *exit_status;
/*
* Internal use:
* Movement type
*/
int movement_type;
};
typedef struct orte_filem_base_request_1_0_0_t orte_filem_base_request_1_0_0_t;
typedef struct orte_filem_base_request_1_0_0_t orte_filem_base_request_t;
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_filem_base_request_t);
/**
* Module initialization function.
* Returns ORTE_SUCCESS
*/
typedef int (*orte_filem_base_module_init_fn_t)
(void);
/**
* Module finalization function.
* Returns ORTE_SUCCESS
*/
typedef int (*orte_filem_base_module_finalize_fn_t)
(void);
/**
* Put a file or directory on the remote machine
*
* Note: By using a relative path for the remote file/directory, the filem
* component will negotiate the correct absolute path for that file/directory
* for the remote machine.
*
* @param request FileM request describing the files/directories to send,
* the remote files/directories to use, and the processes to see the change.
*
* @return ORTE_SUCCESS on successful file transer
* @return ORTE_ERROR on failed file transfer
*/
typedef int (*orte_filem_base_put_fn_t)
(orte_filem_base_request_t *request);
/**
* Put a file or directory on the remote machine (Async)
*
* Note: By using a relative path for the remote file/directory, the filem
* component will negotiate the correct absolute path for that file/directory
* for the remote machine.
*
* @param request FileM request describing the files/directories to send,
* the remote files/directories to use, and the processes to see the change.
*
* @return ORTE_SUCCESS on successful file transer
* @return ORTE_ERROR on failed file transfer
*/
typedef int (*orte_filem_base_put_nb_fn_t)
(orte_filem_base_request_t *request);
/**
* Get a file from the remote machine
*
* Note: By using a relative path for the remote file/directory, the filem
* component will negotiate the correct absolute path for that file/directory
* for the remote machine.
*
* @param request FileM request describing the files/directories to receive,
* the remote files/directories to use, and the processes to see the change.
*
* @return ORTE_SUCCESS on successful file transer
* @return ORTE_ERROR on failed file transfer
*/
typedef int (*orte_filem_base_get_fn_t)
(orte_filem_base_request_t *request);
/**
* Get a file from the remote machine (Async)
*
* Note: By using a relative path for the remote file/directory, the filem
* component will negotiate the correct absolute path for that file/directory
* for the remote machine.
*
* @param request FileM request describing the files/directories to receive,
* the remote files/directories to use, and the processes to see the change.
*
* @return ORTE_SUCCESS on successful file transer
* @return ORTE_ERROR on failed file transfer
*/
typedef int (*orte_filem_base_get_nb_fn_t)
(orte_filem_base_request_t *request);
/**
* Remove a file from the remote machine
*
* Note: By using a relative path for the remote file/directory, the filem
* component will negotiate the correct absolute path for that file/directory
* for the remote machine.
*
* @param request FileM request describing the remote files/directories to remove,
* the processes to see the change.
*
* @return ORTE_SUCCESS on success
* @return ORTE_ERROR on fail
*/
typedef int (*orte_filem_base_rm_fn_t)
(orte_filem_base_request_t *request);
/**
* Remove a file from the remote machine (Async)
*
* Note: By using a relative path for the remote file/directory, the filem
* component will negotiate the correct absolute path for that file/directory
* for the remote machine.
*
* @param request FileM request describing the remote files/directories to remove,
* the processes to see the change.
*
* @return ORTE_SUCCESS on success
* @return ORTE_ERROR on fail
*/
typedef int (*orte_filem_base_rm_nb_fn_t)
(orte_filem_base_request_t *request);
/**
* Wait for a single file movement request to finish
*
* @param request FileM request describing the remote files/directories.
*
* The request must have been passed through one of the non-blocking functions
* before calling wait or wait_all otherwise ORTE_ERROR will be returned.
*
* @return ORTE_SUCCESS on success
* @return ORTE_ERROR on fail
*/
typedef int (*orte_filem_base_wait_fn_t)
(orte_filem_base_request_t *request);
/**
* Wait for a multiple file movement requests to finish
*
* @param request_list opal_list_t of FileM requests describing the remote files/directories.
*
* The request must have been passed through one of the non-blocking functions
* before calling wait or wait_all otherwise ORTE_ERROR will be returned.
*
* @return ORTE_SUCCESS on success
* @return ORTE_ERROR on fail
*/
typedef int (*orte_filem_base_wait_all_fn_t)
(opal_list_t *request_list);
/**
* Structure for FILEM components.
*/
struct orte_filem_base_component_2_0_0_t {
/** MCA base component */
mca_base_component_t base_version;
/** MCA base data */
mca_base_component_data_t base_data;
/** Verbosity Level */
int verbose;
/** Output Handle for opal_output */
int output_handle;
/** Default Priority */
int priority;
};
typedef struct orte_filem_base_component_2_0_0_t orte_filem_base_component_2_0_0_t;
typedef struct orte_filem_base_component_2_0_0_t orte_filem_base_component_t;
/**
* Structure for FILEM modules
*/
struct orte_filem_base_module_1_0_0_t {
/** Initialization Function */
orte_filem_base_module_init_fn_t filem_init;
/** Finalization Function */
orte_filem_base_module_finalize_fn_t filem_finalize;
/** Put a file on the remote machine */
orte_filem_base_put_fn_t put;
orte_filem_base_put_nb_fn_t put_nb;
/** Get a file from the remote machine */
orte_filem_base_get_fn_t get;
orte_filem_base_get_nb_fn_t get_nb;
/** Remove a file on the remote machine */
orte_filem_base_rm_fn_t rm;
orte_filem_base_rm_nb_fn_t rm_nb;
/** Test functions for the non-blocking versions */
orte_filem_base_wait_fn_t wait;
orte_filem_base_wait_all_fn_t wait_all;
};
typedef struct orte_filem_base_module_1_0_0_t orte_filem_base_module_1_0_0_t;
typedef struct orte_filem_base_module_1_0_0_t orte_filem_base_module_t;
ORTE_DECLSPEC extern orte_filem_base_module_t orte_filem;
/**
* Macro for use in components that are of type FILEM
*/
#define ORTE_FILEM_BASE_VERSION_2_0_0 \
MCA_BASE_VERSION_2_0_0, \
"filem", 2, 0, 0
END_C_DECLS
#endif /* ORTE_FILEM_H */