Comments (14)
Thanks for pointing it out @talfanoutlook .
This repo needs a bit of love which I wasn't able to give recently, so there's a good chance that the problem is outdated jax dependencies, I will look into it!
from jwave.
Great let me know - I'll try to take a look myself also.
from jwave.
I have a feeling that the library behind jwave (jaxdf) needs to be upgraded to the most recent jax versions, so maybe give me a bit to check that out before getting lost in the code :)
from jwave.
from jwave.
Hi @talfanoutlook , I might need another couple of days on this sorry.
I'm fixing a few issues with jaxdf
first that arised with the new jax version, and then will jump on it.
If you find anything meanwhile feel very free to update here or PR!
from jwave.
@talfanoutlook Just to let you know that I haven't forgot about this, but the problem is weirder than I expected.
What is happening is that if I run twice the same exact (jitted!) function, in this case single_source_simulation
, with the same arguments, sometimes I get two different results. It seems that there's something stored in memory that is affecting the results, which is definetely something unexpected from a funcional programming language like jax
, so it's not immediately obvious to me what the issue is.
from jwave.
Interestingly enough, if one disables GPUs and runs the code on CPU, the issue does not appear.
That explains why the tests that run against k-Wave do not fail.
I'll try to setup an MRE and raise it to the jax team.
from jwave.
from jwave.
Made a MRE and raised to the jax
team: google/jax#16129
For reference, the pure jax MRE is here https://github.com/ucl-bug/jwave/blob/gpu-error-mre/error.py
from jwave.
from jwave.
from jwave.
from jwave.
Seems like this is solved in jax 0.4.11 (and I have absolutely no idea why that's the case). Do you mind giving it a try with the latest jax version @talfanoutlook ?
For some reason, I do get an OOM error in my RTX 4000, so you may want to try with a beefier one. The fix for the OOM error is trivial, that is: passing the simulation parameters to the solver directly instead of having them internally calculated.
I will update the example notebook accordingly soon, while I move the time-stepping method to diffrax
:)
from jwave.
I will close it for now, as in my tests this seems to be consistently fixed. Feel free to reopen it or open a new one if the problem still arises!
from jwave.
Related Issues (20)
- Add `lineax` solvers HOT 1
- Allow float64 for helmholtz solver
- Example with Laplace Helmholtz equation
- CBS adjoint
- Add `all-contributors` bot HOT 1
- Use natural units for solvers
- Raise error when `helmholtz_solver` is called with a real field
- Slowness as medium variable
- Document default PML
- Helmholtz operators are missing initializers
- Check the number of signal and number of sources positions
- Implement logger HOT 1
- Helmholtz Problem tutorial NotFoundLookupError HOT 12
- Check operators default initializers
- PSTD time varying solver not called even when a FourierSeries sound speed is provided HOT 4
- Mimatch between incident and total field leading to scattering artifacts around sources and within PML HOT 4
- Reimplement intercomparison benchmarks with the new solvers
- simulate_wave_propagation solver error when using accuracy that's not the default accuracy of 8
- Installation error HOT 3
- Add flag for setting the PML outside the domain
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jwave.