-
Notifications
You must be signed in to change notification settings - Fork 13
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
how to install SuperLU_MT on windows #2
Comments
Unfortunately, none of the developers know about Windows. The tips in the
FAQ page were provided by the users. But, from the error message you
provided, it looks like just the timer issue: it is using the timer
function on Linux. Can you replace it by the Windows timer you usually use?
If you succeed, I would like to know how it is resolved.
Sherry Li
…On Fri, Feb 4, 2022 at 1:38 PM Ning-Li-Ambition ***@***.***> wrote:
Hi, I try to install SuperLU_MT on windows with visual studio following
your instructions on this webpage
https://portal.nersc.gov/project/sparse/superlu/faq.html#windows. But it
does not work and I got the following errors. Could you please help me to
fix these errors? thanks
Severity Code Description Project File Line Suppression State
Error (active) E0393 pointer to incomplete class type "struct timeval" is
not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 72
Error (active) E1696 cannot open source file "sys/time.h" SuperLU_MT
C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 47
Error (active) E1696 cannot open source file "sys/times.h" SuperLU_MT
C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 46
Error (active) E1696 cannot open source file "unistd.h" SuperLU_MT
C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 48
Error (active) E0020 identifier "_SC_CLK_TCK" is undefined SuperLU_MT
C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 58
Error (active) E3365 incomplete class type "struct tms" is not allowed
SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 61
Error (active) E3365 incomplete class type "struct tms" is not allowed
SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 62
Error (active) E0070 incomplete type is not allowed SuperLU_MT
C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 56
Error (active) E0070 incomplete type is not allowed SuperLU_MT
C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 79
Error (active) E0070 incomplete type is not allowed SuperLU_MT
C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 80
Error (active) E0393 pointer to incomplete class type "struct timeval" is
not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 71
—
Reply to this email directly, view it on GitHub
<#2>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZSV5ZJFR7VQKX4ESSRRODUZRBOTANCNFSM5NS3ZPRA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I added NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;__OPENMP;WIN32;UpCase; to property page->C/C++->Preprocessor->Preprocessor definitions. and build the library successfully. But when I linked the library SuperLU_MT.lib to my Fortran visual studio project, I got the linker error: |
Can you take a look at README, the section discussing CDEFS. Some name mangling is needed between Fortran and C programs. |
I read that section, and I also read the source file slu_mt_Cnames.h. That is why I added UpCase to Preprocessor definitions. |
I suggest that you write a small program to test out the Fortran-C calling needs on your machine. |
Hi, Sherry, this is my test result:
|
Are you using C++ compiler? If so, can you try add c_bridge_pdgssv in side extern "C" { ...} in SRC/slu_mt_ddefs.h ? |
yes, visual studio 2019 uses C++ compiler. |
I just pushed a commit, adding c_bridge_pdgssv_ in SRC/slu_mt_ddefs.h. |
it builds now with visual studio using cmake |
I think there might be a problem with current version (4.0.0) for Windows users. I know main developers does not use Windows, but I hope there might be some developers or users that support the package for Windows. So I built 4.0.0 yesterday this way: created C++ project and added all .c and .h source files, then liked Intel MKL (I use Intel C++ compiler 2024), set preprocessor definitions USE_VENDOR_BLAS and _OPENMP and built a .lib. I cannot build superlu_mt version 3.1 this way though, because of "Error: call to undeclared function 'ccopy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] superlu_v31_intel_build path\SuperLU\SuperLU_MT_3.1\SRC\clacon.c(159,5): 1". I don't know how easy it can be fixed but I do not really need this version. But I can build as well some intermediate code I downloaded in spring 2023 and it is different from the current 4.0.0 version (I attach the archive). The problem is the code (I also attach the code and a small matrix in another archive) works fine on an intermediate version (relative residual output 1.317e-12, info=0, nnz(L+U)=1192547) and works wrong on 4.0.0 version (relative residual output 2.338e+09, info=0, nnz(L+U)=1189830). Please tell me what can be the reason of such behaviour and whether someone built and used 4.0.0 version on Windows with MSBuild (Visual Studio) successfully. |
Seems like I fixed it. First I tried to set [int nprocs = 1] instead of [int nprocs = 4] and itworked correctly. Then I tried turn off OpenMP support MSBuild option while building 9.0.0 version and it worked. |
I realized I just turned off OpenMP support and OpenMP directives were ignored. When I build like this, SuperLU_mt with sequential BLAS works a little bit slower than sequential SuperLU. When I build with OpenMP support, I get huge residual with both 4.0.0 and older versions, but when I set OpenMP threads number as 1 I get normal residual. Could you please tell what steps did you do in order to build correctly working SuperLU_mt with OpenMP and Visual Studio? |
the infos on the website are outdated, as it can be built using cmake now that should set the right compilation options for you, here is an example using cmake + ninja:
|
These commands worked for me, thanks a lot! |
Hi, I try to install SuperLU_MT on windows with visual studio following your instructions on this webpage https://portal.nersc.gov/project/sparse/superlu/faq.html#windows. But it does not work and I got the following errors. Could you please help me to fix these errors? thanks
Severity Code Description Project File Line Suppression State
Error (active) E0393 pointer to incomplete class type "struct timeval" is not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 72
Error (active) E1696 cannot open source file "sys/time.h" SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 47
Error (active) E1696 cannot open source file "sys/times.h" SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 46
Error (active) E1696 cannot open source file "unistd.h" SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 48
Error (active) E0020 identifier "_SC_CLK_TCK" is undefined SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 58
Error (active) E3365 incomplete class type "struct tms" is not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 61
Error (active) E3365 incomplete class type "struct tms" is not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 62
Error (active) E0070 incomplete type is not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 56
Error (active) E0070 incomplete type is not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 79
Error (active) E0070 incomplete type is not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 80
Error (active) E0393 pointer to incomplete class type "struct timeval" is not allowed SuperLU_MT C:\Installed-Libs\superlu_mt_3.1\SRC\dclock.c 71
The text was updated successfully, but these errors were encountered: