Commit b59326f4 authored by Philip Carns's avatar Philip Carns
Browse files

new framework for tracking multiple concurrent open references per MPI rank


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@563 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 95b6fc75
...@@ -62,12 +62,6 @@ lib/darshan-posix.o: lib/darshan-posix.c darshan.h $(DARSHAN_LOG_FORMAT) | lib ...@@ -62,12 +62,6 @@ lib/darshan-posix.o: lib/darshan-posix.c darshan.h $(DARSHAN_LOG_FORMAT) | lib
lib/darshan-posix.po: lib/darshan-posix.c darshan.h $(DARSHAN_LOG_FORMAT) | lib lib/darshan-posix.po: lib/darshan-posix.c darshan.h $(DARSHAN_LOG_FORMAT) | lib
$(CC) $(CFLAGS_SHARED) -c $< -o $@ $(CC) $(CFLAGS_SHARED) -c $< -o $@
lib/darshan-file.o: lib/darshan-file.c darshan.h $(DARSHAN_LOG_FORMAT) | lib
$(CC) $(CFLAGS) -c $< -o $@
lib/darshan-file.po: lib/darshan-file.c darshan.h $(DARSHAN_LOG_FORMAT) | lib
$(CC) $(CFLAGS_SHARED) -c $< -o $@
lib/lookup3.o: lib/lookup3.c lib/lookup3.o: lib/lookup3.c
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
...@@ -86,10 +80,10 @@ lib/lookup8.po: lib/lookup8.c ...@@ -86,10 +80,10 @@ lib/lookup8.po: lib/lookup8.c
lib/libdarshan-mpi-io.a: lib/darshan-mpi-io.o lib/darshan-mpi-init-finalize.o lib/darshan-pnetcdf.o lib/darshan-hdf5.o lib/libdarshan-mpi-io.a: lib/darshan-mpi-io.o lib/darshan-mpi-init-finalize.o lib/darshan-pnetcdf.o lib/darshan-hdf5.o
ar rcs $@ $^ ar rcs $@ $^
lib/libdarshan-posix.a: lib/darshan-posix.o lib/lookup3.o lib/lookup8.o lib/darshan-file.o lib/libdarshan-posix.a: lib/darshan-posix.o lib/lookup3.o lib/lookup8.o
ar rcs $@ $^ ar rcs $@ $^
lib/libdarshan.so: lib/darshan-mpi-io.po lib/darshan-mpi-init-finalize.po lib/darshan-pnetcdf.po lib/darshan-hdf5.po lib/darshan-posix.po lib/lookup3.po lib/lookup8.po lib/darshan-file.po lib/libdarshan.so: lib/darshan-mpi-io.po lib/darshan-mpi-init-finalize.po lib/darshan-pnetcdf.po lib/darshan-hdf5.po lib/darshan-posix.po lib/lookup3.po lib/lookup8.po
$(CC) $(CFLAGS_SHARED) $(LDFLAGS) -ldl -o $@ $^ -lpthread -lrt -lz $(CC) $(CFLAGS_SHARED) $(LDFLAGS) -ldl -o $@ $^ -lpthread -lrt -lz
install:: all install:: all
......
...@@ -64,20 +64,8 @@ struct cp_access_counter ...@@ -64,20 +64,8 @@ struct cp_access_counter
struct darshan_file_runtime struct darshan_file_runtime
{ {
struct darshan_file* log_file; struct darshan_file* log_file;
MPI_File fh;
int fd;
int ncid;
int hid;
struct darshan_file_runtime* name_next; struct darshan_file_runtime* name_next;
struct darshan_file_runtime* name_prev; struct darshan_file_runtime* name_prev;
struct darshan_file_runtime* fd_next;
struct darshan_file_runtime* fd_prev;
struct darshan_file_runtime* ncid_next;
struct darshan_file_runtime* ncid_prev;
struct darshan_file_runtime* hid_next;
struct darshan_file_runtime* hid_prev;
struct darshan_file_runtime* fh_next;
struct darshan_file_runtime* fh_prev;
void* access_root; void* access_root;
int access_count; int access_count;
void* stride_root; void* stride_root;
...@@ -88,6 +76,29 @@ struct darshan_file_runtime ...@@ -88,6 +76,29 @@ struct darshan_file_runtime
enum cp_io_type last_io_type; enum cp_io_type last_io_type;
}; };
/* handles used by various APIs to refer to files */
enum darshan_handle_type
{
DARSHAN_FD = 1,
DARSHAN_FH,
DARSHAN_NCID,
DARSHAN_HID
};
#define DARSHAN_FILE_HANDLE_MAX (sizeof(MPI_File))
/* This struct is used to track a reference to a file by file
* descriptor, MPI file handle, ncdf id, etc.
*/
struct darshan_file_ref
{
struct darshan_file_runtime* file;
char handle[DARSHAN_FILE_HANDLE_MAX];
int handle_sz;
enum darshan_handle_type handle_type;
struct darshan_file_ref* next;
struct darshan_file_ref* prev;
};
/* in memory structure to keep up with job level data */ /* in memory structure to keep up with job level data */
struct darshan_job_runtime struct darshan_job_runtime
{ {
...@@ -99,11 +110,7 @@ struct darshan_job_runtime ...@@ -99,11 +110,7 @@ struct darshan_job_runtime
int flags; int flags;
int file_count; int file_count;
struct darshan_file_runtime* name_table[CP_HASH_SIZE]; struct darshan_file_runtime* name_table[CP_HASH_SIZE];
struct darshan_file_runtime* fd_table[CP_HASH_SIZE]; struct darshan_file_ref* handle_table[CP_HASH_SIZE];
struct darshan_file_runtime* ncid_table[CP_HASH_SIZE];
struct darshan_file_runtime* hid_table[CP_HASH_SIZE];
struct darshan_file_runtime* fh_table[CP_HASH_SIZE];
struct darshan_file_runtime* darshan_mru_file;
}; };
extern pthread_mutex_t cp_mutex; extern pthread_mutex_t cp_mutex;
...@@ -199,8 +206,6 @@ enum cp_counter_type ...@@ -199,8 +206,6 @@ enum cp_counter_type
extern struct darshan_job_runtime* darshan_global_job; extern struct darshan_job_runtime* darshan_global_job;
struct darshan_file_runtime* darshan_file_by_name(const char* name);
struct darshan_file_runtime* darshan_file_by_fd(int fd);
void darshan_initialize(int argc, char** argv, int nprocs, int rank); void darshan_initialize(int argc, char** argv, int nprocs, int rank);
void darshan_finalize(struct darshan_job_runtime* job); void darshan_finalize(struct darshan_job_runtime* job);
void darshan_condense(void); void darshan_condense(void);
...@@ -211,6 +216,24 @@ void darshan_walk_file_accesses(struct darshan_job_runtime* final_job); ...@@ -211,6 +216,24 @@ void darshan_walk_file_accesses(struct darshan_job_runtime* final_job);
double darshan_wtime(void); double darshan_wtime(void);
uint32_t darshan_hashlittle(const void *key, size_t length, uint32_t initval); uint32_t darshan_hashlittle(const void *key, size_t length, uint32_t initval);
uint64_t darshan_hash(register unsigned char *k, register uint64_t length, register uint64_t level); uint64_t darshan_hash(const register unsigned char *k, register uint64_t length, register uint64_t level);
struct darshan_file_runtime* darshan_file_by_name(const char* name);
struct darshan_file_runtime* darshan_file_by_name_sethandle(
const char* name,
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type);
struct darshan_file_runtime* darshan_file_by_handle(
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type);
void darshan_file_closehandle(
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type);
#endif /* __DARSHAN_H */ #endif /* __DARSHAN_H */
/*
* (C) 2009 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
/* This is an API for finding and tracking file records by file name and/or
* various file handles
*/
#include <pthread.h>
#include "mpi.h"
#include "darshan-file.h"
static pthread_mutex_t darshan_file_lock = PTHREAD_MUTEX_INITIALIZER;
#define DARSHAN_FILE_HANDLE_MAX (sizeof(MPI_File))
struct darshan_file_ref
{
struct darshan_file_runtime* file;
char handle[DARSHAN_FILE_HANDLE_MAX];
int handle_sz;
enum darshan_handle_type type;
struct darshan_file_ref* next;
struct darshan_file_ref* prev;
};
#define DARSHAN_FILE_TABLE_SIZE 16
static struct darshan_file_ref* darshan_file_table[DARSHAN_FILE_TABLE_SIZE] = {NULL};
struct darshan_file_runtime* darshan_file_by_name(const char* name)
{
return(NULL);
}
struct darshan_file_runtime* darshan_file_by_name_sethandle(
const char* name,
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type)
{
return(NULL);
}
struct darshan_file_runtime* darshan_file_by_handle(
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type)
{
return(NULL);
}
struct darshan_file_runtime* darshan_file_closehandle(
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type)
{
return(NULL);
}
/*
* (C) 2009 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
/* This is an API for finding and tracking file records by file name and/or
* various file handles
*/
#ifndef __DARSHAN_FILE_H
#define __DARSHAN_FILE_H
#include "darshan.h"
enum darshan_handle_type
{
DARSHAN_FD = 1,
DARSHAN_FH,
DARSHAN_NCID,
DARSHAN_HID
};
struct darshan_file_runtime* darshan_file_by_name(const char* name);
struct darshan_file_runtime* darshan_file_by_name_sethandle(
const char* name,
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type);
struct darshan_file_runtime* darshan_file_by_handle(
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type);
struct darshan_file_runtime* darshan_file_closehandle(
const void* handle,
int handle_sz,
enum darshan_handle_type handle_type);
#endif /* __DARSHAN_FILE_H */
...@@ -51,6 +51,8 @@ DARSHAN_FORWARD_DECL(H5Fopen, hid_t, (const char *filename, unsigned flags, hid_ ...@@ -51,6 +51,8 @@ DARSHAN_FORWARD_DECL(H5Fopen, hid_t, (const char *filename, unsigned flags, hid_
DARSHAN_FORWARD_DECL(H5Fclose, herr_t, (hid_t file_id)); DARSHAN_FORWARD_DECL(H5Fclose, herr_t, (hid_t file_id));
static struct darshan_file_runtime* darshan_file_by_hid(int hid); static struct darshan_file_runtime* darshan_file_by_hid(int hid);
static void darshan_file_close_hid(int hid);
static struct darshan_file_runtime* darshan_file_by_name_sethid(const char* name, int hid);
hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags, hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
hid_t create_plist, hid_t access_plist) hid_t create_plist, hid_t access_plist)
...@@ -58,7 +60,6 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags, ...@@ -58,7 +60,6 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
int ret; int ret;
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
char* tmp; char* tmp;
int hash_index;
MAP_OR_FAIL(H5Fcreate); MAP_OR_FAIL(H5Fcreate);
...@@ -76,21 +77,13 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags, ...@@ -76,21 +77,13 @@ hid_t DARSHAN_DECL(H5Fcreate)(const char *filename, unsigned flags,
filename = tmp + 1; filename = tmp + 1;
} }
file = darshan_file_by_name(filename); file = darshan_file_by_name_sethid(filename, ret);
/* TODO: handle the case of multiple concurrent opens */ if(file)
if(file && (file->hid == -1))
{ {
file->hid = ret;
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0)
CP_F_SET(file, CP_F_OPEN_TIMESTAMP, CP_F_SET(file, CP_F_OPEN_TIMESTAMP,
PMPI_Wtime()); PMPI_Wtime());
CP_INC(file, CP_HDF5_OPENS, 1); CP_INC(file, CP_HDF5_OPENS, 1);
hash_index = file->hid & CP_HASH_MASK;
file->hid_prev = NULL;
file->hid_next = darshan_global_job->hid_table[hash_index];
if(file->hid_next)
file->hid_next->hid_prev = file;
darshan_global_job->hid_table[hash_index] = file;
} }
CP_UNLOCK(); CP_UNLOCK();
} }
...@@ -104,7 +97,6 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags, ...@@ -104,7 +97,6 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
int ret; int ret;
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
char* tmp; char* tmp;
int hash_index;
MAP_OR_FAIL(H5Fopen); MAP_OR_FAIL(H5Fopen);
...@@ -122,21 +114,13 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags, ...@@ -122,21 +114,13 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
filename = tmp + 1; filename = tmp + 1;
} }
file = darshan_file_by_name(filename); file = darshan_file_by_name_sethid(filename, ret);
/* TODO: handle the case of multiple concurrent opens */ if(file)
if(file && (file->hid == -1))
{ {
file->hid = ret;
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0)
CP_F_SET(file, CP_F_OPEN_TIMESTAMP, CP_F_SET(file, CP_F_OPEN_TIMESTAMP,
PMPI_Wtime()); PMPI_Wtime());
CP_INC(file, CP_HDF5_OPENS, 1); CP_INC(file, CP_HDF5_OPENS, 1);
hash_index = file->hid & CP_HASH_MASK;
file->hid_prev = NULL;
file->hid_next = darshan_global_job->hid_table[hash_index];
if(file->hid_next)
file->hid_next->hid_prev = file;
darshan_global_job->hid_table[hash_index] = file;
} }
CP_UNLOCK(); CP_UNLOCK();
...@@ -149,8 +133,6 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags, ...@@ -149,8 +133,6 @@ hid_t DARSHAN_DECL(H5Fopen)(const char *filename, unsigned flags,
herr_t DARSHAN_DECL(H5Fclose)(hid_t file_id) herr_t DARSHAN_DECL(H5Fclose)(hid_t file_id)
{ {
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
int hash_index;
int tmp_hid = file_id;
int ret; int ret;
MAP_OR_FAIL(H5Fclose); MAP_OR_FAIL(H5Fclose);
...@@ -161,26 +143,8 @@ herr_t DARSHAN_DECL(H5Fclose)(hid_t file_id) ...@@ -161,26 +143,8 @@ herr_t DARSHAN_DECL(H5Fclose)(hid_t file_id)
file = darshan_file_by_hid(file_id); file = darshan_file_by_hid(file_id);
if(file) if(file)
{ {
file->hid = -1;
CP_F_SET(file, CP_F_CLOSE_TIMESTAMP, PMPI_Wtime()); CP_F_SET(file, CP_F_CLOSE_TIMESTAMP, PMPI_Wtime());
if(file->hid_prev == NULL) darshan_file_close_hid(file_id);
{
/* head of hid hash table list */
hash_index = tmp_hid & CP_HASH_MASK;
darshan_global_job->hid_table[hash_index] = file->hid_next;
if(file->hid_next)
file->hid_next->hid_prev = NULL;
}
else
{
if(file->hid_prev)
file->hid_prev->hid_next = file->hid_next;
if(file->hid_next)
file->hid_next->hid_prev = file->hid_prev;
}
file->hid_prev = NULL;
file->hid_next = NULL;
darshan_global_job->darshan_mru_file = file; /* in case we open it again */
} }
CP_UNLOCK(); CP_UNLOCK();
...@@ -188,44 +152,27 @@ herr_t DARSHAN_DECL(H5Fclose)(hid_t file_id) ...@@ -188,44 +152,27 @@ herr_t DARSHAN_DECL(H5Fclose)(hid_t file_id)
} }
static struct darshan_file_runtime* darshan_file_by_hid(int hid) static struct darshan_file_runtime* darshan_file_by_name_sethid(const char* name, int hid)
{ {
int hash_index;
struct darshan_file_runtime* tmp_file; struct darshan_file_runtime* tmp_file;
if(!darshan_global_job) tmp_file = darshan_file_by_name_sethandle(name, &hid, sizeof(hid), DARSHAN_HID);
{ return(tmp_file);
return(NULL); }
}
/* if we have already condensed the data, then just hand the first file
* back
*/
if(darshan_global_job->flags & CP_FLAG_CONDENSED)
{
return(&darshan_global_job->file_runtime_array[0]);
}
/* try mru first */ static void darshan_file_close_hid(int hid)
if(darshan_global_job->darshan_mru_file && darshan_global_job->darshan_mru_file->hid == hid) {
{ darshan_file_closehandle(&hid, sizeof(hid), DARSHAN_HID);
return(darshan_global_job->darshan_mru_file); return;
} }
/* search hash table */ static struct darshan_file_runtime* darshan_file_by_hid(int hid)
hash_index = hid & CP_HASH_MASK; {
tmp_file = darshan_global_job->hid_table[hash_index]; struct darshan_file_runtime* tmp_file;
while(tmp_file)
{
if(tmp_file->hid == hid)
{
darshan_global_job->darshan_mru_file = tmp_file;
return(tmp_file);
}
tmp_file = tmp_file->hid_next;
}
return(NULL); tmp_file = darshan_file_by_handle(&hid, sizeof(hid), DARSHAN_HID);
return(tmp_file);
} }
......
...@@ -178,7 +178,6 @@ extern char* __progname; ...@@ -178,7 +178,6 @@ extern char* __progname;
CP_F_SET(file, CP_F_READ_END_TIMESTAMP, __tm2); \ CP_F_SET(file, CP_F_READ_END_TIMESTAMP, __tm2); \
} while(0) } while(0)
static struct darshan_file_runtime* darshan_file_by_fh(MPI_File fh);
static void cp_log_construct_indices(struct darshan_job_runtime* final_job, static void cp_log_construct_indices(struct darshan_job_runtime* final_job,
int rank, int* inout_count, int* lengths, void** pointers, char* int rank, int* inout_count, int* lengths, void** pointers, char*
trailing_data); trailing_data);
...@@ -203,6 +202,9 @@ static void pairwise_variance_reduce ( ...@@ -203,6 +202,9 @@ static void pairwise_variance_reduce (
void *invec, void *inoutvec, int *len, MPI_Datatype *dt); void *invec, void *inoutvec, int *len, MPI_Datatype *dt);
static void debug_mounts(const char* mtab_file, const char* out_file); static void debug_mounts(const char* mtab_file, const char* out_file);
static struct darshan_file_runtime* darshan_file_by_fh(MPI_File fh);
static void darshan_file_close_fh(MPI_File fh);
static struct darshan_file_runtime* darshan_file_by_name_setfh(const char* name, MPI_File fh);
#define CP_MAX_MNTS 32 #define CP_MAX_MNTS 32
uint64_t mnt_hash_array[CP_MAX_MNTS] = {0}; uint64_t mnt_hash_array[CP_MAX_MNTS] = {0};
...@@ -695,8 +697,6 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F ...@@ -695,8 +697,6 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
char* tmp; char* tmp;
int comm_size; int comm_size;
int hash_index;
uint64_t tmp_hash;
double tm1, tm2; double tm1, tm2;
tm1 = darshan_wtime(); tm1 = darshan_wtime();
...@@ -717,11 +717,9 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F ...@@ -717,11 +717,9 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F
filename = tmp + 1; filename = tmp + 1;
} }
file = darshan_file_by_name(filename); file = darshan_file_by_name_setfh(filename, (*fh));
/* TODO: handle the case of multiple concurrent opens */ if(file)
if(file && (file->fh == MPI_FILE_NULL))
{ {
file->fh = *fh;
CP_SET(file, CP_MODE, amode); CP_SET(file, CP_MODE, amode);
CP_F_INC(file, CP_F_MPI_META_TIME, (tm2-tm1)); CP_F_INC(file, CP_F_MPI_META_TIME, (tm2-tm1));
if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0) if(CP_F_VALUE(file, CP_F_OPEN_TIMESTAMP) == 0)
...@@ -740,14 +738,8 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F ...@@ -740,14 +738,8 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F
{ {
CP_INC(file, CP_HINTS, 1); CP_INC(file, CP_HINTS, 1);
} }
tmp_hash = darshan_hash((void*)fh, sizeof(*fh), 0);
hash_index = tmp_hash & CP_HASH_MASK;
file->fh_prev = NULL;
file->fh_next = darshan_global_job->fh_table[hash_index];
if(file->fh_next)
file->fh_next->fh_prev = file;
darshan_global_job->fh_table[hash_index] = file;
} }
CP_UNLOCK(); CP_UNLOCK();
} }
...@@ -756,8 +748,6 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F ...@@ -756,8 +748,6 @@ int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_F
int MPI_File_close(MPI_File *fh) int MPI_File_close(MPI_File *fh)
{ {
int hash_index;
uint64_t tmp_hash;
struct darshan_file_runtime* file; struct darshan_file_runtime* file;
MPI_File tmp_fh = *fh; MPI_File tmp_fh = *fh;
double tm1, tm2; double tm1, tm2;
...@@ -771,28 +761,9 @@ int MPI_File_close(MPI_File *fh) ...@@ -771,28 +761,9 @@ int MPI_File_close(MPI_File *fh)
file = darshan_file_by_fh(tmp_fh); file = darshan_file_by_fh(tmp_fh);
if(file) if(file)
{ {
file->fh = MPI_FILE_NULL;
CP_F_SET(file, CP_F_CLOSE_TIMESTAMP, DARSHAN_MPI_CALL(PMPI_Wtime)()); CP_F_SET(file, CP_F_CLOSE_TIMESTAMP, DARSHAN_MPI_CALL(PMPI_Wtime)());
CP_F_INC(file, CP_F_MPI_META_TIME, (tm2-tm1)); CP_F_INC(file, CP_F_MPI_META_TIME, (tm2-tm1));
if(file->fh_prev == NULL) darshan_file_close_fh(tmp_fh);
{
/* head of fh hash table list */
tmp_hash = darshan_hash((void*)&tmp_fh, sizeof(tmp_fh), 0);
hash_index = tmp_hash & CP_HASH_MASK;
darshan_global_job->fh_table[hash_index] = file->fh_next;
if(file->fh_next)
file->fh_next->fh_prev = NULL;
}
else
{
if(file->fh_prev)
file->fh_prev->fh_next = file->fh_next;
if(file->fh_next)
file->fh_next->fh_prev = file->fh_prev;
}
file->fh_prev = NULL;
file->fh_next = NULL;
darshan_global_job->darshan_mru_file = file; /* in case we open it again, or hit posix calls */
} }
CP_UNLOCK(); CP_UNLOCK();
...@@ -1224,47 +1195,6 @@ int MPI_File_iwrite_shared(MPI_File fh, void * buf, int count, ...@@ -1224,47 +1195,6 @@ int MPI_File_iwrite_shared(MPI_File fh, void * buf, int count,
return(ret); return(ret);
} }
static struct darshan_file_runtime* darshan_file_by_fh(MPI_File fh)
{
struct darshan_file_runtime* tmp_file;
uint64_t tmp_hash = 0;