Skip to content
Snippets Groups Projects
Commit 3854bb66 authored by Berenger Bramas's avatar Berenger Bramas
Browse files

Fill field data with zero after allocation -- ensure any access will be on initialized values

parent d32eab80
No related branches found
No related tags found
2 merge requests!21Bugfix/nansampling,!7Fill field data with zero after allocation
......@@ -101,6 +101,7 @@ field<rnumber, be, fc>::field(
sizes, subsizes, starts, this->comm);
this->data = fftw_interface<rnumber>::alloc_real(
this->rmemlayout->local_size);
memset(this->data, 0, sizeof(rnumber)*this->rmemlayout->local_size);
this->c2r_plan = fftw_interface<rnumber>::mpi_plan_many_dft_c2r(
3, nfftw, ncomp(fc),
FFTW_MPI_DEFAULT_BLOCK, FFTW_MPI_DEFAULT_BLOCK,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment