llnl / llnl/libROM

Memory use of `scalapack_f_wrapper::factorize()`

Open
#234 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
236
Forks
47
PR merge metrics
No merged PRs in 30d

Description

I'm currently playing with the [example 1](https://github.com/LLNL/libROM/blob/master/examples/prom/poisson_global_rom.cpp). Although, I'm having a memory limitation error at merge stage, which I think is somewhat strange:
```
test@3a4a682f99d7:~/build/examples/prom$ sudo ./poisson_global_rom -merge -ns 3
Options used:
--mesh ../data/star.mesh
--order 1
--id 0
--nset 3
--no-static-condensation
--no-partial-assembly
--frequency 1
--coefficient 1
--device cpu
--visit-datafiles
--visualization
--no-fom
--no-offline
--no-online
--merge
Device configuration: cpu
Memory configuration: host-std
Number of finite element unknowns: 82561
Opening file: basis0_snapshot.000000
Opening file: basis1_snapshot.000000
Opening file: basis2_snapshot.000000
Creating file: basis.000000
In file '/home/test/libROM/lib/linalg/scalapack_f_wrapper.f90', around line 525: Error allocating 13081962144 bytes: Cannot allocate memory
```

`In file '/home/test/libROM/lib/linalg/scalapack_f_wrapper.f90', around line 525` corresponds to the middle of `factorize()` function. It's demanding about 13GB of memory for SVD operation of matrix of size `(82561, 3)`, which probably takes about 2 MB of memory.

When I run this on a machine with a larger memory, it works as expected. Although, I'm wondering if this memory usage is an expected size.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the merge command from examples/prom/poisson_global_rom.cpp and inspect lib/linalg/scalapack_f_wrapper.f90 around line 525 in factorize(). Compare the allocation with the reported (82561, 3) matrix dimensions and determine whether the 13 GB request is expected; document the explanation or identify the faulty allocation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, fortran
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.