Closed akshay-1993 closed 6 years ago
Did you install mingw and msys from msys2.org as mentioned in the wiki article at https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio ?
Hey i am trying to install openblas but im facing issue cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON CMake Error: The source directory "C:/Python27" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.
please help.
If you want to do it with cmake, create a "build" directory within OpenBLAS and do the cmake ..
etc. from there. (".." is "the folder above your current one", so when you are standing in C:/Python27/OpenBLAS, ".." is C:/Python27 , but when in C:/Python27/OpenBLAS/build it will point to C;/Python27/OpenBLAS and will find the CMakeFile there. This "build folder" stuff is standard procedure with cmake)
Hey thanks for quick reply. and if not with cmake how can we install it with.(Any other option)
As you said creating a build directory within openblas... facing issue with ninja now C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "C:/Python27/OpenBLAS/build/CMakeFiles/CMakeOutput.log".
Did you follow the instructions on the wiki page I linked to above ? It has two sections for building with cmake - the first, using clang/flang compiler, wants you to download ninja and a couple of other packages first. The second one uses cmake with the Visual Studio compiler, without ninja (but gives a somewhat slower library, as the microsoft compiler does not use the inline assembly in optimized functions). If all else fails, you can try a precompiled library - older ones are at https://sourceforge.net/projects/openblas/files , a current one is attached to one of my comments in #1437
yes i did went through those steps. You can see the following:
C:\Python27\OpenBLAS>conda install -y cmake flang clangdev Fetching package metadata ............... Solving package specifications: .
# clangdev 5.0.0 flang_3 [vc14 flang] conda-forge cmake 3.10.0 4 conda-forge flang 5.0.0 vc14_20180208 [vc14] conda-forge
C:\Python27\OpenBLAS>conda install -y -c isuruf kitware-ninja Fetching package metadata ................. Solving package specifications: .
# kitware-ninja 1.7.2.gaad58.kitware.dyndep.1 0 isuruf
C:\Python27\OpenBLAS>set "LIB=%CONDA_INSTALL_LOCN%\Library\lib;%LIB%"
C:\Python27\OpenBLAS>set "CPATH=%CONDA_INSTALL_LOCN%\Library\include;%CPATH%
C:\Python27\OpenBLAS>mkdir build A subdirectory or file build already exists.
C:\Python27\OpenBLAS>cd build
C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred! See also "C:/Python27/OpenBLAS/build/CMakeFiles/CMakeOutput.log".
After all this it is still giving me the same error.
@xoviat, @isuruf any idea why your build instructions do not work here ?
It seems Ninja program is not found. Did you activate the conda env by running activate
on the command line?
No i didn't do that.
When should i run activate
on cmd.
Before running cmake. After that clean the repo(git clean -dfx
) and run cmake
facing cmake error now (root) C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -- The C compiler identification is Clang 5.0.0 -- The ASM compiler identification is Clang -- Found assembler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- Check for working C compiler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- Check for working C compiler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- broken CMake Error at C:/Program Files/Anaconda2/Library/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler
"C:/Program Files/Anaconda2/Library/bin/clang-cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_0cd86"
[1/2] Building C object CMakeFiles\cmTC_0cd86.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_0cd86.exe
FAILED: cmTC_0cd86.exe
cmd.exe /C "cd . && "C:\Program Files\Anaconda2\Library\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_0cd86.dir --manifests -- C:\PROGRA~1\ANACON~1\Library\usr\bin\link.exe /nologo CMakeFiles\cmTC_0cd86.dir\testCCompiler.c.obj /out:cmTC_0cd86.exe /implib:cmTC_0cd86.lib /pdb:cmTC_0cd86.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~1\ANACON~1\Library\usr\bin\link.exe /nologo CMakeFiles\cmTC_0cd86.dir\testCCompiler.c.obj /out:cmTC_0cd86.exe /implib:cmTC_0cd86.lib /pdb:cmTC_0cd86.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_0cd86.dir/intermediate.manifest CMakeFiles\cmTC_0cd86.dir/manifest.res" failed (exit code 1) with the following output:
/usr/bin/link: extra operand '/out:cmTC_0cd86.exe'
Try '/usr/bin/link --help' for more information.
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred! See also "C:/Python27/OpenBLAS/build/CMakeFiles/CMakeOutput.log". See also "C:/Python27/OpenBLAS/build/CMakeFiles/CMakeError.log".
Looks like it is finding the wrong version of link.exe now, where did /usr/bin/link.exe come from ?
After restarting and running those steps again i found following error after the cmake cmd
`(root) C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -- The C compiler identification is Clang 5.0.0 -- The ASM compiler identification is Clang -- Found assembler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- Check for working C compiler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- Check for working C compiler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- broken CMake Error at C:/Program Files/Anaconda2/Library/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 (message): The C compiler
"C:/Program Files/Anaconda2/Library/bin/clang-cl.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_f902b"
[1/2] Building C object CMakeFiles\cmTC_f902b.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_f902b.exe
FAILED: cmTC_f902b.exe
cmd.exe /C "cd . && "C:\Program Files\Anaconda2\Library\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_f902b.dir --manifests -- C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\link.exe /nologo CMakeFiles\cmTC_f902b.dir\testCCompiler.c.obj /out:cmTC_f902b.exe /implib:cmTC_f902b.lib /pdb:cmTC_f902b.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\link.exe /nologo CMakeFiles\cmTC_f902b.dir\testCCompiler.c.obj /out:cmTC_f902b.exe /implib:cmTC_f902b.lib /pdb:cmTC_f902b.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_f902b.dir/intermediate.manifest CMakeFiles\cmTC_f902b.dir/manifest.res" failed (exit code 1120) with the following output:
LINK : error LNK2001: unresolved external symbol mainCRTStartup
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\kernel32.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\user32.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\gdi32.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\winspool.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\shell32.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\ole32.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\oleaut32.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\uuid.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\comdlg32.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86\advapi32.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\msvcrtd.lib : warning LNK4272: library machine type 'X86' conflicts with target machine type 'x64'
cmTC_f902b.exe : fatal error LNK1120: 1 unresolved externals
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:6 (project)
-- Configuring incomplete, errors occurred! See also "C:/Python27/OpenBLAS/build/CMakeFiles/CMakeOutput.log". See also "C:/Python27/OpenBLAS/build/CMakeFiles/CMakeError.log".`
Looks like it found the correct link.exe now, but the dlls from visual studio and the windows sdk it sees are all 32bit. (But I am not a windows guy)
So what can be done to solve this?
Do you have a full installation of Visual Studio, both 32 and 64 bit ? (x86 and amd64 I believe they call it)
I do have 32bit as well. Should i try with it?
From https://cmake.org/pipermail/cmake/2016-March/062983.html it may be necessary to
- Opened a command prompt and run "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64
(that would be 14.0 in your case obviously)
Now facing this issue
(root) C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -- The C compiler identification is Clang 5.0.0 -- The ASM compiler identification is Clang -- Found assembler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- Check for working C compiler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- Check for working C compiler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done CMake Warning at CMakeLists.txt:37 (message): CMake support is experimental. This will not produce the same Makefiles that OpenBLAS ships with. Only x86 support is currently available.
-- GEMM multithread threshold set to 4. -- Multi-threading enabled with 4 threads. -- The Fortran compiler identification is Flang 99.99.1 -- Check for working Fortran compiler: C:/Program Files/Anaconda2/Library/bin/flang.exe -- Check for working Fortran compiler: C:/Program Files/Anaconda2/Library/bin/flang.exe -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Checking whether C:/Program Files/Anaconda2/Library/bin/flang.exe supports Fortran 90 -- Checking whether C:/Program Files/Anaconda2/Library/bin/flang.exe supports Fortran 90 -- yes CMake Warning (dev) at cmake/prebuild.cmake:175 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): cmake/system.cmake:118 (include) CMakeLists.txt:40 (include) This warning is for project developers. Use -Wno-dev to suppress it.
-- Running getarch -- GETARCH results:
CMake Error at cmake/prebuild.cmake:214 (ParseGetArchVars): ParseGetArchVars Function invoked with incorrect arguments for function named: ParseGetArchVars Call Stack (most recent call first): cmake/system.cmake:118 (include) CMakeLists.txt:40 (include)
CMake Error at cmake/prebuild.cmake:229 (MESSAGE): Compiling getarch_2nd failed Change Dir: C:/Python27/OpenBLAS/build/getarch2_build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_e7e06"
[1/2] Building C object CMakeFiles\cmTC_e7e06.dir\getarch_2nd.c.obj
FAILED: CMakeFiles/cmTC_e7e06.dir/getarch_2nd.c.obj
C:\PROGRA~1\ANACON~1\Library\bin\clang-cl.exe /nologo -DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_PARALLEL_MAKE=0 /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 /MDd /Zi /Ob0 /Od /RTC1 -IC:/Python27/OpenBLAS/build/getarch2_build -I"C:/Python27/OpenBLAS" -I"C:/Python27/OpenBLAS/build" /showIncludes /FoCMakeFiles\cmTC_e7e06.dir\getarch_2nd.c.obj /FdCMakeFiles\cmTC_e7e06.dir\ -c C:\Python27\OpenBLAS\getarch_2nd.c
C:\Python27\OpenBLAS\getarch_2nd.c(12,35): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_M'
printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(13,35): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(14,35): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_M'
printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(15,35): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(19,35): error: use of undeclared identifier 'CGEMM_DEFAULT_UNROLL_M'
printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(20,35): error: use of undeclared identifier 'CGEMM_DEFAULT_UNROLL_N'
printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(21,35): error: use of undeclared identifier 'ZGEMM_DEFAULT_UNROLL_M'
printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(22,35): error: use of undeclared identifier 'ZGEMM_DEFAULT_UNROLL_N'
printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(29,37): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_M'
printf("CGEMM3M_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(35,37): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("CGEMM3M_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(41,37): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_M'
printf("ZGEMM3M_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(47,37): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("ZGEMM3M_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(69,50): error: use of undeclared identifier 'SGEMM_DEFAULT_Q'
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 * sizeof(float)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(69,68): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 * sizeof(float)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(70,50): error: use of undeclared identifier 'DGEMM_DEFAULT_Q'
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 * sizeof(double)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(70,68): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 * sizeof(double)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(71,50): error: use of undeclared identifier 'CGEMM_DEFAULT_Q'
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 * sizeof(float)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(71,68): error: use of undeclared identifier 'CGEMM_DEFAULT_UNROLL_N'
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 * sizeof(float)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(72,50): error: use of undeclared identifier 'ZGEMM_DEFAULT_Q'
printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNROLL_N * 2 * 2 * sizeof(double)));
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.
Call Stack (most recent call first): cmake/system.cmake:118 (include) CMakeLists.txt:40 (include)
-- Configuring incomplete, errors occurred! See also "C:/Python27/OpenBLAS/build/CMakeFiles/CMakeOutput.log".
(root) C:\Python27\OpenBLAS\build>
Now at least that is an error from the actual OpenBLAS build files. It could be that the "getarch" helper program failed to identify your cpu, what processor does this computer have ?
Processor: Intel i3 OS: Windows 10
What generation i3 (or full model number like i3-6100) ? If it is anything recent, you could try adding -DTARGET=HASWELL to the cmake command line.
Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz 3.30 GHz
Make it -DTARGET=SANDYBRIDGE then. (That type is old enough that it should be autodetected, but maybe that particular model id never came up)
Came up with this
(root) C:\Python27\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DTARGET=SANDYBRIDGE CMake Warning at CMakeLists.txt:37 (message): CMake support is experimental. This will not produce the same Makefiles that OpenBLAS ships with. Only x86 support is currently available.
-- Targeting the SANDYBRIDGE architecture. -- GEMM multithread threshold set to 4. -- Multi-threading enabled with 4 threads. CMake Warning (dev) at cmake/prebuild.cmake:175 (if): Policy CMP0054 is not set: Only interpret if() arguments as variables or keywords when unquoted. Run "cmake --help-policy CMP0054" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy is set to NEW. Since the policy is not set the OLD behavior will be used. Call Stack (most recent call first): cmake/system.cmake:118 (include) CMakeLists.txt:40 (include) This warning is for project developers. Use -Wno-dev to suppress it.
-- Running getarch -- GETARCH results:
CMake Error at cmake/prebuild.cmake:214 (ParseGetArchVars): ParseGetArchVars Function invoked with incorrect arguments for function named: ParseGetArchVars Call Stack (most recent call first): cmake/system.cmake:118 (include) CMakeLists.txt:40 (include)
CMake Error at cmake/prebuild.cmake:229 (MESSAGE): Compiling getarch_2nd failed Change Dir: C:/Python27/OpenBLAS/build/getarch2_build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_1234c"
[1/2] Building C object CMakeFiles\cmTC_1234c.dir\getarch_2nd.c.obj
FAILED: CMakeFiles/cmTC_1234c.dir/getarch_2nd.c.obj
C:\PROGRA~1\ANACON~1\Library\bin\clang-cl.exe /nologo -DFORCE_SANDYBRIDGE -DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_PARALLEL_MAKE=0 /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 /MDd /Zi /Ob0 /Od /RTC1 -IC:/Python27/OpenBLAS/build/getarch2_build -I"C:/Python27/OpenBLAS" -I"C:/Python27/OpenBLAS/build" /showIncludes /FoCMakeFiles\cmTC_1234c.dir\getarch_2nd.c.obj /FdCMakeFiles\cmTC_1234c.dir\ -c C:\Python27\OpenBLAS\getarch_2nd.c
C:\Python27\OpenBLAS\getarch_2nd.c(12,35): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_M'
printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(13,35): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(14,35): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_M'
printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(15,35): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(19,35): error: use of undeclared identifier 'CGEMM_DEFAULT_UNROLL_M'
printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(20,35): error: use of undeclared identifier 'CGEMM_DEFAULT_UNROLL_N'
printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(21,35): error: use of undeclared identifier 'ZGEMM_DEFAULT_UNROLL_M'
printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(22,35): error: use of undeclared identifier 'ZGEMM_DEFAULT_UNROLL_N'
printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(29,37): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_M'
printf("CGEMM3M_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(35,37): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("CGEMM3M_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(41,37): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_M'
printf("ZGEMM3M_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
C:\Python27\OpenBLAS\getarch_2nd.c(47,37): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("ZGEMM3M_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
C:\Python27\OpenBLAS\getarch_2nd.c(69,50): error: use of undeclared identifier 'SGEMM_DEFAULT_Q'
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 * sizeof(float)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(69,68): error: use of undeclared identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 * sizeof(float)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(70,50): error: use of undeclared identifier 'DGEMM_DEFAULT_Q'
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 * sizeof(double)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(70,68): error: use of undeclared identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 * sizeof(double)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(71,50): error: use of undeclared identifier 'CGEMM_DEFAULT_Q'
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 * sizeof(float)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(71,68): error: use of undeclared identifier 'CGEMM_DEFAULT_UNROLL_N'
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 * sizeof(float)));
^
C:\Python27\OpenBLAS\getarch_2nd.c(72,50): error: use of undeclared identifier 'ZGEMM_DEFAULT_Q'
printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNROLL_N * 2 * 2 * sizeof(double)));
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.
Call Stack (most recent call first): cmake/system.cmake:118 (include) CMakeLists.txt:40 (include)
-- Configuring incomplete, errors occurred! See also "C:/Python27/OpenBLAS/build/CMakeFiles/CMakeOutput.log".
This is weird. Can you do a "make clean", or start from a new build directory please ?
Ok will do that
Facing same issue
I want to ask one thing here, Am i missing any prerequisite installation?
Not sure. It looks complete to me now, but somehow the "getarch" program used to determine cpu type is not run, or does not produce any output even if we tell it the correct type. As this is what sets up SGEMM_DEFAULT_UNROLL_M etc. for everything that gets compiled later, things stop there. Is there any additional information in the CMakeOutputLog that tells what happens with getarch (maybe it is not finding a dll at startup) ?
I think i am facing issue because of fortran compiler
The system is: Windows - 10.0.15063 - AMD64 Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. Compiler: C:/Program Files/Anaconda2/Library/bin/clang-cl.exe Build flags: Id flags:
The output was: 0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.exe"
The C compiler identification is Clang, found in "C:/Python27/OpenBLAS/build/CMakeFiles/3.10.0/CompilerIdC/CMakeCCompilerId.exe"
Determining if the C compiler works passed with the following output: Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_0a6bd" [1/2] Building C object CMakeFiles\cmTC_0a6bd.dir\testCCompiler.c.obj
[2/2] Linking C executable cmTC_0a6bd.exe
Detecting C compiler ABI info compiled with the following output: Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_5b0df" [1/2] Building C object CMakeFiles\cmTC_5b0df.dir\CMakeCCompilerABI.c.obj
[2/2] Linking C executable cmTC_5b0df.exe
Detecting C [] compiler features compiled with the following output: Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_9ca91" [1/2] Building C object CMakeFiles\cmTC_9ca91.dir\feature_tests.c.obj
[2/2] Linking C executable cmTC_9ca91.exe
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:1c_static_assert
Feature record: C_FEATURE:1c_variadic_macros
Detecting C [] compiler features compiled with the following output: Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_0d376" [1/2] Building C object CMakeFiles\cmTC_0d376.dir\feature_tests.c.obj
[2/2] Linking C executable cmTC_0d376.exe
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:1c_static_assert
Feature record: C_FEATURE:1c_variadic_macros
Detecting C [] compiler features compiled with the following output: Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_d9c32" [1/2] Building C object CMakeFiles\cmTC_d9c32.dir\feature_tests.c.obj
[2/2] Linking C executable cmTC_d9c32.exe
Feature record: C_FEATURE:1c_function_prototypes
Feature record: C_FEATURE:1c_restrict
Feature record: C_FEATURE:1c_static_assert
Feature record: C_FEATURE:1c_variadic_macros
Compiling the Fortran compiler identification source file "CMakeFortranCompilerId.F" succeeded. Compiler: C:/Program Files/Anaconda2/Library/bin/flang.exe Build flags: Id flags: -v
The output was: 0 clang version 5.0.0 Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Program Files\Anaconda2\Library\bin "C:\Program Files\Anaconda2\Library\bin\flang1" CMakeFortranCompilerId.F -opt 0 -terse 1 -inform warn -nohpf -nostatic -y 129 2 -inform warn -x 19 0x400000 -quad -x 59 4 -x 15 2 -x 49 0x400004 -x 51 0x20 -x 57 0x4c -x 58 0x10000 -x 124 0x1000 -tp px -x 57 0xfb0000 -x 58 0x78031040 -x 47 0x08 -x 48 4608 -x 49 0x100 -def LONG_MAX=2147483647L -def SIZE_TYPE=unsigned long long int -def PTRDIFF_TYPE=long long int -def _WIN32 -def WIN32 -def _WIN64 -def WIN64 -def _MSC_VER=1900 -def NO_MATH_INLINES -def __x86_64 -def x86_64 -def THROW= -def extension= -def __amd_64amd64 -def k8 -def k8 -def PGLLVM__ -preprocess -nofreeform -idir "%CONDA_INSTALL_LOCN%\Library\include" -idir "%CONDA_INSTALL_LOCN%\Library\include" -idir . -idir "C:\Program Files\Anaconda2\Library\include" -idir "C:\Program Files\Anaconda2\Library\include" -idir "C:\Program Files\Anaconda2\Library\include" -idir "C:\Program Files\Anaconda2\Library\include" -vect 48 -y 54 1 -x 70 0x40000000 -y 163 0xc0000000 -x 189 0x10 -stbfile CMakeFortranCompilerId-08a1fe.stb -modexport CMakeFortranCompilerId-08a1fe.cmod -modindex CMakeFortranCompilerId-08a1fe.cmdx -output CMakeFortranCompilerId-08a1fe.ilm "C:\Program Files\Anaconda2\Library\bin\flang2" CMakeFortranCompilerId-08a1fe.ilm -x 6 0x100 -x 42 0x400000 -y 129 4 -x 129 0x400 -y 129 2 -ieee 1 -fn CMakeFortranCompilerId.F -opt 0 -terse 1 -inform warn -y 129 2 -inform warn -x 51 0x20 -x 119 0xa10000 -x 122 0x40 -x 123 0x1000 -x 127 4 -x 127 17 -x 19 0x400000 -x 28 0x40000 -x 120 0x10000000 -x 70 0x8000 -x 122 1 -x 125 0x20000 -quad -x 59 4 -tp px -x 120 0x1000 -x 124 0x1400 -y 15 2 -x 57 0x3b0000 -x 58 0x48000000 -x 49 0x100 -astype 0 -x 183 4 -x 121 0x800 -x 54 0x10 -x 70 0x40000000 -x 249 50 -x 124 1 -y 163 0xc0000000 -x 189 0x10 -y 189 0x4000000 -x 183 0x10 -stbfile CMakeFortranCompilerId-08a1fe.stb -asm "C:\Users\AkshayC\AppData\Local\Temp\CMakeFortranCompilerId-08a1fe.ll" -target x86_64-pc-windows-msvc19.0.24210 -linker /defaultlib:msvcrt -linker /defaultlib:flangmain -linker /subsystem:console -linker /defaultlib:flang -linker /defaultlib:flangrti -linker /defaultlib:ompstub -linker /subsystem:console -linker /defaultlib:flangmain "C:\Program Files\Anaconda2\Library\bin\flang.exe" -cc1 -triple x86_64-pc-windows-msvc19.0.24210 -emit-obj -mrelax-all -mincremental-linker-compatible -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeFortranCompilerId.F -mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -dwarf-column-info -debugger-tuning=gdb -resource-dir "C:\Program Files\Anaconda2\Library\lib\clang\5.0.0" -fdebug-compilation-dir "C:\Python27\OpenBLAS\build\CMakeFiles\3.10.0\CompilerIdFortran" -ferror-limit 19 -fmessage-length 0 -fms-extensions -fms-compatibility -fms-compatibility-version=19.0.24210 -fdelayed-template-parsing -fobjc-runtime=gcc -fdiagnostics-show-option -o "C:\Users\AkshayC\AppData\Local\Temp\CMakeFortranCompilerId-8f7d05.o" -x ir "C:\Users\AkshayC\AppData\Local\Temp\CMakeFortranCompilerId-08a1fe.ll" clang -cc1 version 5.0.0 based upon LLVM 5.0.0 default target x86_64-pc-windows-msvc "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\link.exe" -out:a.exe -defaultlib:msvcrt -nologo /defaultlib:msvcrt "-libpath:C:\Program Files\Anaconda2\Library\bin/../lib" /defaultlib:flangmain /subsystem:console /defaultlib:flang /defaultlib:flangrti /defaultlib:ompstub "C:\Users\AkshayC\AppData\Local\Temp\CMakeFortranCompilerId-8f7d05.o"
Compilation of the Fortran compiler identification source "CMakeFortranCompilerId.F" produced "a.exe"
The Fortran compiler identification is Flang, found in "C:/Python27/OpenBLAS/build/CMakeFiles/3.10.0/CompilerIdFortran/a.exe"
Determining if the Fortran compiler works passed with the following output: Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_3f2ef" [1/4] Building Fortran preprocessed CMakeFiles\cmTC_3f2ef.dir\testFortranCompiler.f-pp.f
[2/4] Generating Fortran dyndep file CMakeFiles\cmTC_3f2ef.dir\Fortran.dd
[3/4] Building Fortran object CMakeFiles\cmTC_3f2ef.dir\testFortranCompiler.f.obj
[4/4] Linking Fortran executable cmTC_3f2ef.exe
Detecting Fortran compiler ABI info compiled with the following output: Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_52e88" [1/4] Building Fortran preprocessed CMakeFiles\cmTC_52e88.dir\CMakeFortranCompilerABI.F-pp.f
[2/4] Generating Fortran dyndep file CMakeFiles\cmTC_52e88.dir\Fortran.dd
[3/4] Building Fortran object CMakeFiles\cmTC_52e88.dir\CMakeFortranCompilerABI.F.obj
[4/4] Linking Fortran executable cmTC_52e88.exe
Determining if the Fortran compiler supports Fortran 90 passed with the following output: Change Dir: C:/Python27/OpenBLAS/build/CMakeFiles/CMakeTmp
Run Build Command:"C:/PROGRA~1/ANACON~1/Library/bin/ninja.exe" "cmTC_7e92d" [1/4] Building Fortran preprocessed CMakeFiles\cmTC_7e92d.dir\testFortranCompilerF90.f90-pp.f90
[2/4] Generating Fortran dyndep file CMakeFiles\cmTC_7e92d.dir\Fortran.dd
[3/4] Building Fortran object CMakeFiles\cmTC_7e92d.dir\testFortranCompilerF90.f90.obj
[4/4] Linking Fortran executable cmTC_7e92d.exe
That looks good to me, just generating lots of output as it reports all the default options used. Fortran is not used for getarch anyway, it is "only" needed for building the LAPACK part of OpenBLAS. Is that all there is in the log file ?
yes
Do you see a getarch.exe in the build directory ? If so, what happens when you try to run it as "getarch.exe 0", which is what the cmake script tries to do ?
From a quick google search, this seems to be a problem with your installation of visual studio. The suggested action is to go to its setup/modify panel and (re)install the "Common tools for Visual C++" component.
Did you manage to fix this ?
Not yet Same issue, even after reinstalling.
On Feb 24, 2018 3:04 AM, "Martin Kroeker" notifications@github.com wrote:
Did you manage to fix this ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xianyi/OpenBLAS/issues/1459#issuecomment-368144872, or mute the thread https://github.com/notifications/unsubscribe-auth/Aeky-TkwmTCPv-dRnoUJsMWVrPrsjvuMks5tXy7fgaJpZM4SDRxx .
@akshay-1993 Can you try with adding -DCMAKE_BUILD_TYPE=Release
to the command line?
I have kinda similar issue here.
I'm trying to build current develop branch (2c7392f07bb8023adbc7b85c049d16607ade77e1) following instructions from here: https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio#1-native-msvc-abi
(base) d:\magras\src\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=cla
ng-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT
_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release
CMake Warning at CMakeLists.txt:37 (message):
CMake support is experimental. This will not produce the same Makefiles
that OpenBLAS ships with. Only x86 support is currently available.
-- GEMM multithread threshold set to 4.
-- Multi-threading enabled with 4 threads.
-- The Fortran compiler identification is Flang 99.99.1
-- Check for working Fortran compiler: D:/prog/Miniconda3/Library/bin/flang.exe
-- Check for working Fortran compiler: D:/prog/Miniconda3/Library/bin/flang.exe
-- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether D:/prog/Miniconda3/Library/bin/flang.exe supports Fortran 90
-- Checking whether D:/prog/Miniconda3/Library/bin/flang.exe supports Fortran 90
-- yes
CMake Warning (dev) at cmake/prebuild.cmake:175 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
cmake/system.cmake:118 (include)
CMakeLists.txt:40 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Running getarch
-- GETARCH results:
CORE=SANDYBRIDGE
LIBCORE=sandybridge
NUM_CORES=4
HAVE_MMX=1
HAVE_SSE=1
HAVE_SSE2=1
HAVE_SSE3=1
HAVE_SSSE3=1
HAVE_SSE4_1=1
HAVE_SSE4_2=1
HAVE_AVX=1
CMake Error at cmake/prebuild.cmake:229 (MESSAGE):
Compiling getarch_2nd failed Change Dir:
D:/magras/src/OpenBLAS/build/getarch2_build/CMakeFiles/CMakeTmp
Run Build Command:"D:/prog/Miniconda3/Library/bin/ninja.exe" "cmTC_d2dea"
[1/2] Building C object CMakeFiles\cmTC_d2dea.dir\getarch_2nd.c.obj
FAILED: CMakeFiles/cmTC_d2dea.dir/getarch_2nd.c.obj
D:\prog\Miniconda3\Library\bin\clang-cl.exe /nologo
-DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_PARALLEL_MAKE=0 /DWIN32 /D_WINDOWS /W3
/MDd /Zi /Ob0 /Od /RTC1 -ID:/magras/src/OpenBLAS/build/getarch2_build
-I"D:/magras/src/OpenBLAS" -I"D:/magras/src/OpenBLAS/build" /showIncludes
/FoCMakeFiles\cmTC_d2dea.dir\getarch_2nd.c.obj
/FdCMakeFiles\cmTC_d2dea.dir\ -c D:\magras\src\OpenBLAS\getarch_2nd.c
D:\magras\src\OpenBLAS\getarch_2nd.c(12,35): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_M'
printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(13,35): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(14,35): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_M'
printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(15,35): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(19,35): error: use of undeclared
identifier 'CGEMM_DEFAULT_UNROLL_M'
printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(20,35): error: use of undeclared
identifier 'CGEMM_DEFAULT_UNROLL_N'
printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(21,35): error: use of undeclared
identifier 'ZGEMM_DEFAULT_UNROLL_M'
printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(22,35): error: use of undeclared
identifier 'ZGEMM_DEFAULT_UNROLL_N'
printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(29,37): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_M'
printf("CGEMM3M_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(35,37): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("CGEMM3M_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(41,37): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_M'
printf("ZGEMM3M_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(47,37): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("ZGEMM3M_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(69,50): error: use of undeclared
identifier 'SGEMM_DEFAULT_Q'
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAU
LT_UNROLL_N * 4 * 1 * sizeof(float)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(69,68): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAU
LT_UNROLL_N * 4 * 1 * sizeof(float)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(70,50): error: use of undeclared
identifier 'DGEMM_DEFAULT_Q'
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAU
LT_UNROLL_N * 2 * 1 * sizeof(double)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(70,68): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAU
LT_UNROLL_N * 2 * 1 * sizeof(double)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(71,50): error: use of undeclared
identifier 'CGEMM_DEFAULT_Q'
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAU
LT_UNROLL_N * 4 * 2 * sizeof(float)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(71,68): error: use of undeclared
identifier 'CGEMM_DEFAULT_UNROLL_N'
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAU
LT_UNROLL_N * 4 * 2 * sizeof(float)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(72,50): error: use of undeclared
identifier 'ZGEMM_DEFAULT_Q'
printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAU
LT_UNROLL_N * 2 * 2 * sizeof(double)));
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.
Call Stack (most recent call first):
cmake/system.cmake:118 (include)
CMakeLists.txt:40 (include)
-- Configuring incomplete, errors occurred!
See also "D:/magras/src/OpenBLAS/build/CMakeFiles/CMakeOutput.log".
(base) d:\magras\src\OpenBLAS\build>getarch 0
CORE=SANDYBRIDGE
LIBCORE=sandybridge
NUM_CORES=4
HAVE_MMX=1
HAVE_SSE=1
HAVE_SSE2=1
HAVE_SSE3=1
HAVE_SSSE3=1
HAVE_SSE4_1=1
HAVE_SSE4_2=1
HAVE_AVX=1
(base) d:\magras\src\OpenBLAS\build>
getarch 0
says that I have sandy bridge, but actually it is ivy bridge (Intel Core i5 3470). Number of cores and instruction sets are detected correctly.
This build was with -DCMAKE_BUILD_TYPE=Release
as you asked.
I'm using win7 64 if it does matter.
One thing that confuses me is that cmake contains:
message(WARNING "CMake support is experimental. This will not produce the same Makefiles that OpenBLAS ships with. Only x86 support is currently available.")
But I need x64 build and instructions (link above) talking about vcvarsall x64
, so i'm doing exactly that. Is it a reason?
Can you add cmake -DCMAKE_TRY_COMPILE_CONFIGURATION=Release .
and try again?
@isuruf I'm not sure that I understood you right. I cleaned build dir and added -DCMAKE_TRY_COMPILE_CONFIGURATION=Release
to the end of cmake command. Result is the same:
(base) d:\magras\src\OpenBLAS\build>cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=cla
ng-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT
_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TR
Y_COMPILE_CONFIGURATION=Release
-- The C compiler identification is Clang 5.0.0
-- The ASM compiler identification is Clang
-- Found assembler: D:/prog/Miniconda3/Library/bin/clang-cl.exe
-- Check for working C compiler: D:/prog/Miniconda3/Library/bin/clang-cl.exe
-- Check for working C compiler: D:/prog/Miniconda3/Library/bin/clang-cl.exe --
works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at CMakeLists.txt:37 (message):
CMake support is experimental. This will not produce the same Makefiles
that OpenBLAS ships with. Only x86 support is currently available.
-- GEMM multithread threshold set to 4.
-- Multi-threading enabled with 4 threads.
-- The Fortran compiler identification is Flang 99.99.1
-- Check for working Fortran compiler: D:/prog/Miniconda3/Library/bin/flang.exe
-- Check for working Fortran compiler: D:/prog/Miniconda3/Library/bin/flang.exe
-- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether D:/prog/Miniconda3/Library/bin/flang.exe supports Fortran 90
-- Checking whether D:/prog/Miniconda3/Library/bin/flang.exe supports Fortran 90
-- yes
CMake Warning (dev) at cmake/prebuild.cmake:175 (if):
Policy CMP0054 is not set: Only interpret if() arguments as variables or
keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Quoted variables like "MSVC" will no longer be dereferenced when the policy
is set to NEW. Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
cmake/system.cmake:118 (include)
CMakeLists.txt:40 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Running getarch
-- GETARCH results:
CORE=SANDYBRIDGE
LIBCORE=sandybridge
NUM_CORES=4
HAVE_MMX=1
HAVE_SSE=1
HAVE_SSE2=1
HAVE_SSE3=1
HAVE_SSSE3=1
HAVE_SSE4_1=1
HAVE_SSE4_2=1
HAVE_AVX=1
CMake Error at cmake/prebuild.cmake:229 (MESSAGE):
Compiling getarch_2nd failed Change Dir:
D:/magras/src/OpenBLAS/build/getarch2_build/CMakeFiles/CMakeTmp
Run Build Command:"D:/prog/Miniconda3/Library/bin/ninja.exe" "cmTC_ce313"
[1/2] Building C object CMakeFiles\cmTC_ce313.dir\getarch_2nd.c.obj
FAILED: CMakeFiles/cmTC_ce313.dir/getarch_2nd.c.obj
D:\prog\Miniconda3\Library\bin\clang-cl.exe /nologo
-DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_PARALLEL_MAKE=0 /DWIN32 /D_WINDOWS /W3
/MD /O2 /Ob2 /DNDEBUG -ID:/magras/src/OpenBLAS/build/getarch2_build
-I"D:/magras/src/OpenBLAS" -I"D:/magras/src/OpenBLAS/build" /showIncludes
/FoCMakeFiles\cmTC_ce313.dir\getarch_2nd.c.obj
/FdCMakeFiles\cmTC_ce313.dir\ -c D:\magras\src\OpenBLAS\getarch_2nd.c
D:\magras\src\OpenBLAS\getarch_2nd.c(12,35): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_M'
printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(13,35): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(14,35): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_M'
printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(15,35): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(19,35): error: use of undeclared
identifier 'CGEMM_DEFAULT_UNROLL_M'
printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(20,35): error: use of undeclared
identifier 'CGEMM_DEFAULT_UNROLL_N'
printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(21,35): error: use of undeclared
identifier 'ZGEMM_DEFAULT_UNROLL_M'
printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(22,35): error: use of undeclared
identifier 'ZGEMM_DEFAULT_UNROLL_N'
printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(29,37): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_M'
printf("CGEMM3M_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(35,37): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("CGEMM3M_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(41,37): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_M'
printf("ZGEMM3M_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(47,37): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("ZGEMM3M_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
^
D:\magras\src\OpenBLAS\getarch_2nd.c(69,50): error: use of undeclared
identifier 'SGEMM_DEFAULT_Q'
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAU
LT_UNROLL_N * 4 * 1 * sizeof(float)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(69,68): error: use of undeclared
identifier 'SGEMM_DEFAULT_UNROLL_N'
printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAU
LT_UNROLL_N * 4 * 1 * sizeof(float)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(70,50): error: use of undeclared
identifier 'DGEMM_DEFAULT_Q'
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAU
LT_UNROLL_N * 2 * 1 * sizeof(double)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(70,68): error: use of undeclared
identifier 'DGEMM_DEFAULT_UNROLL_N'
printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAU
LT_UNROLL_N * 2 * 1 * sizeof(double)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(71,50): error: use of undeclared
identifier 'CGEMM_DEFAULT_Q'
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAU
LT_UNROLL_N * 4 * 2 * sizeof(float)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(71,68): error: use of undeclared
identifier 'CGEMM_DEFAULT_UNROLL_N'
printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAU
LT_UNROLL_N * 4 * 2 * sizeof(float)));
^
D:\magras\src\OpenBLAS\getarch_2nd.c(72,50): error: use of undeclared
identifier 'ZGEMM_DEFAULT_Q'
printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAU
LT_UNROLL_N * 2 * 2 * sizeof(double)));
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
ninja: build stopped: subcommand failed.
Call Stack (most recent call first):
cmake/system.cmake:118 (include)
CMakeLists.txt:40 (include)
-- Configuring incomplete, errors occurred!
See also "D:/magras/src/OpenBLAS/build/CMakeFiles/CMakeOutput.log".
(base) d:\magras\src\OpenBLAS\build>
Do you have a file "config.h" in your build folder ? (This should be generated from the getarch output and should have a "#define SANDYBRIDGE" in your case, based on which the appropriate set of SGEMMDEFAULT... values should be selected from param.h)
@martin-frbg
D:\magras\src\OpenBLAS\build>find . -name "config.h*"
./config.h.tmp
./getarch2_build/config.h
./getarch_build/config.h
./config.h.tmp
and ./getarch2_build/config.h
define SANDYBRIDGE.
./getarch_build/config.h
does not:
#define OS_WINNT 1
#define ARCH_X86_64 1
#define C_Clang 1
#define __64BIT__ 1
#define FUNDERSCORE
#define BUNDERSCORE _
#define NEEDBUNDERSCORE 1
#define NEED2UNDERSCORES 0
Notice .tmp
suffix of config.h.tmp
in root of build dir. So technically, I have no config.h
in build folder at all.
Looks like problem lies in config.h
in root of source dir. It is included instead of build/getarch2_build/config.h
.
I'm not sure how to fix it properly, but for now I just renamed config.h
in root dir and compilation started successfully.
There should be no config.h
in root dir. Also -ID:/magras/src/OpenBLAS/build/getarch2_build -I"D:/magras/src/OpenBLAS" -I"D:/magras/src/OpenBLAS/build"
means getarch2_build
should be given priority.
Sorry, for some reason I was sure that it is tracked by git. May be it was just my mistake. I'll investigate how config.h appeared in root dir in a few days (Sunday probably).
I thought the same about include dir order, but removing this file solved problem.
I greatly appreciate your help with this issue.
I'm sorry for troubling you. Looks like it was my mistake indeed.
So you got it working ? Can you tell if the '-DCMAKE_TRY_COMPILE_CONFIGURATION=Release' is actually necessary (and should be added to the wiki) ?
@martin-frbg Yes, it's working now. -DCMAKE_TRY_COMPILE_CONFIGURATION=Release
wasn't necessary for me. The only thing that wasn't mentioned in instruction is perl requirement, but I already added it to the wiki.
C:\Python27\OpenBLAS>make install process_begin: CreateProcess(NULL, uname -s, ...) failed. process_begin: CreateProcess(NULL, gcc -DGEMM_MULTITHREAD_THRESHOLD=4 -DNO_PARALLEL_MAKE=0 -o getarch getarch.c cpuid.S, ...) failed. make (e=2): The system cannot find the file specified. make: *** [getarch] Error 2 Makefile.system:171: Makefile.conf: No such file or directory Makefile.:2: Makefile.system: Too many open files Makefile.:90: warning: overriding commands for target
shared' Makefile.:90: warning: ignoring old commands for target
shared' Makefile.:116: warning: overriding commands for targettests' Makefile.:116: warning: ignoring old commands for target
tests' Makefile.:138: warning: overriding commands for targetlibs' Makefile.:138: warning: ignoring old commands for target
libs' Makefile.:169: warning: overriding commands for targetprof_blas' Makefile.:169: warning: ignoring old commands for target
prof_blas' Makefile.:180: warning: overriding commands for targetblas' Makefile.:180: warning: ignoring old commands for target
blas' Makefile.:188: warning: overriding commands for targethpl' Makefile.:188: warning: ignoring old commands for target
hpl' Makefile.:202: warning: overriding commands for targethpl_p' Makefile.:202: warning: ignoring old commands for target
hpl_p' Makefile.:215: warning: overriding commands for targetnetlib' Makefile.:215: warning: ignoring old commands for target
netlib' Makefile.:228: warning: overriding commands for targetre_lapack' Makefile.:228: warning: ignoring old commands for target
re_lapack' Makefile.:232: warning: overriding commands for targetprof_lapack' Makefile.:232: warning: ignoring old commands for target
prof_lapack' Makefile.:236: warning: overriding commands for targetlapack_prebuild' Makefile.:236: warning: ignoring old commands for target
lapack_prebuild' Makefile.:279: warning: overriding commands for targetlarge.tgz' Makefile.:279: warning: ignoring old commands for target
large.tgz' Makefile.:286: warning: overriding commands for targettiming.tgz' Makefile.:286: warning: ignoring old commands for target
timing.tgz' Makefile.:293: warning: overriding commands for targetlapack-timing' Makefile.:293: warning: ignoring old commands for target
lapack-timing' Makefile.:300: warning: overriding commands for target `lapack-test'Whenever i use make ..., i am getting an error above in infinite loop.
Environment: Windows:10