Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add performance testing framework #20

Merged
merged 5 commits into from
Nov 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/m4/ib.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
Expand Down
39 changes: 39 additions & 0 deletions config/m4/mpi.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
#


#
# Enable compiling tests with MPI
#
AS_IF([test -n "$MPI_HOME"], [with_ompi="$MPI_HOME"])
AC_ARG_WITH([mpi],
[AS_HELP_STRING([--with-mpi@<:@=MPIHOME@:>@], [Compile MPI tests (default is NO).])],
[],
[with_mpi=no])

#
# Search for mpicc and mpirun in the given path.
#
mpirun_path=""
mpicc_path=""
AS_IF([test "x$with_mpi" != xno],
[AS_IF([test "x$with_mpi" == xyes],
[AC_PATH_PROGS([mpicc_path], [mpicc])
AC_PATH_PROGS([mpirun_path], [mpirun])],
[AC_PATH_PROGS([mpicc_path], [mpicc], [], [$with_mpi/bin])
AC_PATH_PROGS([mpirun_path], [mpirun], [], [$with_mpi/bin])])
AS_IF([! test -z $mpicc_path],
[AC_DEFINE(HAVE_MPI, [1], "MPI compilation support")
AC_SUBST([MPICC], [$mpicc_path])],
[AC_MSG_ERROR(MPI support requsted but mpicc was not found)])
AS_IF([! test -z $mpirun_path],
[AC_SUBST([MPIRUN], [$mpirun_path])],
[AC_MSG_ERROR(MPI support requsted but mpirun was not found)])
])

AM_CONDITIONAL([HAVE_MPI], [! test -z $mpicc_path])
AM_CONDITIONAL([HAVE_MPIRUN], [! test -z $mpirun_path])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you already support OOB over sockets, why do you want to create this MPI dependency in the high level API ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's just for tests (separate binary), and with MPI i can launch multiple processes and test stuff like all2all

2 changes: 1 addition & 1 deletion config/m4/sysdep.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion config/m4/ucs.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ AS_IF([test "x$enable_debug" == xyes],
m4_include([config/m4/sysdep.m4])
m4_include([config/m4/ucs.m4])
m4_include([config/m4/ib.m4])
m4_include([config/m4/mpi.m4])


#
Expand Down
2 changes: 1 addition & 1 deletion contrib/configure-devel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion contrib/configure-prof
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion contrib/configure-release
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
Expand Down
13 changes: 9 additions & 4 deletions contrib/test_jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ if [ -z "$BUILD_NUMBER" ]; then
echo Running interactive
WORKSPACE=$PWD
BUILD_NUMBER=1
JOB_URL=$WORKSPACE
JOB_URL=file://$WORKSPACE
else
echo Running under jenkins
JOB_URL=$JOB_URL/ws
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JOB_URL is set by Jenkins
I dont think we should modify it, but add "ws" where needed

fi

rpm_topdir=$WORKSPACE/rpm-dist
Expand All @@ -20,11 +21,15 @@ echo Starting on host: $(hostname)
echo "Autogen"
./autogen.sh

echo "Making a directory for test build"
mkdir -p build-test
cd build-test

echo "Build release"
./contrib/configure-release && make $make_opt && make $make_opt distcheck
../contrib/configure-release && make $make_opt && make $make_opt distcheck

echo "Build gtest "
make clean && ./contrib/configure-devel && make $make_opt
make clean && ../contrib/configure-devel && make $make_opt

echo "Starting gtest"

Expand All @@ -46,7 +51,7 @@ nerrors=$(cov-analyze --dir $cov_build |grep "Defect occurrences found" | awk '{
cov-format-errors --dir $cov_build
rc=$(($rc+$nerrors))

cov_url="$JOB_URL/ws/$cov_build_id/c/output/errors/index.html"
cov_url="$JOB_URL/$cov_build_id/c/output/errors/index.html"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not good to modify r/o variable
JOB_URL/ws is a better

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

rm -f jenkins_sidelinks.txt
echo 1..1 > coverity.tap
if [ $nerrors -gt 0 ]; then
Expand Down
3 changes: 2 additions & 1 deletion src/ucs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
Expand Down Expand Up @@ -61,6 +61,7 @@ libucs_la_SOURCES = \
debug/log.c \
debug/memtrack.c \
stats/stats.c \
sys/init.c \
sys/math.c \
sys/sys.c \
time/time.c \
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/config/global_opts.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ ucs_config_field_t ucs_global_opts_table[] = {
{NULL}
};

void UCS_F_CTOR ucs_global_opts_init()
void ucs_global_opts_init()
{
ucs_config_parser_fill_opts(&ucs_global_opts, ucs_global_opts_table, NULL);
}
2 changes: 2 additions & 0 deletions src/ucs/config/global_opts.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,6 @@ typedef struct {
extern ucs_global_opts_t ucs_global_opts;
extern ucs_config_field_t ucs_global_opts_table[];

void ucs_global_opts_init();

#endif
2 changes: 1 addition & 1 deletion src/ucs/config/parser.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/config/parser.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/datastruct/list.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/datastruct/mpool.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/datastruct/mpool.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/datastruct/queue.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/debug/debug.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/debug/debug.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/debug/instrument.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/debug/instrument.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/debug/log.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/debug/log.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/gtest/test.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/sys/compiler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
33 changes: 33 additions & 0 deletions src/ucs/sys/init.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
*/

#include <ucs/sys/compiler.h>
#include <ucs/debug/debug.h>
#include <ucs/debug/instrument.h>
#include <ucs/debug/log.h>
#include <ucs/debug/memtrack.h>
#include <ucs/stats/stats.h>

static void UCS_F_CTOR ucs_init()
{
ucs_log_early_init(); /* Must be called before all others */
ucs_global_opts_init();
ucs_log_init();
ucs_stats_init();
ucs_memtrack_init();
ucs_debug_init();
ucs_instrument_init();
}

static void UCS_F_DTOR ucs_cleanup(void)
{
ucs_instrument_cleanup();
ucs_debug_cleanup();
ucs_memtrack_cleanup();
ucs_stats_cleanup();
ucs_log_cleanup();
}
2 changes: 1 addition & 1 deletion src/ucs/sys/math.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/sys/sys.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/time/time.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/time/time.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/time/timerq.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/time/timerq.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/ucs/type/spinlock.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/uct/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
# Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
#
# $COPYRIGHT$
# $HEADER$
Expand Down
2 changes: 1 addition & 1 deletion src/uct/api/version.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2011. ALL RIGHTS RESERVED.
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
*
* $COPYRIGHT$
* $HEADER$
Expand Down
3 changes: 3 additions & 0 deletions src/uct/ib/base/ib_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ ucs_status_t uct_ib_device_create(struct ibv_device *ibv_device, uct_ib_device_t
uint8_t first_port, num_ports, i;
int ret;

setenv("MLX5_TOTAL_UUARS", "64", 1);
setenv("MLX5_NUM_LOW_LAT_UUARS", "60", 1);

/* Open verbs context */
ibv_context = ibv_open_device(ibv_device);
if (ibv_context == NULL) {
Expand Down
1 change: 1 addition & 0 deletions src/uct/ib/rc/rc_mlx5.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ static ucs_status_t uct_rc_mlx5_ep_create(uct_iface_h tl_iface, uct_ep_h *ep_p)

status = uct_ib_mlx5_get_qp_info(ep->super.qp, &qp_info);
if (status != UCS_OK) {
ucs_error("Failed to get mlx5 QP information");
goto err_cleanup_rc_ep;
}

Expand Down
2 changes: 1 addition & 1 deletion src/uct/tl/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ ucs_status_t uct_iface_open(uct_context_h context, const char *tl_name,
}

/* Non-existing transport */
return UCS_ERR_NO_ELEM;
return UCS_ERR_NO_DEVICE;
}

ucs_status_t uct_rkey_unpack(uct_context_h context, void *rkey_buffer,
Expand Down
Loading