You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
OpenBLAS built with USE_OPENMP=1 for windows 64 bit #1989
Can you please send me OpenBLAS latest release built with USE_OPENMP=1 for windows 64 bit (Intel Haswell processor)? I don't have a lot of experience building for windows and was unsuccessful...the standard release on your site works but I want to work with OpenBLAS & OpenMP.
gcc version: gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0.
gfortran version: GNU Fortran (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0.
Hi! maybe you can explain what I'm doing wrong...I did the following:
Installed MSYS-1.0.11.
Installed msysDTK-1.0.1.
Downloaded OpenBLAS Windows x86/x86_64 latest binary package: OpenBLAS 0.3.5 version.
Extracted the binary and I get the folder: xianyi-OpenBLAS-eebc189.
Opened MSYS and move to OpenBLAS folder with: $ cd /d/OpenBLAS/xianyi-OpenBLAS-eebc189.
When I build with $ make command I receive the following error:
$ make Can't locate object method "new" via package "File::Temp" (perhaps you forgot to load "File::Temp"?) at ./c_check line 15. make: *** [config.h] Error 9 Makefile.system:201: Makefile.conf: No such file or directory C:\msys\1.0\bin\make.exe: *** couldn't commit memory for cygwin heap, Win32 erro r 0
You do everything correctly.
Your perl is broken/incomplete. It would generate makefile.conf that is found missing one step later.
If you have some strawbery or activestate windows perl installed and working - try to make it appear before mingw/cygwin perl in path
The essence of problem is tat perl.exe invoked from make.exe finds different versions of core perl modules because of PERL5LIB vatiable pointing to other perl installation and justly rejects to load those.
This is my PATH (printed with cmd):
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32 \WindowsPowerShell\v1.0;C:\Program Files\Microsoft Windows Performance Toolkit\ ;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Program Files (x86)\Calibre2;C: \Program Files (x86)\Notepad++;C:\Windows\System32\WindowsPowerShell\v1.0;C:\W indows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporatio n\PhysX\Common;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\mingw-w64 \x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Windows\System32\WindowsPowerS hell\v1.0;C:\msys\1.0\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_ v6-rev0\mingw64\bin;C:\msys\1.0\bin
C:\msys\1.0\bin and C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_ v6-rev0\mingw64\bin appear twice...C:\Windows\System32\WindowsPowerShell\v1.0 appears three times...
What was done for sf.net libraries: make HOSTCC=gcc CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran DYNAMIC_ARCH=1 NUM_THREADS=64
Inside Linux virtual machine
Fedora 28/29 or Ubuntu 18.04 will provide these compilers with AVX512 support.
You will need few redist DLLs copied off the building Linux installation
Shortcoming is that DLL will use GOMP provided on that Linux and it will certainly fail to work with very different gcc native to windows.
@brada4 reverting that is not so easy now that the temporary file is also needed on x86_64 (AVX512 compatibility test). I will check later if conditional loading is possible (tried it once and did not get it to work, but my perl is a bit rusty), but I suspect File::Basename (used in the cross-compile check) will be equally problematic when PERL5LIB points to a conflicting or incomplete module collection.
If I clear the user PATH variable and put C:\msys\1.0\bin before C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_ v6-rev0\mingw64\bin in Path system variable I get the same error...my Path system variable is now:
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\msys\1.0\bin;C:
Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft Windows Perf
ormance Toolkit;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Program Files (x
86)\Calibre2;C:\Program Files (x86)\Notepad++;C:\Program Files (x86)\NVIDIA Co
rporation\PhysX\Common;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\m
ingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;
What does perl -v return - is it 5.6.1 ? (I think we also saw a few cases where PERL5DIR was set correctly for the perl version in the PATH, but the File::Temp module (File/Temp.pm) was not installed).
Can you try with the attached version of the c_check script (needs renaming back to c_check without the .txt ending - github will not let me attach it unless it is named .txt) c_check.txt
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using man perl' or perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
I renamed the file to c_check, put in on the desktop, moved to desktop with cd /c/Users/Zev/Desktop and this is the output:
$ c_check
C Compiler () is something wrong.
1 at ./c_check line 29.
Sorry, I guess I should have been more verbose - the idea with the c_check file is to replace the c_check file in the OpenBLAS folder with it and retry the build. (c_check is called by one of the Makefiles and expects a number of arguments, including the name of the C compiler, so running it on its own is not really expected to work)
What I did in the new file is try to work around any problems with wrong or unavailable perl modules)
After I renamed openblas_config_template.h to openblas_config.h (it also compiles after renaming config.h to openblas_config.h) it compiles without errors with the files you mentioned. I also had to add cblas_mangling.h to the include folder as mentioned previously.
Which file should I rename to openblas_config.h, openblas_config_template.h or config.h?
Normally that would happen in the install step. openblas_config.h combines both config.h and openblas_config_template.h (with a version string added and a header guard against double inclusion around it, i.e.
#ifndef OPENBLAS_CONFIG_H
#define OPENBLAS_CONFIG_H
#define OPENBLAS_VERSION "OpenBLAS 0.3.5"
<contents of config.h>
<contents of openblas_config_template.h>
#endif
And the cblas_mangling.h is only required by the (unused) netlib version of cblas.h, not by the OpenBLAS cblas.h so you would not normally need to copy it to the include folder.
I made a mistake...I can't compile with the package cblas.h, I can only compile with lapack-netlib cblas.h & cblas_mangling.h...the build does not generate openblas_config.h and if I paste config.h & openblas_config_template.h in one file and rename to openblas_config.h (and compile with package cblas.h) there is still a header error. Attached config.h & openblas_config_template.h build files. config.txt openblas_config_template.txt
Finished to compare LAPACKE_dsyev_2stage with the three builds:
592.8 s - OpenBLAS regular build (OpenBLAS 0.3.5).
590.3 s - OpenBLAS build with USE_OPENMP=1 (OpenBLAS 0.3.5).
1971.3 s - BLAS, LAPACK & LAPACKE (LAPACK 3.7.0).
OpenBLAS is definitely faster...is it crucial to work with the package cblas.h? results with lapack-netlib cblas.h & cblas_mangling.h (without openblas_config.h) are very good.
The only relevant difference in the OpenBLAS cblas.h is the addition of the prototypes for the openblas-specific utility functions like openblas_set_num_threads(), if you do not use them your current setup should be sufficient. (Not sure why copying the two files together to create openblas_config.h did not work for you though, perhaps you did not add the OPENBLAS_VERSION line ?)
I get the same error:
In file included from C:...\z1.c:9:
C:...\xianyi-OpenBLAS-eebc189\include/cblas.h:5:10: fatal error: common.h: No such file or directory
#include "common.h"
^~~~~~~~~~
compilation terminated.
That should be openblas_config.h instead of common.h in the cblas.h (normally converted in the make install step).
BTW the f77blas.h is generated from common_interface.h f77blas.txt
Err, the f77blas.h was just mentioned in passing as it is the last of the header files that are normally generated rather than copied.
You need to change the "common.h" in cblas.h to "openblas_config.h" to make the error go away.
I've dropped a line in general threading issue so that if there is a measurable improvement reached with _symv it can be verified in this context of deep lapack calls too.
Activity
brada4 commentedon Jan 29, 2019
It is just adding USE_OPENMP=1 to make command line. It will use gomp , not native omp, so other programs need to use gomp
thedude2019 commentedon Jan 29, 2019
Hi! maybe you can explain what I'm doing wrong...I did the following:
$ make Can't locate object method "new" via package "File::Temp" (perhaps you forgot to load "File::Temp"?) at ./c_check line 15. make: *** [config.h] Error 9 Makefile.system:201: Makefile.conf: No such file or directory C:\msys\1.0\bin\make.exe: *** couldn't commit memory for cygwin heap, Win32 erro r 0
What am I doing wrong?
Thank you!
brada4 commentedon Jan 29, 2019
You do everything correctly.
Your perl is broken/incomplete. It would generate makefile.conf that is found missing one step later.
If you have some strawbery or activestate windows perl installed and working - try to make it appear before mingw/cygwin perl in path
brada4 commentedon Jan 29, 2019
The essence of problem is tat perl.exe invoked from make.exe finds different versions of core perl modules because of PERL5LIB vatiable pointing to other perl installation and justly rejects to load those.
thedude2019 commentedon Jan 29, 2019
What is the easiest way to resolve this issue? don't understand what you mean when you say "try to make it appear before mingw/cygwin perl in path".
thedude2019 commentedon Jan 29, 2019
This is my PATH (printed with cmd):
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32 \WindowsPowerShell\v1.0;C:\Program Files\Microsoft Windows Performance Toolkit\ ;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Program Files (x86)\Calibre2;C: \Program Files (x86)\Notepad++;C:\Windows\System32\WindowsPowerShell\v1.0;C:\W indows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporatio n\PhysX\Common;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\mingw-w64 \x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;C:\Windows\System32\WindowsPowerS hell\v1.0;C:\msys\1.0\bin;C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_ v6-rev0\mingw64\bin;C:\msys\1.0\bin
C:\msys\1.0\bin and C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_ v6-rev0\mingw64\bin appear twice...C:\Windows\System32\WindowsPowerShell\v1.0 appears three times...
brada4 commentedon Jan 30, 2019
What is inside PERL5LIB variable?
@martin-frbg what do you think about reverting partially d1c6469#diff-7cf3cca9d0a67dfeb94e7187f4adba11R4 and permitting script to work with typical broken PERL installations?
brada4 commentedon Jan 30, 2019
What was done for sf.net libraries:
make HOSTCC=gcc CC=x86_64-w64-mingw32-gcc FC=x86_64-w64-mingw32-gfortran DYNAMIC_ARCH=1 NUM_THREADS=64Inside Linux virtual machine
Fedora 28/29 or Ubuntu 18.04 will provide these compilers with AVX512 support.
You will need few redist DLLs copied off the building Linux installation
Shortcoming is that DLL will use GOMP provided on that Linux and it will certainly fail to work with very different gcc native to windows.
martin-frbg commentedon Jan 30, 2019
@brada4 reverting that is not so easy now that the temporary file is also needed on x86_64 (AVX512 compatibility test). I will check later if conditional loading is possible (tried it once and did not get it to work, but my perl is a bit rusty), but I suspect File::Basename (used in the cross-compile check) will be equally problematic when PERL5LIB points to a conflicting or incomplete module collection.
brada4 commentedon Jan 30, 2019
@martin-frbg I know it. Though no idea how to detect problem "safely"
thedude2019 commentedon Jan 30, 2019
What is the MSYS command to print the PERL5LIB variable? this is my perl include path:
$ perl -e "print qq(@inc)"
/usr/lib/perl5/5.6.1/msys /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/ms
ys /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl .
Thank you!
thedude2019 commentedon Jan 30, 2019
If I clear the user PATH variable and put C:\msys\1.0\bin before C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_ v6-rev0\mingw64\bin in Path system variable I get the same error...my Path system variable is now:
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\msys\1.0\bin;C:
Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft Windows Perf
ormance Toolkit;C:\Program Files\MiKTeX 2.9\miktex\bin\x64;C:\Program Files (x
86)\Calibre2;C:\Program Files (x86)\Notepad++;C:\Program Files (x86)\NVIDIA Co
rporation\PhysX\Common;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\m
ingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;
martin-frbg commentedon Jan 30, 2019
What does
perl -vreturn - is it 5.6.1 ? (I think we also saw a few cases where PERL5DIR was set correctly for the perl version in the PATH, but the File::Temp module (File/Temp.pm) was not installed).Can you try with the attached version of the c_check script (needs renaming back to c_check without the .txt ending - github will not let me attach it unless it is named .txt)
c_check.txt
thedude2019 commentedon Jan 30, 2019
$ perl -v
This is perl, v5.6.1 built for msys
Copyright 1987-2001, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using
man perl' orperldoc perl'. If you have access to theInternet, point your browser at http://www.perl.com/, the Perl Home Page.
$ c_check
C Compiler () is something wrong.
1 at ./c_check line 29.
Thank you!
martin-frbg commentedon Jan 30, 2019
Sorry, I guess I should have been more verbose - the idea with the c_check file is to replace the c_check file in the OpenBLAS folder with it and retry the build. (c_check is called by one of the Makefiles and expects a number of arguments, including the name of the C compiler, so running it on its own is not really expected to work)
What I did in the new file is try to work around any problems with wrong or unavailable perl modules)
33 remaining items
thedude2019 commentedon Feb 5, 2019
After I renamed openblas_config_template.h to openblas_config.h (it also compiles after renaming config.h to openblas_config.h) it compiles without errors with the files you mentioned. I also had to add cblas_mangling.h to the include folder as mentioned previously.
Which file should I rename to openblas_config.h, openblas_config_template.h or config.h?
Thank you!
martin-frbg commentedon Feb 5, 2019
Normally that would happen in the
installstep. openblas_config.h combines both config.h and openblas_config_template.h (with a version string added and a header guard against double inclusion around it, i.e.martin-frbg commentedon Feb 5, 2019
And the cblas_mangling.h is only required by the (unused) netlib version of cblas.h, not by the OpenBLAS cblas.h so you would not normally need to copy it to the include folder.
thedude2019 commentedon Feb 5, 2019
I made a mistake...I can't compile with the package cblas.h, I can only compile with lapack-netlib cblas.h & cblas_mangling.h...the build does not generate openblas_config.h and if I paste config.h & openblas_config_template.h in one file and rename to openblas_config.h (and compile with package cblas.h) there is still a header error. Attached config.h & openblas_config_template.h build files.
config.txt
openblas_config_template.txt
Thank you!
thedude2019 commentedon Feb 5, 2019
Finished to compare LAPACKE_dsyev_2stage with the three builds:
OpenBLAS is definitely faster...is it crucial to work with the package cblas.h? results with lapack-netlib cblas.h & cblas_mangling.h (without openblas_config.h) are very good.
martin-frbg commentedon Feb 5, 2019
The only relevant difference in the OpenBLAS cblas.h is the addition of the prototypes for the openblas-specific utility functions like openblas_set_num_threads(), if you do not use them your current setup should be sufficient. (Not sure why copying the two files together to create openblas_config.h did not work for you though, perhaps you did not add the OPENBLAS_VERSION line ?)
thedude2019 commentedon Feb 5, 2019
Can you send me the combined openblas_config.h file so I can test? this is what I put in the include folder:
openblas_config.txt
Thank you!
martin-frbg commentedon Feb 5, 2019
Ah, I forgot that the constants from the initial config.h get "OPENBLAS_" prepended when copied to openblas_config.h
openblas_config.txt
thedude2019 commentedon Feb 5, 2019
I get the same error:
In file included from C:...\z1.c:9:
C:...\xianyi-OpenBLAS-eebc189\include/cblas.h:5:10: fatal error: common.h: No such file or directory
#include "common.h"
^~~~~~~~~~
compilation terminated.
martin-frbg commentedon Feb 5, 2019
That should be openblas_config.h instead of common.h in the cblas.h (normally converted in the
make installstep).BTW the f77blas.h is generated from common_interface.h
f77blas.txt
thedude2019 commentedon Feb 5, 2019
Replaced f77blas.h and It gives the same error...
martin-frbg commentedon Feb 5, 2019
Err, the f77blas.h was just mentioned in passing as it is the last of the header files that are normally generated rather than copied.
You need to change the "common.h" in cblas.h to "openblas_config.h" to make the error go away.
thedude2019 commentedon Feb 5, 2019
Compiles without errors with your openblas_config.txt & after changing "common.h" in cblas.h to "openblas_config.h" :)
Thank you both for your help!!!
brada4 commentedon Feb 5, 2019
I've dropped a line in general threading issue so that if there is a measurable improvement reached with _symv it can be verified in this context of deep lapack calls too.