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
72
Issues
72
List
Boards
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
abf424f2
Commit
abf424f2
authored
Jan 16, 2015
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More changes to support darshan_core shutdown
parent
da477e42
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
204 additions
and
65 deletions
+204
-65
darshan-runtime/darshan-core.h
darshan-runtime/darshan-core.h
+13
-2
darshan-runtime/darshan.h
darshan-runtime/darshan.h
+6
-6
darshan-runtime/lib/darshan-core.c
darshan-runtime/lib/darshan-core.c
+178
-50
darshan-runtime/lib/darshan-posix.c
darshan-runtime/lib/darshan-posix.c
+7
-7
No files found.
darshan-runtime/darshan-core.h
View file @
abf424f2
...
...
@@ -12,6 +12,9 @@
#include "darshan.h"
/* TODO: enforce this when handing out ids */
#define DARSHAN_CORE_MAX_RECORDS 1024
struct
darshan_core_module
{
darshan_module_id
id
;
...
...
@@ -21,12 +24,20 @@ struct darshan_core_module
/* in memory structure to keep up with job level data */
/* TODO: trailing data ? */
struct
darshan_core_
job_
runtime
struct
darshan_core_runtime
{
struct
darshan_job
log_job
;
struct
darshan_core_module
*
mod_array
[
DARSHAN_MAX_MODS
];
char
exe
[
CP_EXE_LEN
+
1
];
double
wtime_offset
;
struct
darshan_core_record_ref
*
rec_hash
;
struct
darshan_core_module
*
mod_array
[
DARSHAN_MAX_MODS
];
};
struct
darshan_core_record_ref
{
char
*
name
;
darshan_record_id
id
;
UT_hash_handle
hlink
;
};
#endif
/* __DARSHAN_CORE_H */
darshan-runtime/darshan.h
View file @
abf424f2
...
...
@@ -44,7 +44,7 @@ typedef enum
DARSHAN_PNETCDF_MOD
,
}
darshan_module_id
;
typedef
uint64_t
darshan_
file
_id
;
typedef
uint64_t
darshan_
record
_id
;
struct
darshan_module_funcs
{
...
...
@@ -56,9 +56,9 @@ struct darshan_module_funcs
void
(
*
shutdown
)(
void
);
};
/*********************************************
* darshan-core functions
for
darshan modules *
*********************************************/
/*********************************************
********
* darshan-core functions
exported to
darshan modules *
*********************************************
********
/
void
darshan_core_register_module
(
darshan_module_id
id
,
...
...
@@ -66,11 +66,11 @@ void darshan_core_register_module(
struct
darshan_module_funcs
*
funcs
,
int
*
runtime_mem_limit
);
void
darshan_core_lookup_id
(
void
darshan_core_lookup_
record_
id
(
void
*
name
,
int
len
,
int
printable_flag
,
darshan_
file
_id
*
id
);
darshan_
record
_id
*
id
);
double
darshan_core_wtime
(
void
);
...
...
darshan-runtime/lib/darshan-core.c
View file @
abf424f2
This diff is collapsed.
Click to expand it.
darshan-runtime/lib/darshan-posix.c
View file @
abf424f2
...
...
@@ -25,8 +25,8 @@
#include <aio.h>
#include <pthread.h>
#include "darshan.h"
#include "uthash.h"
#include "darshan.h"
#ifndef HAVE_OFF64_T
typedef
int64_t
off64_t
;
...
...
@@ -159,7 +159,7 @@ enum darshan_f_posix_indices
struct
darshan_posix_file
{
darshan_
file
_id
f_id
;
darshan_
record
_id
f_id
;
int64_t
rank
;
int64_t
counters
[
CP_NUM_INDICES
];
double
fcounters
[
CP_F_NUM_INDICES
];
...
...
@@ -433,7 +433,7 @@ static struct posix_runtime_file* posix_file_by_name(const char *name)
{
struct
posix_runtime_file
*
file
=
NULL
;
char
*
newname
=
NULL
;
darshan_
file
_id
file_id
;
darshan_
record
_id
file_id
;
if
(
!
posix_runtime
)
return
(
NULL
);
...
...
@@ -443,14 +443,14 @@ static struct posix_runtime_file* posix_file_by_name(const char *name)
newname
=
(
char
*
)
name
;
/* get a unique id for this file from darshan core */
darshan_core_lookup_id
(
darshan_core_lookup_
record_
id
(
(
void
*
)
newname
,
strlen
(
newname
),
1
,
&
file_id
);
/* search the hash table for this file record, and return if found */
HASH_FIND
(
hlink
,
posix_runtime
->
file_hash
,
&
file_id
,
sizeof
(
darshan_
file
_id
),
file
);
HASH_FIND
(
hlink
,
posix_runtime
->
file_hash
,
&
file_id
,
sizeof
(
darshan_
record
_id
),
file
);
if
(
file
)
{
if
(
newname
!=
name
)
...
...
@@ -466,7 +466,7 @@ static struct posix_runtime_file* posix_file_by_name(const char *name)
file
->
file_record
->
f_id
=
file_id
;
/* add new record to file hash table */
HASH_ADD
(
hlink
,
posix_runtime
->
file_hash
,
file_record
->
f_id
,
sizeof
(
darshan_
file
_id
),
file
);
HASH_ADD
(
hlink
,
posix_runtime
->
file_hash
,
file_record
->
f_id
,
sizeof
(
darshan_
record
_id
),
file
);
posix_runtime
->
file_array_ndx
++
;
}
...
...
@@ -518,7 +518,7 @@ static struct posix_runtime_file* posix_file_by_name_setfd(const char* name, int
static
void
posix_file_close_fd
(
int
fd
)
{
struct
posix_runtime_file_ref
*
ref
;
struct
posix_runtime_file_ref
*
ref
;
if
(
!
posix_runtime
)
return
;
...
...
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