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

Fail to build on 32-bit x86 windows #1562

Closed
xq114 opened this issue Mar 2, 2024 · 2 comments · Fixed by #1619
Closed

Fail to build on 32-bit x86 windows #1562

xq114 opened this issue Mar 2, 2024 · 2 comments · Fixed by #1619

Comments

@xq114
Copy link

xq114 commented Mar 2, 2024

When I try to build ginkgo release 1.7.0 on x86 windows, I got this error:

C:\Users\runneradmin\ginkgo\v1.7.0\source\core\reorder\amd.cpp(188,49): error C2398: Element '2': conversion from '__int64' to 'gko::size_type' requires a narrowing conversion [C:\Users\runneradmin\ginkgo\v1.7.0\source\build_0efb1889\core\ginkgo.vcxproj]

https://github.com/ginkgo-project/ginkgo/blob/v1.7.0/core/reorder/amd.cpp#L188

It seems there should be an explicit conversion.

@upsj
Copy link
Member

upsj commented Mar 2, 2024

To make it short: We don't really support 32bit builds, since pure 32 bit CPUs are rather uncommon nowadays

@xq114
Copy link
Author

xq114 commented Mar 4, 2024

Same error exists on WebAssembly:

/home/runner/ginkgo/v1.7.0/source/core/reorder/amd.cpp:188:20: error: non-constant-expression cannot be narrowed from type 'value_type' (aka 'long long') to 'size_type' (aka 'unsigned long') in initializer list [-Wc++11-narrowing]
        host_exec, col_idxs_plus_workspace_size + 6 * num_rows};
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/runner/ginkgo/v1.7.0/source/core/reorder/amd.cpp:220:37: note: in instantiation of member function 'gko::experimental::reorder::Amd<long long>::generate_impl' requested here
GKO_INSTANTIATE_FOR_EACH_INDEX_TYPE(GKO_DECLARE_AMD);
                                    ^
/home/runner/ginkgo/v1.7.0/source/core/reorder/amd.cpp:188:20: note: insert an explicit cast to silence this issue
        host_exec, col_idxs_plus_workspace_size + 6 * num_rows};
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                   static_cast<size_type>(                    )
1 error generated.

I think it will do no harm to support as more platform as possible. Anyway, the fix is straightforward as gcc supposes: add a static_cast<size_type>() to amd.cpp. if there is a need, I can make a pr

tcojean added a commit that referenced this issue May 29, 2024
tcojean added a commit that referenced this issue May 31, 2024
tcojean added a commit that referenced this issue May 31, 2024
@tcojean tcojean linked a pull request Jun 5, 2024 that will close this issue
tcojean added a commit that referenced this issue Jun 6, 2024
Fixes and updates, bump third party libraries

Fixes some build and CI issues, also addresses some problems reported by users, and other release preparation aspects.

+ bump third party libraries
+ osx: try to also install (and run with) open-mpi in CI (disabled later, but works)
+ osx: try to help cmake find libomp (currently not found in MacOS CI!) 
+ fix tests' gtest helpers: Pass OpenMP when required
+ Fix: Cast according to Issue #1562
+ benchmark: clarify manual vs helper script
+ build[msvc]: change the library structure to workaround the symbol limit
+ ci[msvc,cuda]: use windows 2019, which somehow works (windows-latest doesn't)
+ ci: workaround sonarqube issues on horeka

Related PR: #1619
tcojean added a commit that referenced this issue Jun 7, 2024
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