Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible OSKAR output issue on macOS with OpenCL #31

Closed
ChenxiSSS opened this issue Oct 14, 2020 · 1 comment
Closed

Possible OSKAR output issue on macOS with OpenCL #31

ChenxiSSS opened this issue Oct 14, 2020 · 1 comment

Comments

@ChenxiSSS
Copy link

ChenxiSSS commented Oct 14, 2020

Hi Team!

I want to start by thanking your efforts on the OSKAR simulator. Especially the OpenCL support, it was great! However, I'm getting a strange issue with OSKAR (2.7.6 via dmg installation) on macOS with OpenCL.

I am using an iMac (27 inches, 2020, macOS Catalina 10.15.7) with AMD Radeon Pro 5700 XT graphics. The simulation did seem to run well with no error or anything, but the cleaned image from the ms files is empty. Detailed info can be found at here.

I checked the output visibility ms file and find out that the visibility has an all zero data column. Please see the image attached below.

image

I have used other macs to run the same task with no issue at all. Everything is quite normal. The machine info, OSKAR initial file, and logs can be found at here and here.

I have tried to pinpoint the issue, but haven't got anyway for the last few days. Could you please help me out with this issue?

@fdulwich
Copy link
Contributor

Hi, thank you for your very detailed reports! I think you may be trying to allocate too much GPU memory, which is causing things to fail (although why no error was reported is a mystery, since the error codes are definitely checked in OSKAR). Unfortunately OpenCL also has a concept of a maximum allocation size, which is often a quarter of the global memory size - although this may or may not be enforced, depending on the device and the driver.

The reason I suspect a problem with the memory usage here is because the value you have set for max_sources_per_chunk is very large (1004288), and arrays will be allocated on the GPU using this value multiplied by the number of stations (512 in this case) and the Jones matrix element size (8 bytes in this case with single precision, although it could be up to 64 bytes in double precision with full polarisation. Double precision may be needed if you're using long baselines).

There is no advantage in setting max_sources_per_chunk to be larger than the sky model, and it should rarely be set to anything larger than about 100000, but it's a tunable parameter to allow runs to be optimised for different systems. Perhaps try reducing this value to (for example) 65536 and see if you get better results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants