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

trilinos warning and memory consumption #219

Closed
tjhei opened this issue Jun 29, 2021 · 7 comments
Closed

trilinos warning and memory consumption #219

tjhei opened this issue Jun 29, 2021 · 7 comments
Assignees

Comments

@tjhei
Copy link
Member

tjhei commented Jun 29, 2021

@gassmoeller reported large memory consumption when compiling trilinos and he saw the following:

CMake Warning at packages/tpetra/CMakeLists.txt:919 (MESSAGE):
  Tpetra_INST_COMPLEX_DOUBLE=ON, but Trilinos_ENABLE_COMPLEX_DOUBLE=OFF.
  This will work, but it will make builds more expensive, because it turns
  off explicit instantiation for complex<double> in KokkosKernels.  If you
  want to use Scalar=complex<double> in Tpetra, just set
  Trilinos_ENABLE_COMPLEX_DOUBLE=ON.  You do not need to set
  Tpetra_INST_COMPLEX_DOUBLE explicitly any more.

I need to test this.

@gassmoeller
Copy link
Member

I have tested this a bit further. What I can already say is that setting Trilinos_ENABLE_COMPLEX_DOUBLE=ON removes the warning message. And that setting Trilinos_ENABLE_COMPLEX_DOUBLE=OFF and all the COMPLEX INST variables as well significantly reduces the memory usage (I am now able to compile -j6 with 32 GB RAM, which I could not do before).

I have not yet checked if/how much Trilinos_ENABLE_COMPLEX_DOUBLE=ON reduces the memory needs.

@gassmoeller
Copy link
Member

Setting Trilinos_ENABLE_COMPLEX_DOUBLE=ON removes the warning, but I am again not able to compile with 6 processes and 32 GB RAM :-(

This is of course not an issue with candi or deal.II, but I think many users will be surprised if their compilation crashes even if they have 4GB/job on a laptop or desktop (and it can literally freeze the whole system if it starts swapping data). For large clusters and workstations it is less of an issue, because the total number of compilation units that need that much memory may not be large, but at least with the current default branch @jdannberg had the same problems with 16 jobs and 64 GB RAM.

@koecher
Copy link
Contributor

koecher commented Jun 30, 2021

@gassmoeller Thanks for reporting that. Have you tried using one build process only?

On laptops with 8GiB of RAM I do so, it takes longer time but usually doesn't break due to memory issues/swapping freeze while linking with more than one build process.

@gassmoeller
Copy link
Member

@koecher, yes I can successfully compile with 4 processes and 32 GB RAM. This was not so much a question for help, more a question of if we are ok with this large memory requirement. We use candi as suggested installation procedure for deal.II in geodynamics/aspect and I am considering modifying our installation instructions to disable all the complex instantiations for our users, because they never need it and many are students with less powerful laptops (and waiting for several hours for compiling trilinos is problematic for short-term user workshops). I guess enabling the complex instantiations by default in candi is necessary, because deal.II by default enables the complex instantiations? If so it is of course fine to leave it enabled. But maybe deal.II should document somewhere that to install it using candi one needs 8GB RAM per job?

@koecher
Copy link
Contributor

koecher commented Jun 30, 2021

In the Readme of candi we have section on that already (multiple build jobs) with a warning for low memory systems.

Most packages are fine with 2 or more build jobs with 8GiB RAM, but not all. It is hard to say what is the recommendation.

I would be fine to disable complex support by default in Trilinos but I don't know if somebody needs it. As far as I know, there is no deal.II step tutorial using this feature of trilinos.

@gassmoeller
Copy link
Member

In the Readme of candi we have section on that already (multiple build jobs) with a warning for low memory systems.

Ah, I did not see that, thanks. I guess I was mostly surprised because the memory requirements seem to have increased compared to earlier versions of trilinos.

I would be fine to disable complex support by default in Trilinos but I don't know if somebody needs it. As far as I know, there is no deal.II step tutorial using this feature of trilinos.

I am not sure how widely it is used. Maybe @tjhei has some insight?

@bangerth
Copy link
Member

bangerth commented Jun 30, 2021 via email

kinnewig pushed a commit to kinnewig/candi that referenced this issue Jul 6, 2021
Trilinos complex support is not needed in deal.II, unless complex Tpetra
vectors are used (unlikely). Enabling it requires large amounts of RAM
(we are talking 10GB per process). Instead, introduce an option that
defaults to OFF.
Also see dealii/dealii#8945
fixes dealii#219
@koecher koecher self-assigned this Jul 9, 2021
kinnewig pushed a commit to kinnewig/candi that referenced this issue Jul 12, 2021
Trilinos complex support is not needed in deal.II, unless complex Tpetra
vectors are used (unlikely). Enabling it requires large amounts of RAM
(we are talking 10GB per process). Instead, introduce an option that
defaults to OFF.
Also see dealii/dealii#8945
fixes dealii#219
@tjhei tjhei closed this as completed in a041d8d Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants