Commit 62ed332a authored by Shane Snyder's avatar Shane Snyder
Browse files

add stubbed out lustre source and header files

parent d14cd758
* Copyright (C) 2015 University of Chicago.
* See COPYRIGHT notice in top-level directory.
/* current Lustre log format version */
/* TODO: add integer counters here (e.g., counter for stripe width, stripe size, etc etc) */
/* end of counters */\
#define X(a) a,
/* integer statistics for Lustre file records */
enum darshan_lustre_indices
#undef X
/* record structure for the Lustre module. a record is created and stored for
* every file opened that belongs to a Lustre file system. This record includes:
* - a corresponding record identifier (created by hashing the file path)
* - the rank of the process which opened the file (-1 for shared files)
* - integer file I/O statistics (stripe size, width, # of OSTs, etc.)
struct darshan_lustre_record
darshan_record_id rec_id;
int64_t rank;
int64_t counters[LUSTRE_NUM_INDICES];
* Copyright (C) 2015 University of Chicago.
* See COPYRIGHT notice in top-level directory.
#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#include "darshan-runtime-config.h"
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <stdlib.h>
#include <assert.h>
#include <pthread.h>
#include "uthash.h"
#include "darshan.h"
#include "darshan-dynamic.h"
struct lustre_record_runtime
struct darshan_lustre_record *record;
UT_hash_handle hlink;
struct lustre_runtime
struct lustre_record_runtime *record_runtime_array;
struct darshan_lustre_record *record_array;
int record_array_size;
int record_array_ndx;
struct lustre_record_runtime *record_hash;
static struct lustre_runtime *lustre_runtime = NULL;
static pthread_mutex_t lustre_runtime_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
static int instrumentation_disabled = 0;
static int my_rank = -1;
static void lustre_begin_shutdown(void);
static void lustre_get_output_data(MPI_Comm mod_comm, darshan_record_id *shared_recs,
int shared_rec_count, void **lustre_buf, int *lustre_buf_sz);
static void lustre_shutdown(void);
#define LUSTRE_LOCK() pthread_mutex_lock(&lustre_runtime_mutex)
#define LUSTRE_UNLOCK() pthread_mutex_unlock(&lustre_runtime_mutex)
void darshan_instrument_lustre_file(char *filepath)
/* TODO: implement gathering of lustre data */
* Functions exported by Lustre module for coordinating with darshan-core *
static void lustre_begin_shutdown(void)
/* disable further instrumentation while Darshan shuts down */
instrumentation_disabled = 1;
static void lustre_get_output_data(
MPI_Comm mod_comm,
darshan_record_id *shared_recs,
int shared_rec_count,
void **lustre_buf,
int *lustre_buf_sz)
/* TODO: reduce shared lustre records, and set ouptut buffers */
static void lustre_shutdown(void)
/* TODO: free data structures */
lustre_runtime = NULL;
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
* vim: ts=8 sts=4 sw=4 expandtab
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment