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 memory leak #49

Open
DavidDiazGuerra opened this issue Oct 20, 2023 · 4 comments
Open

Possible memory leak #49

DavidDiazGuerra opened this issue Oct 20, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@DavidDiazGuerra
Copy link
Owner

There might be a memory leak in gpuRIR_cuda::cuda_simulateRIR since the memory of orV_src is not free at the end of the function:

gpuRIR/src/gpuRIR_cuda.cu

Lines 917 to 927 in 283235d

// Free memory
gpuErrchk( cudaFree(pos_src) );
gpuErrchk( cudaFree(pos_rcv) );
gpuErrchk( cudaFree(orV_rcv) );
gpuErrchk( cudaFree(amp) );
gpuErrchk( cudaFree(tau) );
gpuErrchk( cudaFree(tau_dp) );
gpuErrchk( cudaFree(rirISM) );
gpuErrchk( cudaFree(A) );
gpuErrchk( cudaFree(alpha) );
gpuErrchk( cudaFree(rirDiff) );

@DavidDiazGuerra DavidDiazGuerra added the bug Something isn't working label Oct 20, 2023
@shenbuguanni
Copy link

yes, I get some out of memory error like :
GPUassert: out of memory xxxx/gpuRIR/src/gpuRIR_cuda.cu 627
What effect does this have?

@DavidDiazGuerra
Copy link
Owner Author

I don't think you're running out of memory because of this except if you're calling gpuRIR_cuda::cuda_simulateRIRmany times with a really high number of directive sources. The problem is probably that you have already allocated a big amount of memory out of the library (for example with a deep-learning framework) or that you're trying to simulate a too-long RIR with the ISM.

@shenbuguanni
Copy link

Yes, Because I want to generate a large number of RIRs in multiple processes at the same time, I will run many python scripts at the same time, will this error affect the generation of RIR data? If not, this is the way it is

DavidDiazGuerra added a commit that referenced this issue Feb 27, 2024
@DavidDiazGuerra
Copy link
Owner Author

The last version of the master branch should have the memory leak fixed now, but you'll probably keep having that error if you create so many processes that you run out of GPU memory. That's not a bug in the library, it's just your computer running out of GPU memory, the same as if it was running out of RAM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants