|
Sierra Toolkit
Version of the Day
|
00001 /*------------------------------------------------------------------------*/ 00002 /* Copyright 2010 Sandia Corporation. */ 00003 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */ 00004 /* license for use of this work by or on behalf of the U.S. Government. */ 00005 /* Export of this program may require a license from the */ 00006 /* United States Government. */ 00007 /*------------------------------------------------------------------------*/ 00008 00009 00010 #include <stk_util/parallel/Parallel.hpp> 00011 #include <stk_util/unit_test_support/stk_utest_macros.hpp> 00012 00013 STKUNIT_UNIT_TEST(UnitTestTemplate, testUnit) 00014 { 00015 int mpi_rank = 0; 00016 int mpi_size = 1; 00017 00018 #ifdef STK_HAS_MPI 00019 STKUNIT_ASSERT_EQUAL(MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank), MPI_SUCCESS); 00020 STKUNIT_ASSERT_EQUAL(MPI_Comm_size(MPI_COMM_WORLD, &mpi_size), MPI_SUCCESS); 00021 #endif 00022 00023 STKUNIT_ASSERT(mpi_rank < mpi_size); 00024 }