Skip to content

Remove USE_COMPLEX_Z - #230

Open
quantumsteve wants to merge 7 commits into
dmrgpp-project:masterfrom
quantumsteve:cleanup_dmrg_vbatch
Open

Remove USE_COMPLEX_Z#230
quantumsteve wants to merge 7 commits into
dmrgpp-project:masterfrom
quantumsteve:cleanup_dmrg_vbatch

Conversation

@quantumsteve

@quantumsteve quantumsteve commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

This removes the USE_COMPLEX_Z macro, building both double and std::complex<double> instantiations of each function. This also eliminates MYTYPE and MAGMA_T macros.

I also removed the USE_MALLOC macro and code contained as dmrg_malloc and dmrg_free do the same thing.

Lastly, I fixed some memory allocations preventing the batched plugin from working on multiple GPUs.

@quantumsteve
quantumsteve force-pushed the cleanup_dmrg_vbatch branch from 52cf5da to bfa8eff Compare July 23, 2026 15:19
@quantumsteve
quantumsteve requested a review from PDoakORNL July 23, 2026 15:32
@quantumsteve

Copy link
Copy Markdown
Collaborator Author

@g1257 What in dmrgpp decides if we are using the real or complex code? single or double precision?

@g1257

g1257 commented Jul 23, 2026 via email

Copy link
Copy Markdown
Collaborator

@quantumsteve

Copy link
Copy Markdown
Collaborator Author

Complex is using only if either of the following conditions is met (1) usecomplex is in SolverOptions in the input, or (2) TimeStepTargeting is in SolverOptions See https://github.com/dmrgpp-project/dmrgpp/blob/master/dmrg/Engine/DmrgRunner.cpp#L70 If neither condition is met, then double is used.

OK, so instantiating both real and complex makes sense.

@g1257

g1257 commented Jul 23, 2026 via email

Copy link
Copy Markdown
Collaborator

@PDoakORNL

Copy link
Copy Markdown
Collaborator

This looks good to me but I would like to at least get a Magma CI environment ready and do a little testing on this. Whether the new CI flavor gets commit before or after is probably less crucial.

Comment thread dmrg/GPUPlugin/dmrg_magma.h Outdated
Comment thread dmrg/GPUPlugin/setup_matrix.cpp Outdated
@quantumsteve
quantumsteve force-pushed the cleanup_dmrg_vbatch branch from 18f7bff to 3c2b2ff Compare July 27, 2026 18:53
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
Signed-off-by: Steven Hahn <hahnse@ornl.gov>
@masterleinad
masterleinad force-pushed the cleanup_dmrg_vbatch branch from 3c2b2ff to 3e5ff4f Compare July 30, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants