Commit 14668236 authored by Philip Carns's avatar Philip Carns

stubs for new file tracking api


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@561 3b7491f3-a168-0410-bf4b-c445ed680a29
parent e3cc1091
......@@ -62,6 +62,12 @@ 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
$(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
$(CC) $(CFLAGS) -c $< -o $@
......@@ -80,10 +86,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
ar rcs $@ $^
lib/libdarshan-posix.a: lib/darshan-posix.o lib/lookup3.o lib/lookup8.o
lib/libdarshan-posix.a: lib/darshan-posix.o lib/lookup3.o lib/lookup8.o lib/darshan-file.o
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/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
$(CC) $(CFLAGS_SHARED) $(LDFLAGS) -ldl -o $@ $^ -lpthread -lrt -lz
install:: all
......
/*
* (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 */
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