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

MSVC: Cannot convert from strumpack::EliminationTreeMPIDist<scalar_t,integer_t> *' to 'const strumpack::EliminationTree<scalar_t,integer_t> *' #104

Open
AlbertNichols3 opened this issue Aug 23, 2023 · 1 comment

Comments

@AlbertNichols3
Copy link
Contributor

In StrumpackSparseSolverMPIDist.hpp there is this block of code on or about line 305:

Reord_t* reordering() override;
Tree_t* tree() override { return tree_mpi_dist_.get(); }
const SpMat_t* matrix() const override { return mat_mpi_.get(); }
const Reord_t* reordering() const override;
const Tree_t* tree() const override { return tree_mpi_dist_.get(); }

The issue is with the two tree() functions. The stored datatype is EliminationTreeMPIDist<scalar_t,integer_t>, while the return is EliminationTree<scalar_t,integer_t>. This would be okay, since the former is derived from the latter, if the definition for EliminationTreeMPIDist<scalar_t,integer_t> were present in this file, or where it is used. However, all that is present here is the forward declaration of the two datatypes. Thus, the compiler (in this case Microsoft Visual C++) can not determine that they are related to each other. This results in:

error C2440: 'return': cannot convert from 'strumpack::EliminationTreeMPIDist<scalar_t,integer_t> *' to 'const strumpack::EliminationTree<scalar_t,integer_t> *'

This occurs in every file that does not also include "EliminationTreeMPIDist.hpp".

This file is being included in our larger project which is using Strumpack, and adding the extra file is less than desirable.

pghysels added a commit that referenced this issue Aug 23, 2023
@pghysels
Copy link
Owner

Thanks for pointing this out.
Unfortunately we don't have the time or resources right now to test on windows.
I hope this commit fixes the problem for you?

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

No branches or pull requests

2 participants