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
74
Issues
74
List
Boards
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
1561ab23
Commit
1561ab23
authored
Jan 23, 2017
by
Shane Snyder
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue-218-val-counter' into 'master'
Issue 218 val counter Closes #218 See merge request !6
parents
8babcd89
ace2260c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
160 additions
and
3 deletions
+160
-3
ChangeLog
ChangeLog
+3
-0
darshan-runtime/lib/darshan-common.c
darshan-runtime/lib/darshan-common.c
+7
-3
darshan-test/regression/test-cases/access-size-counter-test.sh
...an-test/regression/test-cases/access-size-counter-test.sh
+32
-0
darshan-test/regression/test-cases/src/access-size-counter-test.c
...test/regression/test-cases/src/access-size-counter-test.c
+118
-0
No files found.
ChangeLog
View file @
1561ab23
...
...
@@ -10,6 +10,9 @@ Darshan-3.1.3-pre1
* skip instrumentation attempts for anonymous mmap() calls; this avoids a
potentential deadlock condition when used with hugepages on Cray systems.
Reported by Glenn Lockwood and Cristian Simarro.
* fix segmentation fault in statistics collection for applications that issue
operations with a large number of distince access sizes or strides on the
same file. Reported by Glenn Lockwood.
Darshan-3.1.2
=============
...
...
darshan-runtime/lib/darshan-common.c
View file @
1561ab23
...
...
@@ -267,9 +267,13 @@ void darshan_common_val_counter(void **common_val_root, int *common_val_count,
(
*
common_val_count
)
++
;
}
/* update common access counters as we go */
DARSHAN_COMMON_VAL_COUNTER_INC
(
common_val_p
,
common_cnt_p
,
found
->
val
,
found
->
freq
,
1
);
/* update common access counters as we go, as long as we haven't already
* hit the limit in the number we are willing to track */
if
(
found
)
{
DARSHAN_COMMON_VAL_COUNTER_INC
(
common_val_p
,
common_cnt_p
,
found
->
val
,
found
->
freq
,
1
);
}
return
;
}
...
...
darshan-test/regression/test-cases/access-size-counter-test.sh
0 → 100755
View file @
1561ab23
#!/bin/bash
PROG
=
access-size-counter-test
# set log file path; remove previous log if present
export
DARSHAN_LOGFILE
=
$DARSHAN_TMP
/
${
PROG
}
.darshan
rm
-f
${
DARSHAN_LOGFILE
}
# compile
$DARSHAN_CC
$DARSHAN_TESTDIR
/test-cases/src/
${
PROG
}
.c
-o
$DARSHAN_TMP
/
${
PROG
}
if
[
$?
-ne
0
]
;
then
echo
"Error: failed to compile
${
PROG
}
"
1>&2
exit
1
fi
# execute
$DARSHAN_RUNJOB
$DARSHAN_TMP
/
${
PROG
}
-f
$DARSHAN_TMP
/
${
PROG
}
.tmp.dat
if
[
$?
-ne
0
]
;
then
echo
"Error: failed to execute
${
PROG
}
"
1>&2
exit
1
fi
# parse log
$DARSHAN_PATH
/bin/darshan-parser
$DARSHAN_LOGFILE
>
$DARSHAN_TMP
/
${
PROG
}
.darshan.txt
if
[
$?
-ne
0
]
;
then
echo
"Error: failed to parse
${
DARSHAN_LOGFILE
}
"
1>&2
exit
1
fi
# check results (for now just make sure it didn't crash)
exit
0
darshan-test/regression/test-cases/src/access-size-counter-test.c
0 → 100644
View file @
1561ab23
/*
* (C) 1995-2001 Clemson University and Argonne National Laboratory.
*
* See COPYING in top-level directory.
*/
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <sys/time.h>
#include <mpi.h>
#include <errno.h>
#include <getopt.h>
/* DEFAULT VALUES FOR OPTIONS */
static
char
opt_file
[
256
]
=
"test.out"
;
/* function prototypes */
static
int
parse_args
(
int
argc
,
char
**
argv
);
static
void
usage
(
void
);
/* global vars */
static
int
mynod
=
0
;
static
int
nprocs
=
1
;
int
main
(
int
argc
,
char
**
argv
)
{
int
namelen
;
char
processor_name
[
MPI_MAX_PROCESSOR_NAME
];
char
buffer
[
128
]
=
{
0
};
int
fd
;
int
i
=
1
;
int
ret
;
/* startup MPI and determine the rank of this process */
MPI_Init
(
&
argc
,
&
argv
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
nprocs
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
mynod
);
MPI_Get_processor_name
(
processor_name
,
&
namelen
);
/* parse the command line arguments */
parse_args
(
argc
,
argv
);
if
(
mynod
==
0
)
{
fd
=
open
(
opt_file
,
O_WRONLY
|
O_TRUNC
|
O_CREAT
,
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
);
if
(
fd
<
0
)
{
perror
(
"open"
);
return
(
-
1
);
}
/* cycle through a range of unique write access sizes */
for
(
i
=
1
;
i
<
128
;
i
++
)
{
ret
=
write
(
fd
,
buffer
,
i
);
if
(
ret
<
0
)
{
perror
(
"write"
);
return
(
-
1
);
}
if
(
ret
!=
i
)
{
fprintf
(
stderr
,
"Short write: %d
\n
"
,
ret
);
return
(
-
1
);
}
}
close
(
fd
);
}
MPI_Finalize
();
return
(
0
);
}
static
int
parse_args
(
int
argc
,
char
**
argv
)
{
int
c
;
while
((
c
=
getopt
(
argc
,
argv
,
"f:"
))
!=
EOF
)
{
switch
(
c
)
{
case
'f'
:
/* filename */
strncpy
(
opt_file
,
optarg
,
255
);
break
;
case
'?'
:
/* unknown */
if
(
mynod
==
0
)
usage
();
exit
(
1
);
default:
break
;
}
}
return
(
0
);
}
static
void
usage
(
void
)
{
printf
(
"Usage: stdio-test [<OPTIONS>...]
\n
"
);
printf
(
"
\n
<OPTIONS> is one of
\n
"
);
printf
(
" -f filename [default: test.out]
\n
"
);
printf
(
" -h print this help
\n
"
);
}
/*
* Local variables:
* c-indent-level: 3
* c-basic-offset: 3
* tab-width: 3
*
* vim: ts=3
* End:
*/
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