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

Move performance tests from gnitest #5

Open
sungeunchoi opened this issue Jun 16, 2016 · 7 comments
Open

Move performance tests from gnitest #5

sungeunchoi opened this issue Jun 16, 2016 · 7 comments
Assignees

Comments

@sungeunchoi
Copy link
Contributor

No description provided.

@a-abraham
Copy link
Contributor

So the overall goal is to

  • move tests from libfabric-cray:prov/gni/test to cray-tests:performance/[single-node or multi-node]
  • move the run_gnitest script into cray-tests:scripts ?
  • whatever other changes need to be made to ensure all those things work - make file changes etc.

I assume it would be preferable if I am able to preserve the git history of the files when I move them?

@sungeunchoi
Copy link
Contributor Author

Not exactly.

  • Move only the performance tests from libfabric-cray:prov/gni/test/ to cray-tests:performance/single-node
  • Add these tests to the cray-tests run script

The tests/suites that need to be moved are:

  • perf_bitmap/* in bitmap.c
  • perf_mr_internal/* in mr.c
  • perf_mr_udreg/* in mr.c
  • perf_mr_no_cache/* in mr.c
  • vc_lookup/perf in vc_lookup.c

@sungeunchoi
Copy link
Contributor Author

Oh and as for history, these tests don't have much, so don't worry about it.

@a-abraham
Copy link
Contributor

I created perf_bitmap.c that contained the performance tests from perf_bitmap.c it was causing issues so I made a very short version without everything in it to test with. This had one call to a bitmap.c function, __gnix_free_bitmap

#include <stdlib.h>
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/time.h>

#include <gnix_bitmap.h>
#include "common.h"

gnix_bitmap_t *test_bitmap = NULL;
int call_free_bitmap = 0;

void __gnix_bitmap_test_setup(void)
{
        test_bitmap = calloc(1, sizeof(*test_bitmap));
        call_free_bitmap = 1;
}

void __gnix_bitmap_test_teardown(void)
{
        if (call_free_bitmap) {
                _gnix_free_bitmap(test_bitmap);
        } else if (test_bitmap && test_bitmap->arr) {
                free(test_bitmap->arr);
        }
        free(test_bitmap);
        test_bitmap = NULL;
}

int main(void)
{
        return 0;
}

I added perf_bitmap.c to Makefile.am as follows

@@ -5,7 +5,8 @@ bin_PROGRAMS = \
        performance/multi-node/rdm_mbw_mr \
        performance/multi-node/rdm_pingpong \
        performance/multi-node/rdm_one_sided \
- performance/single-node/lock_tests
+       performance/single-node/lock_tests \
+        performance/single-node/perf_bitmap

 dist_bin_SCRIPTS = \
        scripts/run_cray_tests.py
@@ -37,6 +38,11 @@ performance_single_node_lock_tests_SOURCES = \
        performance/single-node/lock_tests.c
 performance_single_node_lock_tests_LDADD = libcraytests.la

+performance_single_node_perf_bitmap_SOURCES = \
+       performance/single-node/perf_bitmap.c
+performance_single_node_perf_bitmap_LDADD = libcraytests.la

To configure.ac I added include the libfabric source, so that I could access header files from the following paths. libfabric-cray:prov/gni/include and libfabric-cray:include

+AC_ARG_WITH([libfabric-source],
+            AC_HELP_STRING([--with-libfabric-source], [Use non-default libfabric source location - default NO]),
+            [AS_IF([test -d $withval/prov/gni/include], [include_dir="prov/gni/include"], [exit])
+             CPPFLAGS="-I $withval/$include_dir $CPPFLAGS"
+             CPPFLAGS="-I $withval/include $CPPFLAGS"],
+            [])
+

I configure with the following
./configure --prefix=/home/users/aabraham/libfabric/cray-install --with-libfabric=/cray/css/users/libfabric-test/builds/latest-libfabric-CLE-5.2UP04 --with-pmi=/opt/cray/pmi/default/ --with-libfabric-source=/home/users/aabraham/libfabric/libfabric-cray/
After configuring, I try to run make. However I get many errors that are indicative of linking errors.

performance/single-node/perf_bitmap.o: In function `__gnix_bitmap_test_teardown':
/home/users/aabraham/libfabric/cray-tests/performance/single-node/perf_bitmap.c:63: undefined reference to `_gnix_free_bitmap'

However - we're able to confirm that it's properly linked to the libfabric build and that the necessary object files exist in the build

>nm /cray/css/users/libfabric-test/builds/latest-libfabric-CLE-5.2UP04/lib/libfabric.so | grep _gnix_alloc_bitmap
0000000000034090 t _gnix_alloc_bitmap

I'm a little lost on what to try next...
@sungeunchoi
@hppritcha - Jim mentioned I might want to ping you about this for some insight.

@sungeunchoi
Copy link
Contributor Author

I think include_dir is just include (not prov/gni/include). The installation directory looks different than the devel tree.

@a-abraham
Copy link
Contributor

While I tried earlier attempts to compile - I noticed that I'd need headers from both cray-libfabric:prov/gni/include and _cray-libfabric:include.
Without both - compilation would fail earlier because of missing header files from each location.

So I had included both as follows, with include_dir="prov/gni/include"

CPPFLAGS="-I $withval/$include_dir $CPPFLAGS"
CPPFLAGS="-I $withval/include $CPPFLAGS"

@sungeunchoi
Copy link
Contributor Author

I forgot about common.[ch] and gnix_rdma_headers.h. If common.[ch] is not used in other tests (it shouldn't be), move those to cray-tests also. For gnix_rdma_headers.h, just copy that file into cray-tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants