mirror of
https://github.com/JHUAPL/kaiju.git
synced 2026-01-08 22:58:05 -05:00
Finalizing ability to generate code coverage (slowly and painfully)
This commit is contained in:
@@ -31,6 +31,7 @@ add_compile_definitions(GITBRANCH=${GIT_BRANCH})
|
||||
option(ENABLE_OMP "Enable OMP parallelization" ON )
|
||||
option(ENABLE_MPI "Enable MPI parallelization" OFF)
|
||||
option(ENABLE_MKL "Enable Intel MKL usage" OFF)
|
||||
option(ENABLE_CODECOV "Enable Code Coverage tracking" OFF)
|
||||
option(ALLOW_INVALID_COMPILERS "Allow Invalid Compiler Versions" OFF)
|
||||
|
||||
#Vector blocking
|
||||
|
||||
@@ -140,4 +140,9 @@ if(ENABLE_MPI)
|
||||
# we changed compiler, link HDF5 libraries
|
||||
link_libraries(${HDF5_Fortran_LIBRARIES} ${HDF5_Fortran_HL_LIBRARIES})
|
||||
endif()
|
||||
if(ENABLE_CODECOV)
|
||||
# track code coverage
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin/codecov_prof)
|
||||
string(APPEND CMAKE_Fortran_FLAGS " -prof-gen=srcpos -prof-dir=${CMAKE_BINARY_DIR}/bin/codecov_prof")
|
||||
endif()
|
||||
|
||||
|
||||
14
tests/calculateCodeCoverage.sh
Executable file
14
tests/calculateCodeCoverage.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -d "./codecov_prof" ]
|
||||
then
|
||||
echo "The directory codecov_prof does not exist. Please move to the folder where the test executables are, and be sure to run them first."
|
||||
exit
|
||||
fi
|
||||
|
||||
profmerge -cov_dir ./codecov_prof -prof_dir ./codecov_prof -src_root . -verbose # merge all code coverage files
|
||||
# -comp: exclude filenames that contain 'tst' using a compfile
|
||||
# -ccolor: use green for fully covered instead of white
|
||||
cd ./codecov_prof
|
||||
codecov -comp ../../../tests/comp_file.txt -ccolor '#d7fad2'
|
||||
|
||||
2
tests/comp_file.txt
Normal file
2
tests/comp_file.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
.
|
||||
~test
|
||||
@@ -12,6 +12,7 @@ module list
|
||||
hostname
|
||||
export OMP_NUM_THREADS=72
|
||||
export KMP_STACKSIZE=128M
|
||||
export MPI_TYPE_DEPTH=32
|
||||
|
||||
echo ""
|
||||
echo "Running Non MPI Cases"
|
||||
|
||||
@@ -12,6 +12,7 @@ module list
|
||||
hostname
|
||||
export OMP_NUM_THREADS=72
|
||||
export KMP_STACKSIZE=128M
|
||||
export MPI_TYPE_DEPTH=32
|
||||
|
||||
echo ""
|
||||
echo "Running Gamera Tests"
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
#PBS -j oe
|
||||
#PBS -q regular
|
||||
#PBS -l walltime=12:00:00
|
||||
#PBS -l select=1:ncpus=36:mpiprocs=64:ompthreads=72
|
||||
#PBS -l select=2:ncpus=36:mpiprocs=9:ompthreads=36
|
||||
|
||||
source ~/.bashrc
|
||||
|
||||
module list
|
||||
hostname
|
||||
export OMP_NUM_THREADS=72
|
||||
export OMP_NUM_THREADS=36
|
||||
export KMP_STACKSIZE=128M
|
||||
export MPI_TYPE_DEPTH=32
|
||||
|
||||
echo ""
|
||||
echo "Running Voltron MPI Tests"
|
||||
|
||||
@@ -124,7 +124,7 @@ contains
|
||||
enddo
|
||||
enddo
|
||||
call DivB(gameraApp%Model, gameraApp%Grid, gameraApp%State, temp)
|
||||
@assertEqual(temp,totalDiv,1e-15,'DivB wrong')
|
||||
@assertEqual(temp,totalDiv,1e-13,'DivB wrong')
|
||||
|
||||
deallocate(denSum)
|
||||
deallocate(momSumX)
|
||||
|
||||
Reference in New Issue
Block a user