Skip to content
Snippets Groups Projects
Commit e9e9cec9 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #10898: Backported fixes for COBALT tests.

parents 178e9dfc d0347067
No related branches found
No related tags found
No related merge requests found
......@@ -3427,6 +3427,7 @@ MAC/Deployment/data/StaticMetaData/RSPConnections_test.dat -text
MAC/Deployment/data/StaticMetaData/RSPDriver.conf.test -text
MAC/Deployment/data/StaticMetaData/RemoteStation.conf.test -text
MAC/Deployment/data/StaticMetaData/SourceCatalog.conf -text
MAC/Deployment/data/StaticMetaData/StaticMetaData -text
MAC/Deployment/data/StaticMetaData/StationAttenuation.dat -text
MAC/Deployment/data/StaticMetaData/StationInfo.dat -text
MAC/Deployment/data/StaticMetaData/Storage+MAC.dat -text
......@@ -4402,6 +4403,7 @@ RTCP/Cobalt/GPUProc/test/tMPIReceive.sh eol=lf
RTCP/Cobalt/GPUProc/test/t_cpu_utils.in_parset -text
RTCP/Cobalt/GPUProc/test/t_generate_globalfs_locations.in_parset -text
RTCP/Cobalt/GPUProc/test/t_generate_globalfs_locations.sh eol=lf
RTCP/Cobalt/GPUProc/test/t_gpu_utils.sh eol=lf
RTCP/Cobalt/InputProc/doc/Cobalt-New-InputSection.jpg -text svneol=unset#image/jpeg
RTCP/Cobalt/InputProc/src/Delays/printDelays.log_prop -text
RTCP/Cobalt/InputProc/src/ping_intl.sh -text
......
......@@ -5,24 +5,24 @@ lofar_package(StaticMetaData 1.0)
lofar_add_sbin_scripts(createFiles)
# These files end up in ${prefix}/etc
file(GLOB sysconf_data *.conf)
install(FILES
file(GLOB sysconf_data RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" *.conf)
lofar_add_sysconf_files(
${sysconf_data}
StationInfo.dat
ControlInfo.dat
DESTINATION etc)
ControlInfo.dat)
# These files end up in ${prefix}/etc/StaticMetaData
file(GLOB staticmeta_data
*.tmpl
*.test
*.dat
AntennaArrays/*.conf*
AntennaPos/*.conf*
CableDelays/*.conf*
iHBADeltas/*.conf*
AntennaFields/*.conf*
Attenuation/*.conf*)
install(FILES
${staticmeta_data}
DESTINATION etc/StaticMetaData)
# lofar_add_sysconf_files can only install in the same
# relative dir as in the source, hence we've put a symlink
# StaticMetaData -> . in this directory.
file(GLOB staticmeta_data RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
StaticMetaData/*.tmpl
StaticMetaData/*.test
StaticMetaData/*.dat
StaticMetaData/AntennaArrays/*.conf*
StaticMetaData/AntennaPos/*.conf*
StaticMetaData/CableDelays/*.conf*
StaticMetaData/iHBADeltas/*.conf*
StaticMetaData/AntennaFields/*.conf*
StaticMetaData/Attenuation/*.conf*)
lofar_add_sysconf_files(${staticmeta_data})
.
\ No newline at end of file
......@@ -14,10 +14,14 @@ configure_file(
# List of default/ config parsets:
# CMake cannot detect changes in this list, but for these files it doesn't need to.
file(GLOB _config_parsets
"parset-additions.d/default/*.parset"
"${CMAKE_CURRENT_BINARY_DIR}/parset-additions.d/default/*.parset") # configured .parset.in
install(FILES ${_config_parsets} DESTINATION etc/parset-additions.d/default)
file(GLOB _config_parsets_src RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "parset-additions.d/default/*.parset")
lofar_add_sysconf_files(${_config_parsets_src})
# cannot yet use lofar_add_sysconf_files since that wants to make a symlink to the source dir,
# but we've build them there directly.
file(GLOB _config_parsets_bin "${CMAKE_CURRENT_BINARY_DIR}/parset-additions.d/default/*.parset") # configured .parset.in
install(FILES ${_config_parsets_bin} DESTINATION etc/parset-additions.d/default)
#lofar_add_sysconf_files(${_config_parsets_bin})
# Install script to generate StationStreams.parset for the live test system.
lofar_add_sbin_scripts(parset-additions.d/default/generateStationStreams.sh)
......@@ -199,14 +199,12 @@ namespace LOFAR
string prefixPath()
{
if (lofarRoot().empty()) return ".";
else return lofarRoot() + "/share/gpu/kernels";
return lofarRoot() + "/share/gpu/kernels";
}
string includePath()
{
if (lofarRoot().empty()) return "include";
else return lofarRoot() + "/include";
return lofarRoot() + "/include";
}
ostream& operator<<(ostream& os, const CompileDefinitions& defs)
......
......@@ -364,7 +364,7 @@ echo "[outputProc] pid file = $PID_LIST_FILE"
touch $PID_LIST_FILE
# Construct full command line for outputProc
OUTPUTPROC_CMDLINE="source $OUTPUTPROC_ROOT/lofarinit.sh; export QUEUE_PREFIX=$QUEUE_PREFIX LOFARENV=$LOFARENV; numactl --cpunodebind=0 --preferred=0 outputProc $OBSERVATIONID"
OUTPUTPROC_CMDLINE="source $OUTPUTPROC_ROOT/lofarinit.sh; export QUEUE_PREFIX=$QUEUE_PREFIX LOFARENV=$LOFARENV; numactl --cpunodebind=0 --preferred=0 $OUTPUTPROC_ROOT/bin/outputProc $OBSERVATIONID"
# Wrap command line with Docker if required
if $DOCKER; then
......
......@@ -37,6 +37,17 @@ lofar_add_test(tKernelOccupancy tKernelOccupancy.cc)
lofar_add_test(tStreamReadBuffer tStreamReadBuffer.cc)
lofar_add_test(tMultiDimArrayHostBuffer tMultiDimArrayHostBuffer.cc)
# These kernels need to be in the build dir for createPTX to find them in the tests
set(_test_kernels
tKernel.in_.cu
tKernelOccupancy.in_.cu
)
foreach(_name ${_test_kernels})
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/share/gpu/kernels)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_SOURCE_DIR}/${_name} ${CMAKE_BINARY_DIR}/share/gpu/kernels/${_name})
endforeach()
# GPU kernel unit tests
lofar_add_test(tFIR_Filter tFIR_Filter.cc)
lofar_add_test(tFFT tFFT.cc)
......
......@@ -24,7 +24,8 @@
#ifdef USE_CUDA
#include <cstdio> // for remove()
#include <cstdlib> // for unsetenv()
#include <cstdlib> // for getenv()
#include <cassert>
#include <vector>
#include <fstream>
#include <stdexcept>
......@@ -47,8 +48,12 @@ const char* srcFile("t_gpu_utils.cl");
struct CreateFixture
{
CreateFixture() {
ofstream ofs(srcFile);
if (!ofs) throw runtime_error("Failed to create file: " + string(srcFile));
assert(getenv("LOFARROOT"));
string lofarroot = getenv("LOFARROOT");
string fullFilename = lofarroot + "/share/gpu/kernels/" + srcFile;
ofstream ofs(fullFilename.c_str());
if (!ofs) throw runtime_error("Failed to create file: " + string(fullFilename));
ofs << "#if defined FOO && FOO != 42\n"
<< "#error FOO != 42\n"
<< "#endif\n"
......@@ -163,8 +168,6 @@ int main()
{
INIT_LOGGER("t_gpu_utils");
unsetenv("LOFARROOT");
try {
gpu::Platform pf;
return UnitTest::RunAllTests() > 0;
......
#!/bin/bash
./runctest.sh t_gpu_utils
......@@ -10,9 +10,6 @@ error()
exit 1
}
# Set LOFARROOT and other LOFAR env vars into install directory (var is always set).
. "@CMAKE_INSTALL_PREFIX@/lofarinit.sh" || error "Could not load our lofarinit.sh -- did you run 'make install'?"
# MessageFuncs.sh provides QPID functionality, and is present in the build directory
. "MessageFuncs.sh" || error "Could not load MessageFuncs.sh"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment