JLBLine / WODEN

CUDA code designed to simulate interferometric data using point, Gaussian, and shapelet sky models
https://woden.readthedocs.io/en/latest/
Mozilla Public License 2.0
5 stars 0 forks source link

#bug #36

Closed ysj-ucas closed 4 months ago

ysj-ucas commented 4 months ago

I installed follow the document, but this happened in build:

/WODEN/src/primary_beam_cuda.cu(827): error: identifier "calc_jones_gpu_device" is undefined /WODEN/src/primary_beam_cuda.cu(835): error: identifier "get_tile_map" is undefined /WODEN/src/primary_beam_cuda.cu(836): error: identifier "get_freq_map" is undefined

Is this because of any problem in primary_beam_cuda.cu, or something missed in installation?

JLBLine commented 4 months ago

Hi @ysj-ucas, these are all hyperbeam functions, so there may well be a hyperbeam version issue or a linking issue. The simplest thing would be to use the pre-built docker version, but hopefully the below should help out.

From memory the last version of hyperdrive that the WODEN master branch was written to be compatible with was 0.6.1. You can install a specific version of hyperbeam via something like

cd your_installation_location
wget https://github.com/MWATelescope/mwa_hyperbeam/archive/refs/tags/v0.6.1.tar.gz
tar -xvf v0.6.1.tar.gz
cd mwa_hyperbeam-0.6.1
cargo build --release --features=cuda,cuda-static

(replace your_installation_location with somewhere sensible on your machine). To then make sure things get linked correctly, you should do

cd your_installation_location/WODEN/build
cmake .. -DHBEAM_INC=your_installation_location/mwa_hyperbeam-0.6.1/include \
           -DHBEAM_LIB=your_installation_location/mwa_hyperbeam-0.6.1/target/release/libmwa_hyperbeam.so

to setup the build files. Note you should delete everything in the WODEN/build directory, as CMake can remember old paths, so if you don't delete things it might point to an old hyperbeam version. Hopefully that helps.

ysj-ucas commented 4 months ago

It works. Thank you very much!

JLBLine commented 4 months ago

Excellent, glad it worked. Happy simulating