Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kim, Jungwon
papyrus
Commits
3f64b049
Commit
3f64b049
authored
Feb 27, 2018
by
Antonio Gomez
Browse files
Tests for Stampede2. Removed debugging messages
parent
e5a2df72
Changes
16
Hide whitespace changes
Inline
Side-by-side
kv/src/DB.cpp
View file @
3f64b049
...
...
@@ -214,7 +214,7 @@ int DB::PutLocalObject(const char* key, size_t keylen, const char* val, size_t v
}
int
DB
::
PutLocalObjectOffset
(
const
char
*
key
,
size_t
keylen
,
const
char
*
val
,
size_t
vallen
,
const
off_t
offset
)
{
_debug
(
"Finding object with offset %d [key %s]"
,
offset
,
key
);
//
_debug ("Finding object with offset %d [key %s]", offset, key);
int
found
=
0
;
auto
it
=
objects
.
find
(
key
);
...
...
kv/src/Define.h
View file @
3f64b049
...
...
@@ -46,9 +46,17 @@
#define PAPYRUSKV_PERSISTANT 2
//Defines for the block and pool size
#define BLOCK_SIZE ((int)4096*4) //4096
#define POOL_SIZE PMEMBLK_MIN_POOL
#define POOL_MAX_AVAIL ((int)4096*4*766)
//#define BLOCK_SIZE ((int)4096*4) //4096
#define BLOCK_SIZE ((size_t)(1024 * 1024))
//#define BLOCK_SIZE ((size_t)(1024 * 512))
//#define BLOCK_SIZE ((size_t)(1024 * 32))
//#define BLOCK_SIZE ((size_t)(1024 * 8))
#define POOL_SIZE ((size_t)(1 << 30))
//#define POOL_SIZE PMEMBLK_MIN_POOL
#define POOL_MAX_AVAIL ((size_t)(1024 * 1024 * 767))
//#define POOL_MAX_AVAIL ((size_t)(1024 * 1024 * 1791))
//#define POOL_MAX_AVAIL ((size_t)(1024 * 1024 * 32506))
//#define POOL_MAX_AVAIL ((size_t)(1024 * 1024 * 130747))
//#define POOL_SIZE ((off_t) 1<<25)) //32 MB
//#define ELEMENT_SIZE 4096
...
...
kv/src/File.cpp
View file @
3f64b049
...
...
@@ -68,7 +68,7 @@ namespace papyruskv {
mounted
=
true
;
GetMode
(
mode
);
_debug
(
"File %s created"
,
filename
.
c_str
());
//
_debug ("File %s created", filename.c_str());
return
PAPYRUSKV_OK
;
}
...
...
@@ -338,8 +338,8 @@ namespace papyruskv {
int
File
::
WriteToVirtual
(
const
void
*
buf
,
size_t
size
,
off_t
offset
)
{
//First check if a pool containing the offset address already exists
int
found
=
0
;
_debug
(
"looking for object that has offset %d"
,
offset
);
_debug
(
"size %zu - max object size %d"
,
size
,
POOL_MAX_AVAIL
);
//
_debug ("looking for object that has offset %d", offset);
//
_debug ("size %zu - max object size %d", size, POOL_MAX_AVAIL);
int
start
=
int
(
offset
/
POOL_MAX_AVAIL
)
*
POOL_MAX_AVAIL
;
size_t
written
=
0
;
...
...
@@ -353,11 +353,11 @@ namespace papyruskv {
char
*
cstart
=
new
char
[
length
];
snprintf
(
cstart
,
length
+
1
,
"%d"
,
start
);
strcat
(
key
,
cstart
);
_debug
(
"putting offset for key %s"
,
key
);
//
_debug ("putting offset for key %s", key);
off_t
initial_offset
=
offset
%
POOL_MAX_AVAIL
;
size_t
temp_size
=
papyrus_min
(
POOL_MAX_AVAIL
-
initial_offset
,
size
-
written
);
_debug
(
"initial offset %zu - temp_size %zu"
,
initial_offset
,
temp_size
);
_debug
(
"writting %zu size with offset %zu"
,
temp_size
,
initial_offset
);
//
_debug ("initial offset %zu - temp_size %zu", initial_offset, temp_size);
//
_debug ("writting %zu size with offset %zu", temp_size, initial_offset);
struct
timeval
tv1
,
tv2
;
gettimeofday
(
&
tv1
,
NULL
);
int
ret
=
papyruskv_put_offset
(
db
,
key
,
PAPYRUSKV_MAX_KEYLEN
+
1
,
(
char
*
)
buf
+
written
,
temp_size
,
initial_offset
);
...
...
@@ -369,8 +369,8 @@ namespace papyruskv {
}
double
ellapsed
=
(
double
)(
tv2
.
tv_usec
-
tv1
.
tv_usec
)
/
1000000
+
(
double
)(
tv2
.
tv_sec
-
tv1
.
tv_sec
);
double
bw
=
((
double
)(
temp_size
)
/
(
1024.0
*
1024.0
))
/
ellapsed
;
_error
(
"
\n\n
(write) ellapsed time (us): %f"
,
ellapsed
);
_error
(
"bandwidth [%d]: %f GB/s
\n\n
"
,
temp_size
,
bw
);
//
_error ("\n\n (write) ellapsed time (us): %f", ellapsed);
//
_error ("bandwidth [%d]: %f GB/s\n\n", temp_size, bw);
delete
[]
key
;
start
+=
POOL_MAX_AVAIL
;
offset
=
0
;
...
...
kv/tests/20_ior/Makefile.in
View file @
3f64b049
# Makefile.in generated by automake 1.1
3.
4 from Makefile.am.
# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
...
...
@@ -80,9 +80,9 @@ host_triplet = @host@
subdir
=
.
DIST_COMMON
=
$(srcdir)
/Makefile.in
$(srcdir)
/Makefile.am
\
$(top_srcdir)
/configure
$(am__configure_deps)
ChangeLog README
\
config/config.guess config/config.sub
config/depcomp
\
config/install-sh config/missing
\
$(top_srcdir)
/config/config.guess
\
config/compile
config/config.guess config/config.sub
\
config/depcomp
config/install-sh config/missing
\
$(top_srcdir)
/config/compile
$(top_srcdir)
/config/config.guess
\
$(top_srcdir)
/config/config.sub
\
$(top_srcdir)
/config/install-sh
$(top_srcdir)
/config/missing
ACLOCAL_M4
=
$(top_srcdir)
/aclocal.m4
...
...
@@ -527,10 +527,16 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ
:
distdir
@
echo
WARNING:
"Support for shar distribution archives is"
\
"deprecated."
>
&2
@
echo
WARNING:
"It will be removed altogether in Automake 2.0"
>
&2
tardir
=
$(distdir)
&&
$(am__tar)
| compress
-c
>
$(distdir)
.tar.Z
$(am__post_remove_distdir)
dist-shar
:
distdir
@
echo
WARNING:
"Support for distribution archives compressed with"
\
"legacy program 'compress' is deprecated."
>
&2
@
echo
WARNING:
"It will be removed altogether in Automake 2.0"
>
&2
shar
$(distdir)
|
GZIP
=
$(GZIP_ENV)
gzip
-c
>
$(distdir)
.shar.gz
$(am__post_remove_distdir)
...
...
kv/tests/20_ior/aclocal.m4
View file @
3f64b049
# generated automatically by aclocal 1.1
3.
4 -*- Autoconf -*-
# generated automatically by aclocal 1.14 -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
...
...
@@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.])
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.1
3
'
[am__api_version='1.1
4
'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.1
3.
4], [],
m4_if([$1], [1.14], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
...
...
@@ -51,7 +51,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.1
3.
4])dnl
[AM_AUTOMAKE_VERSION([1.14])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
...
...
@@ -455,6 +455,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])
[_AM_PROG_CC_C_O
])
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
...
...
@@ -563,7 +569,48 @@ dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if rm -f && rm -fr && rm -rf; then : OK; else
cat >&2 <<'END'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Please tell bug-automake@gnu.org about your system, including the value
of your $PATH and any error possibly output before this message. This
can help us improve future automake versions.
END
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
echo 'Configuration will proceed anyway, since you have set the' >&2
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
echo >&2
else
cat >&2 <<'END'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
...
...
@@ -571,7 +618,6 @@ dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
...
...
@@ -789,6 +835,70 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_PROG_CC_C_O
# ---------------
# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
# to automatically call this.
AC_DEFUN([_AM_PROG_CC_C_O],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([compile])dnl
AC_LANG_PUSH([C])dnl
AC_CACHE_CHECK(
[whether $CC understands -c and -o together],
[am_cv_prog_cc_c_o],
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
# Make sure it works both with $CC and with simple cc.
# Following AC_PROG_CC_C_O, we do the test twice because some
# compilers refuse to overwrite an existing .o file with -o,
# though they will create one.
am_cv_prog_cc_c_o=yes
for am_i in 1 2; do
if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
&& test -f conftest2.$ac_objext; then
: OK
else
am_cv_prog_cc_c_o=no
break
fi
done
rm -f core conftest*
unset am_i])
if test "$am_cv_prog_cc_c_o" != yes; then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC="$am_aux_dir/compile $CC"
fi
AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_RUN_LOG(COMMAND)
# -------------------
# Run COMMAND, save the exit status in ac_status, and log it.
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
AC_DEFUN([AM_RUN_LOG],
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
(exit $ac_status); }])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
...
...
kv/tests/20_ior/config/config.sub
View file @
3f64b049
...
...
@@ -1006,7 +1006,7 @@ case $basic_machine in
;;
ppc64
)
basic_machine
=
powerpc64-unknown
;;
ppc64-
*
|
ppc64p7-
*
)
basic_machine
=
powerpc64-
`
echo
$basic_machine
|
sed
's/^[^-]*-//'
`
ppc64-
*
)
basic_machine
=
powerpc64-
`
echo
$basic_machine
|
sed
's/^[^-]*-//'
`
;;
ppc64le
|
powerpc64little
|
ppc64-le
|
powerpc64-little
)
basic_machine
=
powerpc64le-unknown
...
...
kv/tests/20_ior/configure
View file @
3f64b049
...
...
@@ -2534,7 +2534,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
# Automake support
am__api_version
=
'1.1
3
'
am__api_version
=
'1.1
4
'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
...
...
@@ -3063,6 +3063,47 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
# POSIX will say in a future version that running "rm -f" with no argument
# is OK; and we want to be able to make that assumption in our Makefile
# recipes. So use an aggressive probe to check that the usage we want is
# actually supported "in the wild" to an acceptable degree.
# See automake bug#10828.
# To make any issue more visible, cause the running configure to be aborted
# by default if the 'rm' program in use doesn't match our expectations; the
# user can still override this though.
if
rm
-f
&&
rm
-fr
&&
rm
-rf
;
then
: OK
;
else
cat
>
&2
<<
'
END
'
Oops!
Your 'rm' program seems unable to run without file operands specified
on the command line, even when the '-f' option is present. This is contrary
to the behaviour of most rm programs out there, and not conforming with
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
Please tell bug-automake@gnu.org about your system, including the value
of your
$PATH
and any error possibly output before this message. This
can help us improve future automake versions.
END
if
test
x
"
$ACCEPT_INFERIOR_RM_PROGRAM
"
=
x
"yes"
;
then
echo
'Configuration will proceed anyway, since you have set the'
>
&2
echo
'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"'
>
&2
echo
>
&2
else
cat
>
&2
<<
'
END
'
Aborting the configuration process, to ensure you take notice of the issue.
You can download and install GNU coreutils to get an 'rm' implementation
that behaves properly: <http://www.gnu.org/software/coreutils/>.
If you want to complete the configuration process using your problematic
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
to "yes", and re-run configure.
END
as_fn_error
$?
"Your 'rm' program is bad, sorry."
"
$LINENO
"
5
fi
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether to enable maintainer-specific portions of Makefiles"
>
&5
$as_echo_n
"checking whether to enable maintainer-specific portions of Makefiles... "
>
&6
;
}
...
...
@@ -4049,6 +4090,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link
=
'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu
=
$ac_cv_c_compiler_gnu
ac_ext
=
c
ac_cpp
=
'$CPP $CPPFLAGS'
ac_compile
=
'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link
=
'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu
=
$ac_cv_c_compiler_gnu
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether
$CC
understands -c and -o together"
>
&5
$as_echo_n
"checking whether
$CC
understands -c and -o together... "
>
&6
;
}
if
${
am_cv_prog_cc_c_o
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
# Make sure it works both with $CC and with simple cc.
# Following AC_PROG_CC_C_O, we do the test twice because some
# compilers refuse to overwrite an existing .o file with -o,
# though they will create one.
am_cv_prog_cc_c_o
=
yes
for
am_i
in
1 2
;
do
if
{
echo
"
$as_me
:
$LINENO
:
$CC
-c conftest.
$ac_ext
-o conftest2.
$ac_objext
"
>
&5
(
$CC
-c
conftest.
$ac_ext
-o
conftest2.
$ac_objext
)
>
&5 2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
\
&&
test
-f
conftest2.
$ac_objext
;
then
: OK
else
am_cv_prog_cc_c_o
=
no
break
fi
done
rm
-f
core conftest
*
unset
am_i
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$am_cv_prog_cc_c_o
"
>
&5
$as_echo
"
$am_cv_prog_cc_c_o
"
>
&6
;
}
if
test
"
$am_cv_prog_cc_c_o
"
!=
yes
;
then
# Losing compiler, so override with the script.
# FIXME: It is wrong to rewrite CC.
# But if we don't then we get into trouble of one sort or another.
# A longer-term fix would be to have automake use am__CC in this case,
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
CC
=
"
$am_aux_dir
/compile
$CC
"
fi
ac_ext
=
c
ac_cpp
=
'$CPP $CPPFLAGS'
ac_compile
=
'$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link
=
'$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu
=
$ac_cv_c_compiler_gnu
depcc
=
"
$CC
"
am_compiler_list
=
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking dependency style of
$depcc
"
>
&5
...
...
kv/tests/20_ior/contrib/Makefile.in
View file @
3f64b049
# Makefile.in generated by automake 1.1
3.
4 from Makefile.am.
# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
...
...
@@ -312,14 +312,14 @@ distclean-compile:
@am__fastdepCC_TRUE@
$(AM_V_at)$(am__mv)
$(DEPDIR)/$*.Tpo
$(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@
$(AM_V_CC)source
=
'$<'
object
=
'$@'
libtool
=
no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@
DEPDIR
=
$(DEPDIR)
$(CCDEPMODE)
$(depcomp)
@AMDEPBACKSLASH@
@am__fastdepCC_FALSE@
$(AM_V_CC@am__nodep@)$(COMPILE)
-c
$<
@am__fastdepCC_FALSE@
$(AM_V_CC@am__nodep@)$(COMPILE)
-c
-o
$@
$<
.c.obj
:
@am__fastdepCC_TRUE@
$(AM_V_CC)$(COMPILE)
-MT
$@
-MD
-MP
-MF
$(DEPDIR)/$*.Tpo
-c
-o
$@
`$(CYGPATH_W)
'$<'
`
@am__fastdepCC_TRUE@
$(AM_V_at)$(am__mv)
$(DEPDIR)/$*.Tpo
$(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@
$(AM_V_CC)source
=
'$<'
object
=
'$@'
libtool
=
no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@
DEPDIR
=
$(DEPDIR)
$(CCDEPMODE)
$(depcomp)
@AMDEPBACKSLASH@
@am__fastdepCC_FALSE@
$(AM_V_CC@am__nodep@)$(COMPILE)
-c
`$(CYGPATH_W)
'$<'
`
@am__fastdepCC_FALSE@
$(AM_V_CC@am__nodep@)$(COMPILE)
-c
-o
$@
`$(CYGPATH_W)
'$<'
`
ID
:
$(am__tagged_files)
$(am__define_uniq_tagged_files)
;
mkid
-fID
$$
unique
...
...
kv/tests/20_ior/doc/Makefile.in
View file @
3f64b049
# Makefile.in generated by automake 1.1
3.
4 from Makefile.am.
# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
...
...
kv/tests/20_ior/src/Makefile.am
View file @
3f64b049
...
...
@@ -9,7 +9,7 @@ ior_LDADD =
if
USE_DFS_AIORI
ior_SOURCES
+=
aiori-DFS.c
ior_LDADD
+=
/
root
/papyrus/build/kv/src/libpapyruskv.a
-lpthread
-L
/root/tools/nvml/usr/local/lib64/
-lpmem
-lpmemblk
ior_LDADD
+=
/
home1/05191/agomezig
/papyrus/build/kv/src/libpapyruskv.a
-lpthread
-L
${TACC_PMEM_LIB}
-lpmem
-lpmemblk
endif
if
USE_POSIX_AIORI
ior_SOURCES
+=
aiori-POSIX.c
...
...
kv/tests/20_ior/src/aiori-DFS.c
View file @
3f64b049
...
...
@@ -35,7 +35,7 @@
#include "aiori.h"
#include "iordef.h"
#include "/
root
/papyrus/include/papyrus/kv.h"
#include "/
home1/05191/agomezig
/papyrus/include/papyrus/kv.h"
#ifndef open64
/* necessary for TRU64 -- */
#define open64 open
/* unlikely, but may pose */
...
...
kv/tests/20_ior/src/ior.c
View file @
3f64b049
...
...
@@ -28,7 +28,7 @@
#endif
#include <assert.h>
#include </
root
/papyrus/include/papyrus/kv.h>
#include </
home1/05191/agomezig
/papyrus/include/papyrus/kv.h>
#include "ior.h"
#include "aiori.h"
...
...
@@ -191,7 +191,7 @@ void init_IOR_Param_t(IOR_param_t * p)
assert
(
available_aiori
[
0
]
!=
NULL
);
strncpy
(
p
->
api
,
available_aiori
[
0
]
->
name
,
MAX_STR
);
strncpy
(
p
->
platform
,
"HOST(OSTYPE)"
,
MAX_STR
);
strncpy
(
p
->
testFileName
,
"/
root
/papyrus/kv/tests/20_ior/
src
/testFile"
,
MAXPATHLEN
);
strncpy
(
p
->
testFileName
,
"/
home1/05191/agomezig
/papyrus/kv/tests/20_ior/
install/bin
/testFile"
,
MAXPATHLEN
);
p
->
nodes
=
1
;
p
->
tasksPerNode
=
1
;
p
->
repetitions
=
1
;
...
...
kv/tests/21_iops/test21_iops.c
View file @
3f64b049
...
...
@@ -34,8 +34,8 @@ int main(int argc, char** argv) {
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
size
);
if
(
size
!=
2
)
{
printf
(
"This test needs 2 processes
\n
"
);
if
(
size
<
2
)
{
printf
(
"This test needs
at least
2 processes
\n
"
);
return
1
;
}
...
...
kv/tests/22_write_many_files/CMakeLists.txt
0 → 100644
View file @
3f64b049
papyruskv_test
(
test22_write_many_files
)
kv/tests/22_write_many_files/test22_write_many_files.c
0 → 100644
View file @
3f64b049
/***********************************************************************
*
* DESCRIPTION :
* Test that mounts and writes to a distributed file
*
* AUTHOR: Antonio Gomez START DATE: 10 Jan 18
*
*/
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <papyrus/kv.h>
#include <papyrus/mpi.h>
#include <unistd.h>
#define PAPYRUSKV_SCRATCH 0
#define PAPYRUSKV_WRITEBACK 1
#define PAPYRUSKV_PERSISTANT 2
#define NUMFILES 5
int
rank
,
size
,
peer
;
char
name
[
256
],
filename
[
256
];
char
*
text
;
int
lenght
;
int
db
;
int
ret
;
int
i
;
int
main
(
int
argc
,
char
**
argv
)
{
MPI_Init
(
&
argc
,
&
argv
);
//Initialize papyrus
papyruskv_init
(
&
argc
,
&
argv
,
"kv_repo"
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
rank
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
size
);
MPI_Get_processor_name
(
name
,
&
ret
);
//4K
text
=
(
char
*
)
malloc
(
4
*
1024
*
sizeof
(
char
));
strcpy
(
text
,
"This is a test
\n
"
);
peer
=
rank
==
size
-
1
?
0
:
rank
+
1
;
printf
(
"[%s:%d] [%s] [%d/%d]
\n
"
,
__FILE__
,
__LINE__
,
name
,
rank
,
size
);
ret
=
papyruskv_open
(
"TEST_DB"
,
PAPYRUSKV_CREATE
|
PAPYRUSKV_RELAXED
|
PAPYRUSKV_RDWR
,
NULL
,
&
db
);
if
(
ret
!=
PAPYRUSKV_OK
)
printf
(
"[%s:%d] ret[%d]
\n
"
,
__FILE__
,
__LINE__
,
ret
);
printf
(
"[%s:%d] db[%d]
\n
"
,
__FILE__
,
__LINE__
,
db
);
for
(
i
=
0
;
i
<
NUMFILES
;
++
i
)
{
snprintf
(
filename
,
256
,
"/home1/05191/agomezig/papyrus/kv/tests/22_write_many_files/test_file-%d-%d"
,
rank
,
i
);
ret
=
papyruskv_create_file
(
db
,
filename
,
"w+"
,
PAPYRUSKV_SCRATCH
);
if
(
ret
!=
PAPYRUSKV_OK
)
printf
(
"[%s:%d] ret[%d]
\n
"
,
__FILE__
,
__LINE__
,
ret
);
ret
=
papyruskv_fwrite
(
db
,
text
,
4
*
1024
,
0
,
filename
);
if
(
ret
!=
PAPYRUSKV_OK
)
printf
(
"[%s:%d] ret[%d]
\n
"
,
__FILE__
,
__LINE__
,
ret
);
// ret=papyruskv_fclose(db, filename);
// if (ret != PAPYRUSKV_OK) printf("[%s:%d] ret[%d]\n", __FILE__, __LINE__, ret);
}
ret
=
papyruskv_close
(
db
);
if
(
ret
!=
PAPYRUSKV_OK
)
printf
(
"[%s:%d] ret[%d]
\n
"
,
__FILE__
,
__LINE__
,
ret
);
papyruskv_finalize
();
MPI_Finalize
();
free
(
text
);
printf
(
"Test finalized
\n
"
);
return
0
;
}
kv/tests/CMakeLists.txt
View file @
3f64b049
...
...
@@ -27,3 +27,4 @@ add_subdirectory(17_mount_write_file)
add_subdirectory
(
18_multiple_writes
)
add_subdirectory
(
19_mount_read_file
)
add_subdirectory
(
21_iops
)
add_subdirectory
(
22_write_many_files
)
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