1
1
plfs components are at this point not utilized by anybody as far as I know.
Easy to bring back if we want to.

Signed-off-by: Edgar Gabriel <egabriel@central.uh.edu>
Этот коммит содержится в:
Edgar Gabriel 2018-03-11 07:41:56 -05:00
родитель 85ce76fa36
Коммит e703ac2da8
22 изменённых файлов: 0 добавлений и 1307 удалений

Просмотреть файл

@ -1,56 +0,0 @@
#
# Copyright (c) 2004-2005 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 (c) 2008-2011 University of Houston. All rights reserved.
# Copyright (c) 2017 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).
if MCA_BUILD_ompi_fbtl_plfs_DSO
component_noinst =
component_install = mca_fbtl_plfs.la
else
component_noinst = libmca_fbtl_plfs.la
component_install =
endif
# Source files
fbtl_plfs_sources = \
fbtl_plfs.h \
fbtl_plfs.c \
fbtl_plfs_component.c \
fbtl_plfs_preadv.c \
fbtl_plfs_ipreadv.c \
fbtl_plfs_pwritev.c \
fbtl_plfs_ipwritev.c
AM_CPPFLAGS = $(fbtl_plfs_CPPFLAGS)
mcacomponentdir = $(pkglibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_fbtl_plfs_la_SOURCES = $(fbtl_plfs_sources)
mca_fbtl_plfs_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la \
$(fbtl_plfs_LIBS)
mca_fbtl_plfs_la_LDFLAGS = -module -avoid-version $(fbtl_plfs_LDFLAGS)
noinst_LTLIBRARIES = $(component_noinst)
libmca_fbtl_plfs_la_SOURCES = $(fbtl_plfs_sources)
libmca_fbtl_plfs_la_LIBADD = $(fbtl_plfs_LIBS)
libmca_fbtl_plfs_la_LDFLAGS = -module -avoid-version $(fbtl_plfs_LDFLAGS)

Просмотреть файл

@ -1,42 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 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 (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008-2014 University of Houston. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# MCA_fbtl_plfs_CONFIG(action-if-can-compile,
# [action-if-cant-compile])
# ------------------------------------------------
AC_DEFUN([MCA_ompi_fbtl_plfs_CONFIG],[
AC_CONFIG_FILES([ompi/mca/fbtl/plfs/Makefile])
OMPI_CHECK_PLFS([fbtl_plfs],
[fbtl_plfs_happy="yes"],
[fbtl_plfs_happy="no"])
AS_IF([test "$fbtl_plfs_happy" = "yes"],
[$1],
[$2])
# substitute in the things needed to build plfs
AC_SUBST([fbtl_plfs_CPPFLAGS])
AC_SUBST([fbtl_plfs_LDFLAGS])
AC_SUBST([fbtl_plfs_LIBS])
])dnl

Просмотреть файл

@ -1,85 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* These symbols are in a file by themselves to provide nice linker
* semantics. Since linkers generally pull in symbols by object fules,
* keeping these symbols as the only symbols in this file prevents
* utility programs such as "ompi_info" from having to import entire
* modules just to query their version and parameters
*/
#include "ompi_config.h"
#include "mpi.h"
#include "ompi/mca/fbtl/fbtl.h"
#include "ompi/mca/fbtl/plfs/fbtl_plfs.h"
/*
* *******************************************************************
* ************************ actions structure ************************
* *******************************************************************
*/
static mca_fbtl_base_module_1_0_0_t plfs = {
mca_fbtl_plfs_module_init, /* initalise after being selected */
mca_fbtl_plfs_module_finalize, /* close a module on a communicator */
mca_fbtl_plfs_preadv, /* blocking read */
NULL, /* non-blocking read */
mca_fbtl_plfs_pwritev, /* blocking write */
NULL, /* non-blocking write */
NULL, /* module specific progress */
NULL /* free module specific data items on the request */
};
/*
* *******************************************************************
* ************************* structure ends **************************
* *******************************************************************
*/
int mca_fbtl_plfs_component_init_query(bool enable_progress_threads,
bool enable_mpi_threads) {
/* Nothing to do */
return OMPI_SUCCESS;
}
struct mca_fbtl_base_module_1_0_0_t *
mca_fbtl_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority) {
*priority = mca_fbtl_plfs_priority;
if (PLFS == fh->f_fstype) {
if (*priority < 50) {
*priority = 50;
}
}
return &plfs;
}
int mca_fbtl_plfs_component_file_unquery (mca_io_ompio_file_t *file) {
/* This function might be needed for some purposes later. for now it
* does not have anything to do since there are no steps which need
* to be undone if this module is not selected */
return OMPI_SUCCESS;
}
int mca_fbtl_plfs_module_init (mca_io_ompio_file_t *file) {
return OMPI_SUCCESS;
}
int mca_fbtl_plfs_module_finalize (mca_io_ompio_file_t *file) {
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,64 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef MCA_FBTL_PLFS_H
#define MCA_FBTL_PLFS_H
#include "ompi_config.h"
#include "ompi/mca/mca.h"
#include "ompi/mca/fbtl/fbtl.h"
#include "ompi/mca/common/ompio/common_ompio.h"
#include <plfs.h>
extern int mca_fbtl_plfs_priority;
BEGIN_C_DECLS
int mca_fbtl_plfs_component_init_query(bool enable_progress_threads,
bool enable_mpi_threads);
struct mca_fbtl_base_module_1_0_0_t *
mca_fbtl_plfs_component_file_query (mca_io_ompio_file_t *file, int *priority);
int mca_fbtl_plfs_component_file_unquery (mca_io_ompio_file_t *file);
int mca_fbtl_plfs_module_init (mca_io_ompio_file_t *file);
int mca_fbtl_plfs_module_finalize (mca_io_ompio_file_t *file);
OMPI_MODULE_DECLSPEC extern mca_fbtl_base_component_2_0_0_t mca_fbtl_plfs_component;
/*
* ******************************************************************
* ********* functions which are implemented in this module *********
* ******************************************************************
*/
ssize_t mca_fbtl_plfs_preadv (mca_io_ompio_file_t *file );
ssize_t mca_fbtl_plfs_pwritev (mca_io_ompio_file_t *file );
ssize_t mca_fbtl_plfs_ipreadv (mca_io_ompio_file_t *file,
ompi_request_t **request);
ssize_t mca_fbtl_plfs_ipwritev (mca_io_ompio_file_t *file,
ompi_request_t **request);
/*
* ******************************************************************
* ************ functions implemented in this module end ************
* ******************************************************************
*/
END_C_DECLS
#endif /* MCA_FBTL_PLFS_H */

Просмотреть файл

@ -1,65 +0,0 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 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 (c) 2008-2014 University of Houston. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* These symbols are in a file by themselves to provide nice linker
* semantics. Since linkers generally pull in symbols by object
* files, keeping these symbols as the only symbols in this file
* prevents utility programs such as "ompi_info" from having to import
* entire components just to query their version and parameters.
*/
#include "ompi_config.h"
#include "fbtl_plfs.h"
#include "mpi.h"
/*
* Public string showing the fbtl plfs component version number
*/
const char *mca_fbtl_plfs_component_version_string =
"OMPI/MPI plfs FBTL MCA component version " OMPI_VERSION;
int mca_fbtl_plfs_priority = 10;
/*
* Instantiate the public struct with all of our public information
* and pointers to our public functions in it
*/
mca_fbtl_base_component_2_0_0_t mca_fbtl_plfs_component = {
/* First, the mca_component_t struct containing meta information
about the component itself */
.fbtlm_version = {
MCA_FBTL_BASE_VERSION_2_0_0,
/* Component name and version */
.mca_component_name = "plfs",
MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
OMPI_RELEASE_VERSION),
},
.fbtlm_data = {
/* This component is checkpointable */
MCA_BASE_METADATA_PARAM_CHECKPOINT
},
.fbtlm_init_query = mca_fbtl_plfs_component_init_query, /* get thread level */
.fbtlm_file_query = mca_fbtl_plfs_component_file_query, /* get priority and actions */
.fbtlm_file_unquery = mca_fbtl_plfs_component_file_unquery, /* undo what was done by previous function */
};

Просмотреть файл

@ -1,33 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fbtl_plfs.h"
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/fbtl/fbtl.h"
ssize_t mca_fbtl_plfs_ipreadv (mca_io_ompio_file_t *file,
ompi_request_t **request)
{
printf ("PLFS IPREADV\n");
return OMPI_ERROR;
}

Просмотреть файл

@ -1,33 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fbtl_plfs.h"
#include "mpi.h"
#include <unistd.h>
#include "ompi/constants.h"
#include "ompi/mca/fbtl/fbtl.h"
ssize_t mca_fbtl_plfs_ipwritev (mca_io_ompio_file_t *fh,
ompi_request_t **request)
{
printf ("PLFS IPWRITEV\n");
return OMPI_ERROR;
}

Просмотреть файл

@ -1,55 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fbtl_plfs.h"
#include "mpi.h"
#include <unistd.h>
#include "ompi/constants.h"
#include "ompi/mca/fbtl/fbtl.h"
ssize_t mca_fbtl_plfs_preadv (mca_io_ompio_file_t *fh )
{
Plfs_fd *pfd = fh->f_fs_ptr;
plfs_error_t plfs_ret;
ssize_t total_bytes_read=0;
int i;
ssize_t bytes_read;
if (NULL == fh->f_io_array) {
return OMPI_ERROR;
}
for (i=0 ; i<fh->f_num_of_io_entries ; i++) {
plfs_ret = plfs_read( pfd, fh->f_io_array[i].memory_address, fh->f_io_array[i].length,
(off_t )fh->f_io_array[i].offset, &bytes_read );
if (PLFS_SUCCESS != plfs_ret) {
opal_output(0, "fbtl_plfs_preadv: Error in plfs_read:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR;
}
if (bytes_read < 0)
return OMPI_ERROR;
total_bytes_read += bytes_read;
}
return total_bytes_read;
}

Просмотреть файл

@ -1,54 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fbtl_plfs.h"
#include "mpi.h"
#include <unistd.h>
#include "ompi/constants.h"
#include "ompi/mca/fbtl/fbtl.h"
ssize_t mca_fbtl_plfs_pwritev (mca_io_ompio_file_t *fh )
{
Plfs_fd *pfd = fh->f_fs_ptr;
plfs_error_t plfs_ret;
ssize_t total_bytes_written=0;
ssize_t bytes_written;
int i;
if (NULL == fh->f_io_array) {
return OMPI_ERROR;
}
for (i=0 ; i<fh->f_num_of_io_entries ; i++) {
plfs_ret = plfs_write( pfd, fh->f_io_array[i].memory_address,
fh->f_io_array[i].length,
(off_t) fh->f_io_array[i].offset,
fh->f_rank, &bytes_written );
if (PLFS_SUCCESS != plfs_ret) {
opal_output(0, "fbtl_plfs_pwritev: Error in plfs_write:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR;
}
total_bytes_written += bytes_written;
}
return total_bytes_written;
}

Просмотреть файл

@ -1,7 +0,0 @@
#
# owner/status file
# owner: institution that is responsible for this package
# status: e.g. active, maintenance, unmaintained
#
owner: UH
status: active

Просмотреть файл

@ -1,58 +0,0 @@
#
# Copyright (c) 2004-2005 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 (c) 2008-2014 University of Houston. All rights reserved.
# Copyright (c) 2017 IBM Corporation. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# Make the output library in this directory, and name it either
# mca_<type>_<name>.la (for DSO builds) or libmca_<type>_<name>.la
# (for static builds).
if MCA_BUILD_ompi_fs_plfs_DSO
component_noinst =
component_install = mca_fs_plfs.la
else
component_noinst = libmca_fs_plfs.la
component_install =
endif
# Source files
fs_plfs_sources = \
fs_plfs.h \
fs_plfs.c \
fs_plfs_component.c \
fs_plfs_file_open.c \
fs_plfs_file_close.c \
fs_plfs_file_delete.c \
fs_plfs_file_sync.c \
fs_plfs_file_set_size.c \
fs_plfs_file_get_size.c
AM_CPPFLAGS = $(fs_plfs_CPPFLAGS)
mcacomponentdir = $(pkglibdir)
mcacomponent_LTLIBRARIES = $(component_install)
mca_fs_plfs_la_SOURCES = $(fs_plfs_sources)
mca_fs_plfs_la_LIBADD = $(top_builddir)/ompi/lib@OMPI_LIBMPI_NAME@.la \
$(fs_plfs_LIBS)
mca_fs_plfs_la_LDFLAGS = -module -avoid-version $(fs_plfs_LDFLAGS)
noinst_LTLIBRARIES = $(component_noinst)
libmca_fs_plfs_la_SOURCES = $(fs_plfs_sources)
libmca_fs_plfs_la_LIBADD = $(fs_plfs_LIBS)
libmca_fs_plfs_la_LDFLAGS = -module -avoid-version $(fs_plfs_LDFLAGS)

Просмотреть файл

@ -1,41 +0,0 @@
# -*- shell-script -*-
#
# Copyright (c) 2004-2005 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 (c) 2010 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2008-2014 University of Houston. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
# MCA_fs_plfs_CONFIG(action-if-can-compile,
# [action-if-cant-compile])
# ------------------------------------------------
AC_DEFUN([MCA_ompi_fs_plfs_CONFIG],[
AC_CONFIG_FILES([ompi/mca/fs/plfs/Makefile])
OMPI_CHECK_PLFS([fs_plfs],
[fs_plfs_happy="yes"],
[fs_plfs_happy="no"])
AS_IF([test "$fs_plfs_happy" = "yes"],
[$1],
[$2])
# substitute in the things needed to build plfs
AC_SUBST([fs_plfs_CPPFLAGS])
AC_SUBST([fs_plfs_LDFLAGS])
AC_SUBST([fs_plfs_LIBS])
])dnl

Просмотреть файл

@ -1,154 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2017 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 (c) 2008-2015 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* These symbols are in a file by themselves to provide nice linker
* semantics. Since linkers generally pull in symbols by object fules,
* keeping these symbols as the only symbols in this file prevents
* utility programs such as "ompi_info" from having to import entire
* modules just to query their version and parameters
*/
#include "ompi_config.h"
#include "mpi.h"
#include "ompi/mca/fs/fs.h"
#include "ompi/mca/fs/base/base.h"
#include "ompi/mca/fs/plfs/fs_plfs.h"
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h> /* or <sys/vfs.h> */
#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef HAVE_SYS_MOUNT_H
#include <sys/mount.h>
#endif
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
#include <sys/ioctl.h>
#include <plfs.h>
/*
* *******************************************************************
* ************************ actions structure ************************
* *******************************************************************
*/
static mca_fs_base_module_1_0_0_t plfs = {
mca_fs_plfs_module_init, /* initalise after being selected */
mca_fs_plfs_module_finalize, /* close a module on a communicator */
mca_fs_plfs_file_open,
mca_fs_plfs_file_close,
mca_fs_plfs_file_delete,
mca_fs_plfs_file_set_size,
mca_fs_plfs_file_get_size,
mca_fs_plfs_file_sync
};
/*
* *******************************************************************
* ************************* structure ends **************************
* *******************************************************************
*/
int mca_fs_plfs_component_init_query(bool enable_progress_threads,
bool enable_mpi_threads)
{
/* Nothing to do */
return OMPI_SUCCESS;
}
struct mca_fs_base_module_1_0_0_t *
mca_fs_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority)
{
int err;
char *dir;
struct statfs fsbuf;
char *tmp;
char wpath[1024];
/* The code in this function is based on the ADIO FS selection in ROMIO
* Copyright (C) 1997 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*/
*priority = mca_fs_plfs_priority;
tmp = strchr (fh->f_filename, ':');
if (!tmp) {
if (OMPIO_ROOT == fh->f_rank) {
do {
err = statfs (fh->f_filename, &fsbuf);
} while (err && (errno == ESTALE));
if (err && (ENOENT == errno)) {
mca_fs_base_get_parent_dir (fh->f_filename, &dir);
err = statfs (dir, &fsbuf);
free (dir);
}
getcwd( wpath, sizeof(wpath) );
if(is_plfs_path(wpath) == 1) {
fh->f_fstype = PLFS;
}
}
fh->f_comm->c_coll->coll_bcast (&(fh->f_fstype),
1,
MPI_INT,
OMPIO_ROOT,
fh->f_comm,
fh->f_comm->c_coll->coll_bcast_module);
}
else {
if (!strncmp(fh->f_filename, "plfs:", 7) ||
!strncmp(fh->f_filename, "PLFS:", 7)) {
fh->f_fstype = PLFS;
}
}
if (PLFS == fh->f_fstype) {
if (*priority < 50) {
*priority = 50;
return &plfs;
}
}
return NULL;
}
int mca_fs_plfs_component_file_unquery (mca_io_ompio_file_t *file)
{
/* This function might be needed for some purposes later. for now it
* does not have anything to do since there are no steps which need
* to be undone if this module is not selected */
return OMPI_SUCCESS;
}
int mca_fs_plfs_module_init (mca_io_ompio_file_t *file)
{
/* Make sure the file type is not overwritten by the last queried
* component */
file->f_fstype = PLFS;
return OMPI_SUCCESS;
}
int mca_fs_plfs_module_finalize (mca_io_ompio_file_t *file)
{
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,83 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 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 (c) 2008-2016 University of Houston. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef MCA_FS_PLFS_H
#define MCA_FS_PLFS_H
#include "ompi_config.h"
#include "ompi/mca/mca.h"
#include "ompi/mca/fs/fs.h"
#include "ompi/mca/common/ompio/common_ompio.h"
#include <plfs.h>
extern int mca_fs_plfs_priority;
BEGIN_C_DECLS
int mca_fs_plfs_component_init_query(bool enable_progress_threads,
bool enable_mpi_threads);
struct mca_fs_base_module_1_0_0_t *
mca_fs_plfs_component_file_query (mca_io_ompio_file_t *fh, int *priority);
int mca_fs_plfs_component_file_unquery (mca_io_ompio_file_t *file);
int mca_fs_plfs_module_init (mca_io_ompio_file_t *file);
int mca_fs_plfs_module_finalize (mca_io_ompio_file_t *file);
OMPI_MODULE_DECLSPEC extern mca_fs_base_component_2_0_0_t mca_fs_plfs_component;
/*
* ******************************************************************
* ********* functions which are implemented in this module *********
* ******************************************************************
*/
int mca_fs_plfs_file_open (struct ompi_communicator_t *comm,
const char *filename,
int amode,
struct opal_info_t *info,
mca_io_ompio_file_t *fh);
int mca_fs_plfs_file_close (mca_io_ompio_file_t *fh);
int mca_fs_plfs_file_delete (char *filename,
struct opal_info_t *info);
int mca_fs_plfs_file_set_size (mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE size);
int mca_fs_plfs_file_get_size (mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE *size);
int mca_fs_plfs_file_sync (mca_io_ompio_file_t *fh);
int mca_fs_plfs_file_seek (mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE offset,
int whence);
/*
* ******************************************************************
* ************ functions implemented in this module end ************
* ******************************************************************
*/
END_C_DECLS
#endif /* MCA_FS_PLFS_H */

Просмотреть файл

@ -1,81 +0,0 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2004-2005 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 (c) 2008-2014 University of Houston. All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
* These symbols are in a file by themselves to provide nice linker
* semantics. Since linkers generally pull in symbols by object
* files, keeping these symbols as the only symbols in this file
* prevents utility programs such as "ompi_info" from having to import
* entire components just to query their version and parameters.
*/
#include "ompi_config.h"
#include "fs_plfs.h"
#include "mpi.h"
/*
* Public string showing the fs plfs component version number
*/
const char *mca_fs_plfs_component_version_string =
"OMPI/MPI plfs FS MCA component version " OMPI_VERSION;
static int plfs_register(void);
int mca_fs_plfs_priority = 20;
/*
* Instantiate the public struct with all of our public information
* and pointers to our public functions in it
*/
mca_fs_base_component_2_0_0_t mca_fs_plfs_component = {
/* First, the mca_component_t struct containing meta information
about the component itself */
.fsm_version = {
MCA_FS_BASE_VERSION_2_0_0,
/* Component name and version */
.mca_component_name = "plfs",
MCA_BASE_MAKE_VERSION(component, OMPI_MAJOR_VERSION, OMPI_MINOR_VERSION,
OMPI_RELEASE_VERSION),
.mca_register_component_params = plfs_register,
},
.fsm_data = {
/* This component is checkpointable */
MCA_BASE_METADATA_PARAM_CHECKPOINT
},
.fsm_init_query = mca_fs_plfs_component_init_query, /* get thread level */
.fsm_file_query = mca_fs_plfs_component_file_query, /* get priority and actions */
.fsm_file_unquery = mca_fs_plfs_component_file_unquery, /* undo what was done by previous function */
};
static int
plfs_register(void)
{
mca_fs_plfs_priority = 20;
(void) mca_base_component_var_register(&mca_fs_plfs_component.fsm_version,
"priority", "Priority of the plfs fs component",
MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
OPAL_INFO_LVL_9,
MCA_BASE_VAR_SCOPE_READONLY, &mca_fs_plfs_priority);
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,84 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2017 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fs_plfs.h"
#include <fcntl.h>
#include <unistd.h>
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/fs/fs.h"
/*
* file_close_plfs
*
* Function: - closes a new file
* Accepts: - file handle
* Returns: - Success if file closed
*/
int
mca_fs_plfs_file_close (mca_io_ompio_file_t *fh)
{
int flags;
plfs_error_t plfs_ret = PLFS_SUCCESS;
int amode;
char wpath[1024];
fh->f_comm->c_coll->coll_barrier (fh->f_comm,
fh->f_comm->c_coll->coll_barrier_module);
getcwd( wpath, sizeof(wpath) );
sprintf( wpath,"%s/%s",wpath,fh->f_filename );
plfs_ret = plfs_access(wpath, F_OK);
if ( PLFS_SUCCESS != plfs_ret ) {
opal_output(0, "fs_plfs_file_close: Error in plfs_access:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR; // file doesn't exist
}
amode = 0;
if (fh->f_amode & MPI_MODE_CREATE)
amode = amode | O_CREAT;
if (fh->f_amode & MPI_MODE_RDONLY)
amode = amode | O_RDONLY;
if (fh->f_amode & MPI_MODE_WRONLY)
amode = amode | O_WRONLY;
if (fh->f_amode & MPI_MODE_RDWR)
amode = amode | O_RDWR;
if (fh->f_amode & MPI_MODE_EXCL) {
return OMPI_ERROR;
}
plfs_ret = plfs_sync(fh->f_fs_ptr);
if (PLFS_SUCCESS != plfs_ret) {
opal_output(0, "fs_plfs_file_close: Error in plfs_sync:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR;
}
plfs_ret = plfs_close(fh->f_fs_ptr, fh->f_rank, 0, amode ,NULL, &flags);
if (PLFS_SUCCESS != plfs_ret) {
opal_output(0, "fs_plfs_file_close: Error in plfs_close:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR;
}
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,51 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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 (c) 2008-2014 University of Houston. All rights reserved.
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fs_plfs.h"
#include <unistd.h>
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/fs/fs.h"
/*
* file_delete_plfs
*
* Function: - deletes a file
* Accepts: - file name & info
* Returns: - Success if file closed
*/
int
mca_fs_plfs_file_delete (char* file_name,
struct opal_info_t *info)
{
plfs_error_t plfs_ret;
char wpath[1024];
getcwd( wpath, sizeof(wpath) );
sprintf( wpath,"%s/%s",wpath,file_name );
plfs_ret = plfs_unlink( wpath );
if (PLFS_SUCCESS != plfs_ret) {
opal_output(0, "fs_plfs_file_delete: Error in plfs_unlink:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR;
}
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,56 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fs_plfs.h"
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/fs/fs.h"
/*
* file_get_size_plfs
*
* Function: - get_size of a file
* Accepts: - same arguments as MPI_File_get_size()
* Returns: - Success if size is get
*/
int
mca_fs_plfs_file_get_size (mca_io_ompio_file_t *fh,
OMPI_MPI_OFFSET_TYPE *size)
{
Plfs_fd *pfd = NULL;
plfs_error_t plfs_ret;
struct stat st;
char wpath[1024];
int size_only = 1;
getcwd(wpath, sizeof(wpath));
sprintf(wpath,"%s/%s",wpath,fh->f_filename);
plfs_ret = plfs_getattr(pfd, wpath, &st, size_only);
if (PLFS_SUCCESS != plfs_ret) {
opal_output(0, "fs_plfs_file_get_size: Error in plfs_getattr:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR;
}
*size = st.st_size;
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,112 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2017 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 (c) 2008-2014 University of Houston. All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fs_plfs.h"
#include <fcntl.h>
#include <unistd.h>
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/fs/fs.h"
#include "ompi/communicator/communicator.h"
#include "ompi/info/info.h"
#include <sys/ioctl.h>
/*
* file_open_plfs
*
* Function: - opens a new file
* Accepts: - same arguments as MPI_File_open()
* Returns: - Success if new file handle
*/
int
mca_fs_plfs_file_open (struct ompi_communicator_t *comm,
const char* filename,
int access_mode,
struct opal_info_t *info,
mca_io_ompio_file_t *fh)
{
int rank;
int amode;
int old_mask, perm;
plfs_error_t plfs_ret;
Plfs_fd *pfd = NULL;
char wpath[1024];
rank = ompi_comm_rank ( comm );
getcwd( wpath, sizeof(wpath) );
sprintf( wpath,"%s/%s",wpath,filename );
if (OMPIO_PERM_NULL == fh->f_perm) {
old_mask = umask(022);
umask(old_mask);
perm = old_mask ^ 0666;
}
else {
perm = fh->f_perm;
}
amode = 0;
if (access_mode & MPI_MODE_RDONLY)
amode = amode | O_RDONLY;
if (access_mode & MPI_MODE_WRONLY)
amode = amode | O_WRONLY;
if (access_mode & MPI_MODE_RDWR)
amode = amode | O_RDWR;
if (access_mode & MPI_MODE_EXCL) {
if( is_plfs_path(wpath) == 1 ) { //the file already exists
return OMPI_ERROR;
}
}
if (0 == rank) {
/* MODE_CREATE and MODE_EXCL can only be set by one process */
if (access_mode & MPI_MODE_CREATE)
amode = amode | O_CREAT;
plfs_ret = plfs_open( &pfd, wpath, amode, fh->f_rank, perm, NULL );
fh->f_fs_ptr = pfd;
}
comm->c_coll->coll_bcast ( &plfs_ret, 1, MPI_INT, 0, comm, comm->c_coll->coll_bcast_module);
if ( PLFS_SUCCESS != plfs_ret ) {
return OMPI_ERROR;
}
if (0 != rank) {
plfs_ret = plfs_open( &pfd, wpath, amode, fh->f_rank, perm, NULL );
if (PLFS_SUCCESS != plfs_ret) {
opal_output(0, "fs_plfs_file_open: Error in plfs_open:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR;
}
else {
fh->f_fs_ptr = pfd;
}
}
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,41 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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 (c) 2008-2011 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fs_plfs.h"
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/fs/fs.h"
/*
* file_set_size_plfs
*
* Function: - set_size of a file
* Accepts: - same arguments as MPI_File_set_size()
* Returns: - Success if size is set
*/
int
mca_fs_plfs_file_set_size (mca_io_ompio_file_t *file_handle,
OMPI_MPI_OFFSET_TYPE size)
{
printf ("PLFS SET SIZE\n");
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,45 +0,0 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 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 (c) 2008-2014 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "ompi_config.h"
#include "fs_plfs.h"
#include "mpi.h"
#include "ompi/constants.h"
#include "ompi/mca/fs/fs.h"
/*
* file_sync_plfs
*
* Function: - closes a new file
* Accepts: - file handle
* Returns: - Success if file closed
*/
int
mca_fs_plfs_file_sync (mca_io_ompio_file_t *fh)
{
plfs_error_t plfs_ret;
plfs_ret = plfs_sync( fh->f_fs_ptr );
if (PLFS_SUCCESS != plfs_ret) {
opal_output(0, "fs_plfs_file_sync: Error in plfs_sync:\n%s\n", strplfserr(plfs_ret));
return OMPI_ERROR;
}
return OMPI_SUCCESS;
}

Просмотреть файл

@ -1,7 +0,0 @@
#
# owner/status file
# owner: institution that is responsible for this package
# status: e.g. active, maintenance, unmaintained
#
owner: UH
status: active