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

FillRandom: Use MKL host API #3536

Merged
merged 2 commits into from
Nov 1, 2023
Merged

Conversation

WeiqunZhang
Copy link
Member

No description provided.

@WeiqunZhang
Copy link
Member Author

Currently it fails at link time with

/usr/bin/ld: /tmp/icpx-e50c52/AMReX_Random-f3d2c3.o: in function `amrex::FillRandom(double*, long)':
/home/wqzhang/mygitrepo/amrex/Tests/Amr/Advection_AmrCore/Exec/../../../../Src/Base/AMReX_Random.cpp:262: undefined reference to `sycl::_V1::event oneapi::mkl::rng::generate
<oneapi::mkl::rng::uniform<double, oneapi::mkl::rng::uniform_method::standard>, oneapi::mkl::rng::philox4x32x10*>(oneapi::mkl::rng::uniform<double, oneapi::mkl::rng::uniform
_method::standard> const&, oneapi::mkl::rng::philox4x32x10*&, long, oneapi::mkl::rng::uniform<double, oneapi::mkl::rng::uniform_method::standard>::result_type*, std::vector<
sycl::_V1::event, std::allocator<sycl::_V1::event> > const&)'
/usr/bin/ld: /tmp/icpx-e50c52/AMReX_Random-f3d2c3.o: in function `amrex::FillRandomNormal(double*, long, double, double)':
/home/wqzhang/mygitrepo/amrex/Tests/Amr/Advection_AmrCore/Exec/../../../../Src/Base/AMReX_Random.cpp:297: undefined reference to `sycl::_V1::event oneapi::mkl::rng::generate
<oneapi::mkl::rng::gaussian<double, oneapi::mkl::rng::gaussian_method::box_muller2>, oneapi::mkl::rng::philox4x32x10*>(oneapi::mkl::rng::gaussian<double, oneapi::mkl::rng::g
aussian_method::box_muller2> const&, oneapi::mkl::rng::philox4x32x10*&, long, oneapi::mkl::rng::gaussian<double, oneapi::mkl::rng::gaussian_method::box_muller2>::result_type
*, std::vector<sycl::_V1::event, std::allocator<sycl::_V1::event> > const&)'
icpx: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [../../../../Tools/GNUMake/Make.rules:65: main2d.sycl.MPI.ex] Error 1

@WeiqunZhang
Copy link
Member Author

The link issue is resolved now. It was an error in calling the MKL functions, which unfortunately do not have compile time type checks. So the error was delayed until link time.

@atmyers atmyers merged commit f540042 into AMReX-Codes:development Nov 1, 2023
69 checks passed
@WeiqunZhang WeiqunZhang deleted the mkl_rng branch November 1, 2023 19:07
guj pushed a commit to guj/amrex that referenced this pull request Dec 13, 2023
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

Successfully merging this pull request may close these issues.

2 participants