Table of Contents |
---|
...
Code Block | ||
---|---|---|
| ||
$ make clean NSTATION=256 $ make CUDA_ARCH={{gpu_sm_arch}} NSTATION=256 NFREQUENCY=6400 NTIME=56 NTIME_PIPE=28 $ make install prefix=/usr/local NSTATION=256 NFREQUENCY=6400 |
Warning |
---|
xGPU's NSTATION has a minimum of 16 and MUST be in increments of 16. So, for example, if you need to correlate 136T, then NSTATION needs to be 144 because 136 is not a multiple of 16. 144 is the next closest multiple. |
mwax_common
Visit the github page: https://github.com/MWATelescope/mwax_common
...
mwax_db2fits
Visit the github page: https://github.com/MWATelescope/mwax_db2fits
Example build script on Garrawarla
This is mostly for posterity given that Garrawarla's decommissioning at the end of 2024. It should help those down the line on other compatible systems (i.e., where xGPU is available).
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#!/usr/bin/env bash # This build script takes a single argument: the number of tiles. # This is important for parts of this package that depend on xGPU, for which # the number of stations ("tiles", in the MWA's case) must be set at compile # time. # For more information, see # https://wiki.mwatelescope.org/display/MP/MWAX+Offline+Correlator if [ -z "$1" ]; then echo "usage: $0 NUMTILES" echo "where NUMTILES is the number of MWA tiles to be correlated" exit fi NUMTILES=$1 echo "Compiling for ${NUMTILES}T configuration..." set -eu source /pawsey/mwa/software/python3/build_base.sh # PACKAGE is the name of the software (e.g. ruby, casacore etc.) PACKAGE=mwax_offline_correlator PREFIX="${ROOT}/${PACKAGE}" for DEPENDENCY in mwax_common mwax_cbf mwax_db2fits mwax_user_tools mwax-xGPU do cd "${PREFIX}" [ ! -r "${DEPENDENCY}-git" ] && git clone git@github.com:MWATelescope/${DEPENDENCY}.git ${DEPENDENCY}-git cd "${PREFIX}/${DEPENDENCY}"-git # Checkout the desired branch #git checkout master # Don't do this for mwax_db2fits until garrawarla_installion branch has been merged into master #git pull done # Set the target module version here VERSION=${NUMTILES}T echo "Package: ${PACKAGE}" echo "Version: ${VERSION}" echo "Prefix: ${PREFIX}" # Dependencies for mwax_offline_correlator #module purge module load gcc/8.3.0 module load cuda module use /pawsey/mwa/software/python3/modulefiles module load cfitsio_reentrant module load psrdada/mwax module list set -x # Compile! # Root directories for three modules MWAX_COMMON_ROOT=${PREFIX}/mwax_common-git MWAX_CBF_ROOT=${PREFIX}/mwax_cbf-git MWAX_DB2FITS_ROOT=${PREFIX}/mwax_db2fits-git MWAX_USER_TOOLS_ROOT=${PREFIX}/mwax_user_tools-git MWAX_XGPU_ROOT=${PREFIX}/mwax-xGPU-git # Where to put final products INSTALL_PREFIX=${ROOT}/${PACKAGE}/${VERSION}/${PAWSEY_CLUSTER} # Don't use cray compilers export CC=$(which gcc) export CXX=$(which g++) # ----- Compile mwax_xGPU ----- # Original build instructions for mwax_cbf at # https://github.com/MWATelescope/mwax-xGPU # and # https://wiki.mwatelescope.org/display/MP/MWAX+Offline+Correlator # The following has been adapted for Garrawarla. CUDA_DIR=${NVIDIA_CUDA_HOME} CUDA_ARCH="sm_70" # Build and install NFREQUENCY=6400 if [ "${NUMTILES}" -le 192 ]; then NTIME=52 NTIME_PIPE=52 else NTIME=56 NTIME_PIPE=28 fi cd ${MWAX_XGPU_ROOT}/src make CUDA_DIR=${CUDA_HOME} clean NSTATION=${NUMTILES} make CUDA_ARCH=${CUDA_ARCH} CUDA_DIR=${CUDA_HOME} NSTATION=${NUMTILES} NFREQUENCY=${NFREQUENCY} NTIME=${NTIME} NTIME_PIPE=${NTIME_PIPE} make CUDA_DIR=${CUDA_HOME} install prefix=${INSTALL_PREFIX} NSTATION=${NUMTILES} NFREQUENCY=${NFREQUENCY} # ----- Compile mwax_cbf ----- # Original build instructions for mwax_cbf at # https://github.com/MWATelescope/mwax_cbf # The following has been adapted for Garrawarla. cd "${MWAX_CBF_ROOT}" nvcc -c -Wno-deprecated-gpu-targets -O3 -gencode arch=compute_70,code=sm_70 \ -I${MWAX_CBF_ROOT}/mwax-cbf-cuda \ ${MWAX_COMMON_ROOT}/mwax-cbf-cuda/mwax_cbf_cuda.cu ${CC} -c -O3 \ -I${INSTALL_PREFIX}/include -I${PSRDADA_INCLUDE_DIR} -I${MWAX_COMMON_ROOT} -I${MWAX_COMMON_ROOT}/mwax-cbf-cuda \ ${MWAX_COMMON_ROOT}/mwax_global_defs.c \ ${MWAX_CBF_ROOT}/mwax-fullcorrelator/src/mwax_db2correlator2db/health.c \ ${MWAX_CBF_ROOT}/mwax-fullcorrelator/src/mwax_db2correlator2db/quit.c \ ${MWAX_CBF_ROOT}/mwax-fullcorrelator/src/mwax_db2correlator2db/mwax_db2correlate2db.c ${CC} -o mwax_db2correlate2db -fopenmp \ -L${PSRDADA_LIB} -L${INSTALL_PREFIX}/lib -lpsrdada -lxgpumwax${NUMTILES}t_6400 -lcudart -lcufft -lm -lstdc++ \ mwax_global_defs.o health.o quit.o mwax_db2correlate2db.o mwax_cbf_cuda.o install -D -t ${INSTALL_PREFIX}/bin mwax_db2correlate2db # ----- Compile mwax_db2fits ----- # Original build instructions for mwax_db2fits at # https://github.com/MWATelescope/mwax_db2fits cd ${MWAX_DB2FITS_ROOT} rm -rf build mkdir -p build && cd build cmake -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} \ -DPSRDADA_ROOT_DIR=${PSRDADA_ROOT} \ -DMWAX_COMMON_ROOT=../mwax_common-git \ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ .. make make install # ----- Compile mwax_user_tools ----- # Original build instructions for mwax_db2fits at # https://github.com/MWATelescope/mwax_user_tools cd ${MWAX_USER_TOOLS_ROOT}/utils/mwax_update_subfile_header ${CC} -c -Wall -Wextra -Ofast \ -I${PSRDADA_INCLUDE_DIR} \ -o mwax_update_subfile_header.o \ mwax_update_subfile_header.c ${CC} -o mwax_update_subfile_header \ -L${PSRDADA_LIB} -lpsrdada \ mwax_update_subfile_header.o install -D -t ${INSTALL_PREFIX}/bin mwax_update_subfile_header |
How to Run
Setup
Prepare input data
...
Key | Existing Value | Set To | Notes | |||
---|---|---|---|---|---|---|
MODE | MWAX_VCS | MWAX_CORRELATOR | Required | |||
INT_TIME_MSEC | a default set by the M&C system | 250-8000 | This is the correlator integration time (in ms) | |||
FINE_CHAN_WIDTH_HZ | a default set by the M&C system | 200-1280000 | This is the correlator frequency resolution (in Hz). E.g. 10000 would be 10 kHz. | |||
FSCRUNCH_FACTOR | a default set by the M&C system | 1-6400 | The number of 200 Hz ultrafine channels to scrunch together into a fine channel. E.g. for 10 kHz fine channels set this to 50 | |||
FINENFINE_CHAN_WIDTH_HZ | a default set by the M&C system | 2001-12806400 | Redundant info but must be compatible with the FSCRUNCH_FACTOR and FINE_CHAN_WIDTH_HZ. E.g. 10000 128 for 10kHz fine channel widthchannels | |||
NFINEEXPOSURE_CHAN | a default set by the M&C system | 1-6400 | Redundant info but must be compatible with FSCRUNCH_FACTOR and FINE_CHAN_WIDTH_HZ. E.g. 128 for 10kHz fine channelsSECS | the duration of the VCS observation | The duration of the correlator observation you want. | Must be in unit of 8 seconds, matching the total number of subfiles you wish to correlate per coarse channel * 8. |
OBS_ID | The original obs_id of the VCS observation | The first SUBOBS_ID of the data you want to correlate | So if you have a VCS observation and want to correlate only from 80 seconds in, then you need to make OBS_ID==SUBOBS_ID==the gps time at 80 seconds into the VCS obs. | |||
OBS_OFFSET | The 8 second offset for this subfile for the original VCS observation. | The offset you need for your correlator observation. | The first subfile in your correlator observation should be 0. Next will be 8, and so on. |
See also: MWAX PSRDADA header for more information on the definition of each key within the subfile header.
Create Ring Buffers
Note |
---|
For the INPUT ringbuffer, the -b parameter depends on the number of tiles present in the subfiles with the following relation: INPUT_BUFFER_SIZE = TILES * 256,000 bytes For the OUTPUT ringbuffer , the -b parameter depends on the number of tiles present in the output visibilities with the following relation: OUTPUT_BUFFER_SIZE = (TILES + 1) * TILES * 102408 bytes |
Code Block | ||
---|---|---|
| ||
# Create input ringbuffer (see above for -b value) dada_db -b 32768000 -k 1234 -n 640644 -l -p # create output ringbuffer (see above for -b value) dada_db -b 338297856 -k 2345 -n 3216 -l -p |
Launch Programs
Code Block | ||
---|---|---|
| ||
# # start mwax_db2fits- in offline mode you still need to provide health command line args even if you don't intend to monitor the health packets # nohup mwax_db2fits/bin/mwax_db2fits -k 2345 --destination-path=/path/for/output/fits/files/. --health-netiface=eth0 --health-ip=224127.0.20.21 --health-port=80059999 > mwax_db2fits.log 2>&1 & # # start mwax_db2correlate2db correlator # nohup mwax_cbf/mwax-fullcorrelator/mwax_db2correlate2db 1234 2345 224127.0.20.21 80049999 -a 5 -b 160 -d 0 -f 6400 -i 256 -o 12806400 -O 2 -r -t -v -v > mwax_db2correlate2db.log 2>&1 & |
...