Skip to content

Commit

Permalink
Merge pull request #617 from KineticTheory/clenaup
Browse files Browse the repository at this point in the history
Cleanup warnings/errors reported on CDash.
  • Loading branch information
attom authored May 8, 2019
2 parents 6ceed31 + 202862c commit f1a0e3e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 28 deletions.
3 changes: 3 additions & 0 deletions environment/bashrc/.bashrc_cray
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ function dracoenv ()

function rmdracoenv ()
{
# this setting recommended by Sam Guiterrez to allow correct core binding for
# C++ threads (maybe OpeNMP threads also) on KNLs.
export KMP_AFFINITY=disabled
export LD_LIBRARY_PATH=$DRACO_OLD_LD_LIBRARY_PATH
# unload in reverse order.
mods=( ${dracomodules} )
Expand Down
14 changes: 12 additions & 2 deletions regression/push_repositories_xf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
## All rights are reserved.
##---------------------------------------------------------------------------##

# Run from ccscs2
if [[ `uname -n | sed -e 's/[.].*//'` != "ccscs2" ]]; then
die "This script should be run from ccscs2."
fi

# switch to group 'ccsrad' and set umask
if [[ $(id -gn) != ccsrad ]]; then
exec sg ccsrad "$0 $*"
Expand All @@ -19,7 +24,12 @@ scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Redirect all output to a log file.
timestamp=`date +%Y%m%d-%H%M`
target="`uname -n | sed -e s/[.].*//`"
logdir="$( cd $scriptdir/../../logs && pwd )"
if [[ $USER == "kellyt" ]]; then
logdir="$( cd $scriptdir/../../logs && pwd )"
else
logdir=$HOME/logs
fi
if ! [[ -d $logdir ]]; mkdir -p $logdir; fi
logfile=$logdir/push_repositories_xf-$target-$timestamp.log
exec > $logfile
exec 2>&1
Expand Down Expand Up @@ -48,7 +58,7 @@ if [[ $USER == "kellyt" ]] ; then
fi

# Sanity check
if test `klist -l | grep -c $USER` = 0; then
if [[ `klist -l | grep -c $USER` == 0 ]]; then
die "You must have an active kerberos ticket to run this script."
fi

Expand Down
2 changes: 1 addition & 1 deletion src/VendorChecks/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if( TARGET ParMETIS::parmetis AND ${DRACO_C4} STREQUAL "MPI" )
DEPS "Lib_c4;ParMETIS::parmetis"
PE_LIST "3" )

if ( TARGET SuperLU_DIST::superludist AND TARGET lapack )
if ( TARGET SuperLU_DIST::superludist AND TARGET lapack AND NOT WIN32)

add_parallel_tests(
SOURCES "tstSuperludist.cc"
Expand Down
18 changes: 7 additions & 11 deletions src/memory/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@
#------------------------------------------------------------------------------#
project( memory_test CXX )

# ---------------------------------------------------------------------------- #
# Source files
# ---------------------------------------------------------------------------- #

file( GLOB test_sources *.cc )

# ---------------------------------------------------------------------------- #
# Build Unit tests
# ---------------------------------------------------------------------------- #

add_scalar_tests( SOURCES "${test_sources}" DEPS Lib_memory )
if( NOT "${DRACO_DIAGNOSTICS}" STREQUAL "7" )
# This test fails when fpe_trap is enabled.
#
add_scalar_tests(
SOURCES "tstmemory.cc"
DEPS Lib_memory )
endif()

#------------------------------------------------------------------------------#
# End memory/test/CMakeLists.txt
Expand Down
28 changes: 14 additions & 14 deletions src/memory/test/tstmemory.cc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//----------------------------------*-C++-*----------------------------------//
//-----------------------------------*-C++-*----------------------------------//
/*!
* \file memory/test/tstmemory.cc
* \author Kent G. Budge, Kelly G. Thompson
* \brief memory test.
* \note Copyright (C) 2016-2019 Triad National Security, LLC.
* All rights reserved. */
//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//

#include "ds++/Release.hh"
#include "ds++/ScalarUnitTest.hh"
Expand All @@ -16,9 +16,9 @@
using namespace std;
using namespace rtt_memory;

//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// TESTS
//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//

size_t get_really_big_size_t();

Expand Down Expand Up @@ -130,7 +130,7 @@ void tst_memory(rtt_dsxx::UnitTest &ut) {
#endif
}

//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
void tst_bad_alloc(rtt_dsxx::UnitTest &ut) {
size_t const num_fails_start(ut.numFails);

Expand All @@ -155,7 +155,7 @@ void tst_bad_alloc(rtt_dsxx::UnitTest &ut) {
}

delete[] pBigArray;
} catch (std::bad_alloc &ba) {
} catch (std::bad_alloc & /*error*/) {
std::cout << "Successfully caught an expected std::bad_alloc exception."
<< std::endl;
} catch (...) {
Expand All @@ -170,17 +170,17 @@ void tst_bad_alloc(rtt_dsxx::UnitTest &ut) {
return;
}

//----------------------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// Some compilers are clever enough to figure out that if you pass
// std::numeric_limits<size_t>::max() to the new operator, you will always
// blow away member, and so they will refuse to compile the code. We have
// to use a bit of indirection to get such compilers to swallow the huge
// allocation meant to deliberately blow away memory.
// std::numeric_limits<size_t>::max() to the new operator, you will always blow
// away member, and so they will refuse to compile the code. We have to use a
// bit of indirection to get such compilers to swallow the huge allocation meant
// to deliberately blow away memory.
size_t get_really_big_size_t() {
return numeric_limits<std::ptrdiff_t>::max() / sizeof(size_t);
}

//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
int main(int argc, char *argv[]) {
rtt_dsxx::ScalarUnitTest ut(argc, argv, rtt_dsxx::release);
try {
Expand All @@ -190,6 +190,6 @@ int main(int argc, char *argv[]) {
UT_EPILOG(ut);
}

//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// end of tstmemory.cc
//---------------------------------------------------------------------------//
//----------------------------------------------------------------------------//

0 comments on commit f1a0e3e

Please sign in to comment.