-
Notifications
You must be signed in to change notification settings - Fork 511
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
Windows artifact complains about vcomp140d.dll #631
Comments
For everyone else reading: this is a missing OpenMP library. I'll take a look at how can we make it statically linked. |
@phkahler Well, I've discovered something awful: it is not possible to statically link the OpenMP runtime. That's true for MSVC, it is also true for Intel TBB, and it is true for gcc/glibc; I imaigne it would be true for MinGW, except MinGW ships without OpenMP. Because our policy is that we ship strictly a single self-contained |
I guess the one viable alternative is to use C++17 parallel constructs. That's a pretty extreme jump in terms of requirements though. |
It seems that MinGW build might have usable OpenMP, but this needs investigation. |
Isnt that a debug build trying to use a debug version of the .dll? People really should not be running those. I'm not certain if vcomp140.dll ships with windows by default, but even Autodesk has a page describing where to get it if users get errors about it. |
It doesn't.
Well, we should do better than Autodesk. But also we historically did better than Autodesk, and I see no reason to regress on usability now. In the past @jwesthues has expressed a strong desire to keep the current distribution model as it is (we were talking about CJK fonts then), and I very much agree. |
Yeah, once #618 lands people will have access to release versions of nightlies, which will solve a lot of problems. |
If it comes down to it, I would ask/suggest that the changes be kept in the code and just dont build with OpenMP. Whenever a suitable solution is found then searching for #pragma omp will show the known places that are safe to implement it. |
That works for me. But I was more thinking along the lines of using another solution instead of OpenMP, such as |
@whitequark using std::thread should be fine, I just didn't want the improvements to be rolled back and lost. |
@phkahler Sorry, I was unclear--by "roll back" I mean "stop shipping in default builds". |
@phkahler Do you think we could use |
@whitequark This is a bit outside my territory. I chose OpenMP primarily because I had used it many many years ago and it behaves exactly the way we want here (and I didn't even use any explicit options for partitioning the loop iterations among threads). This SO discussion brings up some possible issues with std::async: https://stackoverflow.com/questions/47895048/c-async-vs-openmp-tasks And it also links to this one: Those are interesting but don't seem to offer a definitive answer, just clarification of the possible issues. The ideal construct is a thread pool dividing up the work. The idea of creating a thread per surface in SolveSpace seems like it could be bad, but that would need some testing. We could pass each thread a range of surfaces to process, but then we have to decide how many threads etc... Is @rpavlik around? He seems to be quite knowledgeable about C++ constructs. |
This is unfortunate, but OpenMP is not available on some toolchains (most MinGW builds) and, more importantly, breaks the distribution model we use on Windows, which is a single self-contained executable. Leave the OpenMP disabled by default everywhere so that we don't have any second-class platforms where SolveSpace is slower than on first- class ones. Fixes #631.
Unfortunately there's nothing in C++ that maps neatly to openmp's parallel for in terms of simplicity. |
That's unfortunate. The other solution (that preserves OpenMP) I can think of is using MinGW for the official Windows binaries. That will break the SpaceNavigator support, sadly, and I'm yet to see a MinGW build with working OpenMP (but I've been reassured that these exist). |
This is unfortunate, but OpenMP is not available on some toolchains (most MinGW builds) and, more importantly, breaks the distribution model we use on Windows, which is a single self-contained executable. Leave the OpenMP disabled by default everywhere so that we don't have any second-class platforms where SolveSpace is slower than on first- class ones. Fixes solvespace#631.
I downloaded solvespace.exe from https://ci.appveyor.com/project/whitequark/solvespace/builds/33507638/artifacts and it is complaining about missing vcomp140d.dll.
The text was updated successfully, but these errors were encountered: