Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Shane Snyder
darshan
Commits
328425b7
Commit
328425b7
authored
Aug 05, 2015
by
Shane Snyder
Browse files
add hdf5 and pnetcdf stubs library
parent
158337c9
Changes
3
Hide whitespace changes
Inline
Side-by-side
darshan-runtime/Makefile.in
View file @
328425b7
all
:
lib/libdarshan.a lib/darshan-null.o
all
:
lib/libdarshan.a
lib/libdarshan-stubs.a
lib/darshan-null.o
DESTDIR
=
srcdir
=
@srcdir@
...
...
@@ -75,12 +75,18 @@ lib/darshan-hdf5.o: lib/darshan-hdf5.c darshan.h $(DARSHAN_LOG_FORMAT) $(srcdir)
lib/darshan-hdf5.po
:
lib/darshan-hdf5.c darshan.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-hdf5-log-format.h | lib
$(CC)
$(CFLAGS_SHARED)
-c
$<
-o
$@
lib/darshan-hdf5-stubs.o
:
lib/darshan-hdf5-stubs.c darshan.h $(DARSHAN_LOG_FORMAT) | lib
$(CC)
$(CFLAGS)
-c
$<
-o
$@
lib/darshan-pnetcdf.o
:
lib/darshan-pnetcdf.c darshan.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-pnetcdf-log-format.h | lib
$(CC)
$(CFLAGS)
-c
$<
-o
$@
lib/darshan-pnetcdf.po
:
lib/darshan-pnetcdf.c darshan.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-pnetcdf-log-format.h | lib
$(CC)
$(CFLAGS_SHARED)
-c
$<
-o
$@
lib/darshan-pnetcdf-stubs.o
:
lib/darshan-pnetcdf-stubs.c darshan.h $(DARSHAN_LOG_FORMAT) | lib
$(CC)
$(CFLAGS)
-c
$<
-o
$@
lib/lookup3.o
:
lib/lookup3.c
$(CC)
$(CFLAGS)
-c
$<
-o
$@
...
...
@@ -96,12 +102,16 @@ lib/lookup8.po: lib/lookup8.c
lib/libdarshan.a
:
lib/darshan-core-init-finalize.o lib/darshan-core.o lib/darshan-common.o lib/darshan-posix.o lib/darshan-mpiio.o lib/darshan-hdf5.o lib/darshan-pnetcdf.o lib/lookup3.o lib/lookup8.o
ar rcs
$@
$^
lib/libdarshan-stubs.a
:
lib/darshan-hdf5-stubs.o lib/darshan-pnetcdf-stubs.o
ar rcs
$@
$^
lib/libdarshan.so
:
lib/darshan-core-init-finalize.po lib/darshan-core.po lib/darshan-common.po lib/darshan-posix.po lib/darshan-mpiio.po lib/darshan-hdf5.po lib/darshan-pnetcdf.po lib/lookup3.po lib/lookup8.po
$(CC)
$(CFLAGS_SHARED)
$(LDFLAGS)
-o
$@
$^
-lpthread
-lrt
-lz
-ldl
install
::
all
install
-d
$(libdir)
install
-m
755 lib/libdarshan.a
$(libdir)
install
-m
755 lib/libdarshan-stubs.a
$(libdir)
ifndef
DISABLE_LDPRELOAD
install
-m
755 lib/libdarshan.so
$(libdir)
endif
...
...
darshan-runtime/lib/darshan-hdf5-stubs.c
0 → 100644
View file @
328425b7
/*
* Copyright (C) 2015 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
/* This file contains stubs for the H5F functions intercepted by Darshan.
* They are defined as weak symbols in order to satisfy dependencies of the
* hdf5 wrappers in cases where hdf5 is not being used.
*/
#include "darshan-runtime-config.h"
#include <stdio.h>
#include <pthread.h>
#include <string.h>
#include "mpi.h"
#include "darshan.h"
/* hope this doesn't change any time soon */
typedef
int
hid_t
;
typedef
int
herr_t
;
hid_t
H5Fcreate
(
const
char
*
filename
,
unsigned
flags
,
hid_t
create_plist
,
hid_t
access_plist
)
__attribute__
((
weak
));
hid_t
H5Fcreate
(
const
char
*
filename
,
unsigned
flags
,
hid_t
create_plist
,
hid_t
access_plist
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
if
(
rank
==
0
)
{
fprintf
(
stderr
,
"WARNING: Darshan H5Fcreate() stub called; this is probably the result of a link-time problem.
\n
"
);
}
return
(
-
1
);
}
hid_t
H5Fopen
(
const
char
*
filename
,
unsigned
flags
,
hid_t
access_plist
)
__attribute__
((
weak
));
hid_t
H5Fopen
(
const
char
*
filename
,
unsigned
flags
,
hid_t
access_plist
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
if
(
rank
==
0
)
{
fprintf
(
stderr
,
"WARNING: Darshan H5Fopen() stub called; this is probably the result of a link-time problem.
\n
"
);
}
return
(
-
1
);
}
herr_t
H5Fclose
(
hid_t
file_id
)
__attribute__
((
weak
));
herr_t
H5Fclose
(
hid_t
file_id
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
if
(
rank
==
0
)
{
fprintf
(
stderr
,
"WARNING: Darshan H5Fclose() stub called; this is probably the result of a link-time problem.
\n
"
);
}
return
(
-
1
);
}
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ts=8 sts=4 sw=4 expandtab
*/
darshan-runtime/lib/darshan-pnetcdf-stubs.c
0 → 100644
View file @
328425b7
/*
* Copyright (C) 2015 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
/* This file contains stubs for the ncmpi functions intercepted by Darshan.
* They are defined as weak symbols in order to satisfy dependencies of the
* pnetcdf wrappers in cases where pnetcdf is not being used.
*/
#include "darshan-runtime-config.h"
#include <stdio.h>
#include <pthread.h>
#include <string.h>
#include "mpi.h"
#include "darshan.h"
int
ncmpi_create
(
MPI_Comm
comm
,
const
char
*
path
,
int
cmode
,
MPI_Info
info
,
int
*
ncidp
)
__attribute__
((
weak
));
int
ncmpi_create
(
MPI_Comm
comm
,
const
char
*
path
,
int
cmode
,
MPI_Info
info
,
int
*
ncidp
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
if
(
rank
==
0
)
{
fprintf
(
stderr
,
"WARNING: Darshan ncmpi_create() stub called; this is probably the result of a link-time problem.
\n
"
);
}
return
(
-
1
);
}
int
ncmpi_open
(
MPI_Comm
comm
,
const
char
*
path
,
int
omode
,
MPI_Info
info
,
int
*
ncidp
)
__attribute__
((
weak
));
int
ncmpi_open
(
MPI_Comm
comm
,
const
char
*
path
,
int
omode
,
MPI_Info
info
,
int
*
ncidp
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
if
(
rank
==
0
)
{
fprintf
(
stderr
,
"WARNING: Darshan ncmpi_open() stub called; this is probably the result of a link-time problem.
\n
"
);
}
return
(
-
1
);
}
int
ncmpi_close
(
int
ncid
)
__attribute__
((
weak
));
int
ncmpi_close
(
int
ncid
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
if
(
rank
==
0
)
{
fprintf
(
stderr
,
"WARNING: Darshan ncmpi_close() stub called; this is probably the result of a link-time problem.
\n
"
);
}
return
(
-
1
);
}
/*
* Local variables:
* c-indent-level: 4
* c-basic-offset: 4
* End:
*
* vim: ts=8 sts=4 sw=4 expandtab
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment