Fixed OpenMP compile and added a tux regression test

The MGR OpenMP code has not been tested yet, so I commented it out for now
Added a tux OpenMP compile test and reorganized the tux tests from fast to slow (more or less)
This commit is contained in:
Rob Falgout 2017-10-19 18:22:46 -07:00
parent d39563551b
commit 334472c7b6
2 changed files with 92 additions and 66 deletions

View File

@ -43,6 +43,16 @@ mkdir -p $output_dir
src_dir=`cd $1; pwd`
shift
# Organizing the tests from "fast" to "slow"
# Check for 'int', 'double', and 'MPI_'
./test.sh check-int.sh $src_dir
mv -f check-int.??? $output_dir
./test.sh check-double.sh $src_dir
mv -f check-double.??? $output_dir
./test.sh check-mpi.sh $src_dir
mv -f check-mpi.??? $output_dir
# Basic build and run tests
mo="-j test"
ro="-ams -ij -sstruct -struct"
@ -52,36 +62,15 @@ co=""
./test.sh basic.sh $src_dir -co: $co -mo: $mo
./renametest.sh basic $output_dir/basic-default
co="--enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -eo: $eo
./renametest.sh basic $output_dir/basic-debug1
co="--enable-debug --enable-global-partition"
RO="-fac"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $RO -eo: $eo
./renametest.sh basic $output_dir/basic-debug2
co="--enable-debug CC=mpiCC"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: $eo
./renametest.sh basic $output_dir/basic-debug-cpp
# co="--with-insure --enable-debug --with-print-errors"
# MO="test"
# ./test.sh basic.sh $src_dir -co: $co -mo: $MO -ro: $ro
# ./renametest.sh basic $output_dir/basic--with-insure1
#
# co="--with-insure --enable-debug --enable-global-partition"
# MO="test"
# ./test.sh basic.sh $src_dir -co: $co -mo: $MO -ro: $ro
# ./renametest.sh basic $output_dir/basic--with-insure2
co="--enable-debug --with-print-errors"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro -rt -valgrind
./renametest.sh basic $output_dir/basic--valgrind1
co="--enable-debug --enable-global-partition"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro -rt -valgrind
./renametest.sh basic $output_dir/basic--valgrind2
# Test linking for different languages (depends on previous compile test)
link_opts="all++ all77"
for opt in $link_opts
do
output_subdir=$output_dir/link$opt
mkdir -p $output_subdir
./test.sh link.sh $src_dir $opt
mv -f link.??? $output_subdir
done
co="--without-MPI"
./test.sh basic.sh $src_dir -co: $co -mo: $mo
@ -99,17 +88,13 @@ co="--enable-shared"
./test.sh basic.sh $src_dir -co: $co -mo: $mo
./renametest.sh basic $output_dir/basic--enable-shared
co="--enable-bigint --enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: -bigint
./renametest.sh basic $output_dir/basic--enable-bigint
co="--enable-debug --with-openmp"
./test.sh basic.sh $src_dir -co: $co -mo: $mo
./renametest.sh basic $output_dir/basic--enable-openmp
co="--enable-single --enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: -single
./renametest.sh basic $output_dir/basic--enable-single
co="--enable-longdouble --enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: -longdouble
./renametest.sh basic $output_dir/basic--enable-longdouble
co="--enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -eo: $eo
./renametest.sh basic $output_dir/basic-debug1
co="--enable-maxdim=4 --enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -eo: -maxdim
@ -123,6 +108,35 @@ grep -v make.err basic.err > basic.tmp
mv basic.tmp basic.err
./renametest.sh basic $output_dir/basic--enable-complex
co="--enable-debug --enable-global-partition"
RO="-fac"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $RO -eo: $eo
./renametest.sh basic $output_dir/basic-debug2
co="--enable-single --enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: -single
./renametest.sh basic $output_dir/basic--enable-single
co="--enable-longdouble --enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: -longdouble
./renametest.sh basic $output_dir/basic--enable-longdouble
co="--enable-debug CC=mpiCC"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: $eo
./renametest.sh basic $output_dir/basic-debug-cpp
co="--enable-bigint --enable-debug"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro -eo: -bigint
./renametest.sh basic $output_dir/basic--enable-bigint
co="--enable-debug --with-print-errors"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro -rt -valgrind
./renametest.sh basic $output_dir/basic--valgrind1
co="--enable-debug --enable-global-partition"
./test.sh basic.sh $src_dir -co: $co -mo: $mo -ro: $ro -rt -valgrind
./renametest.sh basic $output_dir/basic--valgrind2
# CMake build and run tests
mo="-j"
ro="-ams -ij -sstruct -struct"
@ -132,10 +146,6 @@ co=""
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-default
co="-DCMAKE_BUILD_TYPE=Debug"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo -ro: $ro
./renametest.sh cmake $output_dir/cmake-debug
co="-DHYPRE_NO_GLOBAL_PARTITION=OFF"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-global-partition
@ -148,10 +158,6 @@ co="-DHYPRE_SHARED=ON"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo
./renametest.sh cmake $output_dir/cmake-shared
co="-DHYPRE_BIGINT=ON"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo -ro: $ro
./renametest.sh cmake $output_dir/cmake-bigint
co="-DHYPRE_SINGLE=ON"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo -ro: -single
./renametest.sh cmake $output_dir/cmake-single
@ -160,27 +166,17 @@ co="-DHYPRE_LONG_DOUBLE=ON"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo -ro: -longdouble
./renametest.sh cmake $output_dir/cmake-longdouble
co="-DCMAKE_BUILD_TYPE=Debug"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo -ro: $ro
./renametest.sh cmake $output_dir/cmake-debug
co="-DHYPRE_BIGINT=ON"
./test.sh cmake.sh $src_dir -co: $co -mo: $mo -ro: $ro
./renametest.sh cmake $output_dir/cmake-bigint
# cmake build doesn't currently support maxdim
# cmake build doesn't currently support complex
# Test linking for different languages
link_opts="all++ all77"
for opt in $link_opts
do
output_subdir=$output_dir/link$opt
mkdir -p $output_subdir
./test.sh link.sh $src_dir $opt
mv -f link.??? $output_subdir
done
# Check for 'int', 'double', and 'MPI_'
./test.sh check-int.sh $src_dir
mv -f check-int.??? $output_dir
./test.sh check-double.sh $src_dir
mv -f check-double.??? $output_dir
./test.sh check-mpi.sh $src_dir
mv -f check-mpi.??? $output_dir
# Echo to stderr all nonempty error files in $output_dir
for errfile in $( find $output_dir ! -size 0 -name "*.err" )
do

View File

@ -727,8 +727,10 @@ hypre_MGRBuildP( hypre_ParCSRMatrix *A,
jj_count_offd = hypre_CTAlloc(HYPRE_Int, num_threads);
fine_to_coarse = hypre_CTAlloc(HYPRE_Int, n_fine);
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i = 0; i < n_fine; i++) fine_to_coarse[i] = -1;
@ -740,8 +742,10 @@ hypre_MGRBuildP( hypre_ParCSRMatrix *A,
*-----------------------------------------------------------------------*/
/* RDF: this looks a little tricky, but doable */
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i,j,i1,jj,ns,ne,size,rest) HYPRE_SMP_SCHEDULE
#endif
#endif
for (j = 0; j < num_threads; j++)
{
@ -851,8 +855,10 @@ hypre_MGRBuildP( hypre_ParCSRMatrix *A,
fine_to_coarse_offd = hypre_CTAlloc(HYPRE_Int, num_cols_A_offd);
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i,j,ns,ne,size,rest,coarse_shift) HYPRE_SMP_SCHEDULE
#endif
#endif
for (j = 0; j < num_threads; j++)
{
@ -898,8 +904,10 @@ hypre_MGRBuildP( hypre_ParCSRMatrix *A,
if (debug_flag==4) wall_time = time_getWallclockSeconds();
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i = 0; i < n_fine; i++) fine_to_coarse[i] -= my_first_cpt;
@ -919,8 +927,10 @@ hypre_MGRBuildP( hypre_ParCSRMatrix *A,
}
}
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i,j,jl,i1,jj,ns,ne,size,rest,P_marker,P_marker_offd,jj_counter,jj_counter_offd,jj_begin_row,jj_end_row,jj_begin_row_offd,jj_end_row_offd) HYPRE_SMP_SCHEDULE
#endif
#endif
for (jl = 0; jl < num_threads; jl++)
{
@ -1070,8 +1080,10 @@ hypre_MGRBuildP( hypre_ParCSRMatrix *A,
if (P_offd_size)
{
P_marker = hypre_CTAlloc(HYPRE_Int, num_cols_A_offd);
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i=0; i < num_cols_A_offd; i++)
P_marker[i] = 0;
@ -1094,8 +1106,10 @@ hypre_MGRBuildP( hypre_ParCSRMatrix *A,
col_map_offd_P[i] = index++;
}
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i=0; i < P_offd_size; i++)
P_offd_j[i] = hypre_BinarySearch(col_map_offd_P,
@ -1276,8 +1290,10 @@ hypre_MGRBuildPDRS( hypre_ParCSRMatrix *A,
jj_count_offd = hypre_CTAlloc(HYPRE_Int, num_threads);
fine_to_coarse = hypre_CTAlloc(HYPRE_Int, n_fine);
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i = 0; i < n_fine; i++) fine_to_coarse[i] = -1;
@ -1289,8 +1305,10 @@ hypre_MGRBuildPDRS( hypre_ParCSRMatrix *A,
*-----------------------------------------------------------------------*/
/* RDF: this looks a little tricky, but doable */
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i,j,i1,jj,ns,ne,size,rest) HYPRE_SMP_SCHEDULE
#endif
#endif
for (j = 0; j < num_threads; j++)
{
@ -1404,8 +1422,10 @@ hypre_MGRBuildPDRS( hypre_ParCSRMatrix *A,
fine_to_coarse_offd = hypre_CTAlloc(HYPRE_Int, num_cols_A_offd);
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i,j,ns,ne,size,rest,coarse_shift) HYPRE_SMP_SCHEDULE
#endif
#endif
for (j = 0; j < num_threads; j++)
{
@ -1451,8 +1471,10 @@ hypre_MGRBuildPDRS( hypre_ParCSRMatrix *A,
if (debug_flag==4) wall_time = time_getWallclockSeconds();
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i = 0; i < n_fine; i++) fine_to_coarse[i] -= my_first_cpt;
@ -1472,8 +1494,10 @@ hypre_MGRBuildPDRS( hypre_ParCSRMatrix *A,
}
}
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i,j,jl,i1,jj,ns,ne,size,rest,P_marker,P_marker_offd,jj_counter,jj_counter_offd,jj_begin_row,jj_end_row,jj_begin_row_offd,jj_end_row_offd) HYPRE_SMP_SCHEDULE
#endif
#endif
for (jl = 0; jl < num_threads; jl++)
{
@ -1601,8 +1625,10 @@ hypre_MGRBuildPDRS( hypre_ParCSRMatrix *A,
if (P_offd_size)
{
P_marker = hypre_CTAlloc(HYPRE_Int, num_cols_A_offd);
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i=0; i < num_cols_A_offd; i++)
P_marker[i] = 0;
@ -1625,8 +1651,10 @@ hypre_MGRBuildPDRS( hypre_ParCSRMatrix *A,
col_map_offd_P[i] = index++;
}
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i=0; i < P_offd_size; i++)
P_offd_j[i] = hypre_BinarySearch(col_map_offd_P,
@ -2081,8 +2109,10 @@ HYPRE_Int hypre_block_jacobi (hypre_ParCSRMatrix *A,
* Copy current approximation into temporary vector.
*-----------------------------------------------------------------*/
#if 0
#ifdef HYPRE_USING_OPENMP
#pragma omp parallel for private(i) HYPRE_SMP_SCHEDULE
#endif
#endif
for (i = 0; i < n; i++)
{