Skip to content

Commit

Permalink
Merge pull request kotekan#937 from kotekan/develop
Browse files Browse the repository at this point in the history
Merge develop into master for 2021.03 release
  • Loading branch information
andrerenard authored Mar 25, 2021
2 parents 5d2d4a3 + 4c35d27 commit 87d206b
Show file tree
Hide file tree
Showing 85 changed files with 4,317 additions and 2,062 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ endif()

if(${USE_OPENCL})
set(ENV{AMDAPPSDKROOT} /opt/rocm/opencl)
find_package(OpenCL REQUIRED)
find_package(OPENCL REQUIRED)
set(USE_OPENCL ${OPENCL_FOUND})
endif()

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ symbols.
it is not part of the base compile, even when enabled.
* `-DUSE_OMP=ON` Build stages using OpenMP. This requires a compiler supporting OpenMP (>= 3.0)
* `-DOPENSSL_ROOT_DIR=<openssl_root_dir>` Only required for non-standard install locations of OpenSSL
* `-DBOOST_TESTS=ON` Build tests using The Boost Test Framework.
* `-DWITH_TESTS=ON` Build kotekans test library and C++ unit tests using The Boost Test Framework.
pytest-cpp needs to be installed for pytest to find them.
* `-DSUPERDEBUG=ON` Add extra debugging info and turn off all optimisation to improve coverage.
* `-DSANITIZE=ON` Turn on extra Clang sanitizers (currently the address sanitizer) for finding issues.
Expand Down
57 changes: 57 additions & 0 deletions cmake/FindOPENCL.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ##################################################################################################
#
# MIT License
#
# Copyright (c) 2017 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, distribute,
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
# substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
# NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
# OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# ##################################################################################################
find_path(
OPENCL_INCLUDE_DIRS
NAMES OpenCL/cl.h CL/cl.h
HINTS ${OPENCL_ROOT}/include $ENV{AMDAPPSDKROOT}/include $ENV{CUDA_PATH}/include
PATHS /usr/include /usr/local/include /usr/local/cuda/include /opt/cuda/include
/opt/rocm/opencl/include ${CMAKE_INSTALL_PREFIX}/opencl/include
DOC "OpenCL header file path")
mark_as_advanced(OPENCL_INCLUDE_DIRS)

if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
find_library(
OPENCL_LIBRARIES
NAMES OpenCL
HINTS ${OPENCL_ROOT}/lib $ENV{AMDAPPSDKROOT}/lib $ENV{CUDA_PATH}/lib
DOC "OpenCL dynamic library path"
PATH_SUFFIXES x86_64 x64 x86_64/sdk
PATHS /usr/lib /usr/local/cuda/lib /opt/cuda/lib /opt/rocm/opencl/lib
${CMAKE_INSTALL_PREFIX}/opencl/lib)
else()
find_library(
OPENCL_LIBRARIES
NAMES OpenCL
HINTS ${OPENCL_ROOT}/lib $ENV{AMDAPPSDKROOT}/lib $ENV{CUDA_PATH}/lib
DOC "OpenCL dynamic library path"
PATH_SUFFIXES x86 Win32
PATHS /usr/lib /usr/local/cuda/lib /opt/cuda/lib)
endif()
mark_as_advanced(OPENCL_LIBRARIES)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(OPENCL DEFAULT_MSG OPENCL_LIBRARIES OPENCL_INCLUDE_DIRS)

if(NOT OPENCL_FOUND)
message(STATUS "FindOpenCL looked for libraries named: OpenCL")
endif()
107 changes: 107 additions & 0 deletions config/adc_record_burst.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
##########################################
#
# adc_record.yaml
#
# A config which allows for the recording of one
# stream of ADC data from ICEBoards on systems without enough disk IO to
# record continuously. Instead this records data to a RAM buffer and then
# stops capturing data while it's written to disk slowly
#
# Author: Andre Renard
#
##########################################
---
type: config
# Logging level can be one of:
# OFF, ERROR, WARN, INFO, DEBUG, DEBUG2 (case insensitive)
# Note DEBUG and DEBUG2 require a build with (-DCMAKE_BUILD_TYPE=Debug)
log_level: INFO

# Note that for ADC mode the "samples" variable
# doesn't really make sense here. Since there are
# 2048 ADC samples in the 2.56 us the other modes consider to be a "sample"
samples_per_data_set: 65536
sample_block_size: 2048

# Set this value to the maximum allowed by the system RAM.
# Each frame is ~135 MB, and stores about 168ms of data.
buffer_depth: 105
cpu_affinity: [2,3]
instrument_name: mcgill_lab_test

# Telescope
telescope:
name: ICETelescope
require_gps: false
query_gps: true # If fpga_master provides GPS time set to true
gps_host: 127.0.0.1 # Set this to the fpga_master host
num_local_freq: 1 # This value doesn't apply to ADC capture

# Pool
main_pool:
kotekan_metadata_pool: chimeMetadata
num_metadata_objects: 2 * buffer_depth + 10

# Buffers
adc_buffer:
kotekan_buffer: standard
num_frames: buffer_depth
frame_size: samples_per_data_set * sample_block_size
metadata_pool: main_pool

lost_samples_buffer:
kotekan_buffer: standard
num_frames: buffer_depth
frame_size: samples_per_data_set
metadata_pool: main_pool

# Stages

# The core mapping here is setup for a 6 core CPU with 12 threads (vcores)
# and setup to use the first 4 real cores (8 vcores)
dpdk:
kotekan_stage: dpdkCore
# Format is index = lcore, value = cpu core
lcore_cpu_map: [0]
master_lcore_cpu: 1
fpga_packet_size: 4160
samples_per_packet: 2
capture_n_frames: buffer_depth
alignment: samples_per_data_set * 100
# Format is index = lcore, value = array of port IDs
# so [[0,1],[2,3]] maps lcore 0 to service ports 0 and 1,
# and lcore 1 to service ports 2 and 3.
lcore_port_map:
- [0]
# One handler must be given per port on the system.
handlers:
- dpdk_handler: iceBoardStandard
out_buf: adc_buffer
lost_samples_buf: lost_samples_buffer
# Uncomment if you have more than one uio port active
#- dpdk_handler: none
#- dpdk_handler: none
#- dpdk_handler: none
#- dpdk_handler: none
#- dpdk_handler: none
#- dpdk_handler: none
#- dpdk_handler: none

zero_samples:
kotekan_stage: zeroSamples
out_buf: adc_buffer
lost_samples_buf: lost_samples_buffer
zero_value: 0 # Should be set to 255?

metadata_dump:
kotekan_stage: chimeMetadataDump
in_buf: adc_buffer

raw_file_write:
kotekan_stage: rawFileWrite
in_buf: adc_buffer
# *** Change this value for each run ***
base_dir: /data
file_name: adc_data
file_ext: raw
exit_after_n_files: buffer_depth
4 changes: 2 additions & 2 deletions config/chime_science_run_recv_hfb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ hfb_pool:

hfbbuf_10s:
kotekan_buffer: hfb
num_frames: 2048
num_frames: 4096
metadata_pool: hfb_pool

# Kotekan stages
Expand All @@ -54,7 +54,7 @@ write_hfb:

kotekan_stage: HFBWriter
in_buf: hfbbuf_10s
instrument_name: chimeHFB
instrument_name: chime

buffer_status:
kotekan_stage: bufferStatus
Expand Down
Loading

0 comments on commit 87d206b

Please sign in to comment.