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

Dealii 9.2.0 has compilation errors under Windows when using PETSC and SLEPC support. #10564

Closed
loylick opened this issue Jun 21, 2020 · 4 comments · Fixed by #10578
Closed

Comments

@loylick
Copy link

loylick commented Jun 21, 2020

Hi guys! It has been a while since I compiled Dealii last time. I guess this error is seldom to come by because a few would engage in compiling Dealii for naitive Windows with PETSC and SLEPC.
The cmake command I used to configure Dealii is:
cmake -G "Visual Studio 15 2017 Win64" -DPETSC_DIR=h:/dev/petsc-3.13.2 -DPETSC_ARCH="arch-mswin-c-release" -DSLEPC_DIR=h:/dev/slepc-3.13.3 -DSLEPC_ARCH="arch-mswin-c-release" -DDEAL_II_WITH_UMFPACK=ON -DLAPACK_FOUND=true -DLAPACK_LIBRARIES="h:/Dev/petsc-3.13.2/arch-mswin-c-release/lib/libf2clapack.lib;h:/Dev/petsc-3.13.2/arch-mswin-c-release/lib/libf2cblas.lib" -DLAPACK_LINKER_FLAGS="-lm" ..
Otherwise I could not persuade dealii to find clapack and cblas packges intalled with PETSC.
Here are the errors I got:
dealii_compile_error
Actually It is only one error in the line friend class SolverBase. The compiler finds some template class dealii:SolverBase and complains why I did not provide template arguments when referring to this class. I think this issue will appear not only under windows because the class dealii::SLEPcWrappers::SolverBase is not declared elsewhere in the file dealii-9.2.0\include\deal.II\lac\slepc_spectral_transformation.h. I've resolved this error by a forward declaration of the class SolverBase within the namespce SLEPcWrappers. Here is my patch:
patch.txt

@loylick
Copy link
Author

loylick commented Jun 21, 2020

Forgot to add that besides this error everything went smooth. I've succeeded in compiling the whole project in Debug and Release. My respect to Dealii team!

@bangerth
Copy link
Member

That's by and large pretty good news indeed! I think it is mostly due to the fact that we now have a few industry projects using deal.II on windows, and that makes sure that stuff is compiled regularly.

Do you know how to make your patch into a pull request? (If not, take a look here: https://github.com/dealii/dealii/wiki/Contributing .) It would be nice to get a pull request because then you're the actual and official author in the git history. But if you want, we can also take your patch and apply it ourselves -- just let us know!

@loylick
Copy link
Author

loylick commented Jun 23, 2020

Hi Wolfgang! A couple of years ago I made two or three pool requests and had already officially contributed to dealii. Now, it is just a line of code. I would rather ask you to apply the patch. For you, it will take a few minutes. I do not have all this kitchen on the run so it would take me an hour or so to accomplish the pool request.

@bangerth
Copy link
Member

I would have gladly done it, but @masterleinad beat me to it :-)

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 a pull request may close this issue.

2 participants