Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
darshan
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
73
Issues
73
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
darshan
darshan
Commits
f759e67f
Commit
f759e67f
authored
Apr 09, 2020
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify static linking implementation
parent
50c4669d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
3 additions
and
192 deletions
+3
-192
darshan-runtime/Makefile.in
darshan-runtime/Makefile.in
+1
-16
darshan-runtime/darshan-config.in
darshan-runtime/darshan-config.in
+1
-1
darshan-runtime/lib/darshan-hdf5-stubs.c
darshan-runtime/lib/darshan-hdf5-stubs.c
+0
-95
darshan-runtime/lib/darshan-pnetcdf-stubs.c
darshan-runtime/lib/darshan-pnetcdf-stubs.c
+0
-77
darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in
darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in
+1
-1
darshan-runtime/share/ld-opts/darshan-hdf5-ld-opts
darshan-runtime/share/ld-opts/darshan-hdf5-ld-opts
+0
-1
darshan-runtime/share/ld-opts/darshan-pnetcdf-ld-opts
darshan-runtime/share/ld-opts/darshan-pnetcdf-ld-opts
+0
-1
No files found.
darshan-runtime/Makefile.in
View file @
f759e67f
...
...
@@ -20,7 +20,7 @@ DARSHAN_LOG_FORMAT = $(srcdir)/../darshan-log-format.h
DARSHAN_VERSION
=
@DARSHAN_VERSION@
ifndef
DISABLE_STATIC_LIB
all
:
lib/libdarshan.a
lib/libdarshan-stubs.a
all
:
lib/libdarshan.a
endif
ifndef
DISABLE_LDPRELOAD
all
:
lib/libdarshan.so
...
...
@@ -155,18 +155,12 @@ lib/darshan-hdf5.o: lib/darshan-hdf5.c darshan.h darshan-common.h $(DARSHAN_LOG_
lib/darshan-hdf5.po
:
lib/darshan-hdf5.c darshan.h darshan-dynamic.h darshan-common.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-common.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-dynamic.h darshan-common.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/darshan-lustre.o
:
lib/darshan-lustre.c darshan-lustre.h darshan.h darshan-common.h $(DARSHAN_LOG_FORMAT) $(srcdir)/../darshan-lustre-log-format.h | lib
$(CC)
$(CFLAGS)
-c
$<
-o
$@
...
...
@@ -210,20 +204,11 @@ lib/libdarshan.a: lib/darshan-core-init-finalize.o lib/darshan-core.o lib/darsha
lib/libdarshan.so
:
lib/darshan-core-init-finalize.po lib/darshan-core.po lib/darshan-common.po $(DARSHAN_DYNAMIC_MOD_OBJS) lib/lookup3.po lib/lookup8.po
$(CC)
$(CFLAGS_SHARED)
$(LDFLAGS)
-o
$@
$^
-lpthread
-lrt
-lz
-ldl
ifdef
BUILD_HDF5_MODULE
lib/libdarshan-stubs.a
:
lib/darshan-hdf5-stubs.o lib/darshan-pnetcdf-stubs.o
ar rcs
$@
$^
else
lib/libdarshan-stubs.a
:
lib/darshan-pnetcdf-stubs.o
ar rcs
$@
$^
endif
install
::
all
install
-d
$(DESTDIR)$(libdir)
ifndef
DISABLE_STATIC_LIB
install
-m
755 lib/libdarshan.a
$(DESTDIR)$(libdir)
install
-m
755 lib/libdarshan-stubs.a
$(DESTDIR)$(libdir)
endif
ifndef
DISABLE_LDPRELOAD
install
-m
755 lib/libdarshan.so
$(DESTDIR)$(libdir)
...
...
darshan-runtime/darshan-config.in
View file @
f759e67f
...
...
@@ -12,7 +12,7 @@ DARSHAN_LD_FLAGS="@LDFLAGS@"
# app used a library which in turn used one of those HLLs).
PRE_LD_FLAGS
=
"-L
$DARSHAN_LIB_PATH
$DARSHAN_LD_FLAGS
-ldarshan -lz -Wl,@
$DARSHAN_SHARE_PATH
/ld-opts/darshan-base-ld-opts"
POST_LD_FLAGS
=
"-L
$DARSHAN_LIB_PATH
-
Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group
-lz -lrt -lpthread"
POST_LD_FLAGS
=
"-L
$DARSHAN_LIB_PATH
-
ldarshan
-lz -lrt -lpthread"
# NOTE:
# - when dynamic linking there is no need for wrapping options, we simply
...
...
darshan-runtime/lib/darshan-hdf5-stubs.c
deleted
100644 → 0
View file @
50c4669d
/*
* 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
);
}
herr_t
H5get_libversion
(
unsigned
*
majnum
,
unsigned
*
minnum
,
unsigned
*
relnum
)
__attribute__
((
weak
));
herr_t
H5get_libversion
(
unsigned
*
majnum
,
unsigned
*
minnum
,
unsigned
*
relnum
)
{
int
rank
;
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
if
(
rank
==
0
)
{
fprintf
(
stderr
,
"WARNING: Darshan H5get_libversion() 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
deleted
100644 → 0
View file @
50c4669d
/*
* 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
*/
darshan-runtime/lib/pkgconfig/darshan-runtime.pc.in
View file @
f759e67f
...
...
@@ -16,4 +16,4 @@ darshan_linkopts="-Wl,@${darshan_share}/ld-opts/darshan-base-ld-opts"
Cflags:
Libs: -ldarshan
Libs.private: ${darshan_linkopts} ${darshan_libdir} -lfmpich -lmpichcxx -
Wl,--start-group -ldarshan -ldarshan-stubs -Wl,--end-group
Libs.private: ${darshan_linkopts} ${darshan_libdir} -lfmpich -lmpichcxx -
ldarshan
darshan-runtime/share/ld-opts/darshan-hdf5-ld-opts
View file @
f759e67f
--undefined=__wrap_H5Fcreate
--wrap=H5Fcreate
--wrap=H5Fopen
--wrap=H5Fclose
darshan-runtime/share/ld-opts/darshan-pnetcdf-ld-opts
View file @
f759e67f
--undefined=__wrap_ncmpi_create
--wrap=ncmpi_create
--wrap=ncmpi_open
--wrap=ncmpi_close
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