Beispiel #1
0
result_list runner::test_all(report_type & report) const
{
    boost::filesystem::directory_iterator begin(styles_dir_);
    boost::filesystem::directory_iterator end;
    std::vector<runner::path_type> files(begin, end);
    return test_parallel(files, report, jobs_);
}
Beispiel #2
0
result_list runner::test(std::vector<std::string> const & style_names, report_type & report) const
{
    std::vector<runner::path_type> files(style_names.size());
    std::transform(style_names.begin(), style_names.end(), std::back_inserter(files),
        [&](runner::path_type const & name)
        {
            return (name.extension() == ".xml") ? name : (styles_dir_ / (name.string() + ".xml"));
        });
    return test_parallel(files, report, jobs_);
}
Beispiel #3
0
int TestMain() {
    if( MinThread<1 ) {
        REPORT("number of threads must be positive\n");
        exit(1);
    }
    for( int p=MinThread; p<=MaxThread; ++p ) {
       tbb::task_scheduler_init init(p);
       test_wait_count();
       test_run();
       test_iterator();
       test_parallel(p);
   }
   return Harness::Done;
}
Beispiel #4
0
int main(void)
{
	plan_tests(6 + 23
		   + FULL_LEN * (FULL_LEN*4 - 1)
		   + CHAIN_LEN * (1 + CHAIN_LEN*2)
		   + 12 + 32 + 7 + 2);

	test_trivial();
	test_parallel();
	test_full();
	test_chain();
	test_error();
	test_traversal1();
	test_shortcut1();
	test_shortcut2();
	
	return exit_status();
}
Beispiel #5
0
int main(int argc, char **argv) {
        unsigned int i;
        int r;

        if (!getenv("CRBTREE_TEST_PTRACE"))
                return 77;

        /* we want stable tests, so use fixed seed */
        srand(0xdeadbeef);

        /*
         * The tests are pseudo random; run them multiple times, each run will
         * have different orders and thus different results.
         */
        for (i = 0; i < 4; ++i) {
                r = test_parallel();
                if (r)
                        return r;
        }

        return 0;
}
Beispiel #6
0
int main(int argc, char* argv[]) {

	test_valid_strip();
	test_valid_strip2();

	test_valid_interchange();
	test_invalid_interchange();
	
	test_valid_tile();
	test_valid_tile2();
	test_valid_tile3();
	test_valid_tile4();
	test_valid_tile5();
	
	test_invalid_tile();

	test_valid_fusion1();
	test_valid_fusion2();
	test_valid_fusion3();
	test_valid_fusion4();
	test_invalid_fusion1();
	test_invalid_fusion2();
	
	test_valid_fission();
	test_invalid_fission();

	test_unroll_1();
	test_unroll_2();
	test_unroll_3();
	test_unroll_4();
	test_unroll_5();
	
	test_composition_1();

	test_parallel();
	test_stamping();
}
Beispiel #7
0
int main(int argc, char *argv[])
{
	printf("==== start\n");

	if (sthread_init())
		err(1, "sthread_init()");

	printf("==== Basic sthread\n");
	test_sthread();
	test_sthread();

	printf("==== Globals\n");
	_global = 2;
	test_global();
	if (_global != 2)
		errx(1, "global in master %d\n", _global);
	test_global();

	printf("==== Stack\n");
	test_stack();
	test_stack();

	printf("==== smalloc\n");
	test_smalloc();

	printf("==== fd\n");
	test_fd();

	printf("==== syscall\n");
	test_syscall();

	printf("==== parallel\n");
	test_parallel();

	printf("==== end\n");
	exit(0);
}
// Tests if nesting of task ids and parents is right for 2 nested sections with different combinations of thread counts
int 
main(int argc, char *argv[])
{
  if (argc > 2) { std::cerr << "usage: " << argv[0] << "task_id to debug" << std::endl; exit(-1); }
  if (argc == 2) {
    WAIT_FOR_TASK_ID = atoi(argv[1]);
  } 
  ompt_task_id_t taskid = ompt_get_task_id(0);
  assert(taskid == 0);

  int max_threads = omp_get_max_threads();
  assert(max_threads > 0);

  int n_threads = sqrt(max_threads);
  assert(n_threads > 0);
  
  // Test all possible combinations of nested and inner/outer thread count
  test_parallel(1, 1, 1, 0, 1);
  test_parallel(1, n_threads, 1, 0, 1);
  test_parallel(1, 1, n_threads, 0, max_threads);
  test_parallel(1, n_threads, n_threads, 0, 1);

  test_parallel(0, 1, 1, 0, 1);
  test_parallel(0, n_threads, 1, 0, 1);
  test_parallel(0, 1, n_threads, 0, max_threads);
  test_parallel(0, n_threads, n_threads, 0, 1);
  
  n_threads = 2;
  test_parallel(1, 1, 1, 1, 1);
  test_parallel(1, n_threads, 1, 1, 1);
  test_parallel(1, 1, n_threads, 1, max_threads);
  test_parallel(1, n_threads, n_threads, 1, 1);
  test_parallel(1, 1, 1, n_threads, 1);
  test_parallel(1, n_threads, 1, n_threads, 1);
  test_parallel(1, 1, n_threads, n_threads, max_threads);
  test_parallel(1, n_threads, n_threads, n_threads, 1);
  
  test_parallel(0, 1, 1, 1, 1);
  test_parallel(0, n_threads, 1, 1, 1);
  test_parallel(0, 1, n_threads, 1, max_threads);
  test_parallel(0, n_threads, n_threads, 1, 1);
  test_parallel(0, 1, 1, n_threads, 1);
  test_parallel(0, n_threads, 1, n_threads, 1);
  test_parallel(0, 1, n_threads, n_threads, max_threads);
  test_parallel(0, n_threads, n_threads, n_threads, 1);
  
  
  if(error)
    std::cerr << std::endl << "Test failed!" << std::endl << std::endl;
  else
    std::cerr << std::endl << "Test passed!" << std::endl << std::endl;

  return 0;
}