pghysels / STRUMPACK

Structured Matrix Package (LBNL)
http://portal.nersc.gov/project/sparse/strumpack/
Other
168 stars 41 forks source link

installation on windows platform #33

Open gjbian opened 4 years ago

gjbian commented 4 years ago

Hello!

I have encountered the problem of installation strumpack on windows platform.

I have no idea whether your project supports windows. I tried to build it on windows, but failed several times. I am not very familar with cmake, so i do not kown if this is my fault.

my cmake command in my own bat is:

cmake command

cmake.exe ../ \ -DCMAKE_BUILD_TYPE=Release \ -DTPL_BLAS_LIBRARIES="C:/Users/godbian/Downloads/BLAS.lib" pause

cmake command

and output was

output

-- Building for: Visual Studio 16 2019 -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19041. -- The CXX compiler identification is MSVC 19.27.29112.0 -- The C compiler identification is MSVC 19.27.29112.0 -- The Fortran compiler identification is Intel 19.1.2.20200623 -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working Fortran compiler: D:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020/windows/bin/intel64/ifort.exe -- Check for working Fortran compiler: D:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020/windows/bin/intel64/ifort.exe -- works -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Determine Intel Fortran Compiler Implicit Link Path -- Determine Intel Fortran Compiler Implicit Link Path -- done -- Checking whether D:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020/windows/bin/intel64/ifort.exe supports Fortran 90 -- Checking whether D:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020/windows/bin/intel64/ifort.exe supports Fortran 90 -- yes -- Detecting Fortran/C Interface -- Detecting Fortran/C Interface - Found GLOBAL and MODULE mangling -- Verifying Fortran/CXX Compiler Compatibility -- Verifying Fortran/CXX Compiler Compatibility - Success -- Found MPI_C: D:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.2.254/windows/mpi/intel64/lib/release/impi.lib (found version "3.1") -- Found MPI_CXX: D:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.2.254/windows/mpi/intel64/lib/release/impi.lib (found version "3.1") -- Found MPI_Fortran: D:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2020.2.254/windows/mpi/intel64/lib/release/impi.lib (found version "3.1") -- Found MPI: TRUE (found version "3.1") -- Found OpenMP_C: -openmp (found version "2.0") -- Found OpenMP_CXX: -openmp (found version "2.0") -- Found OpenMP_Fortran: -Qopenmp (found version "5.0") -- Found OpenMP: TRUE (found version "2.0") -- Support for OpenMP task depend/priority: FALSE -- Support for OpenMP taskloop: FALSE -- Looking for a CUDA compiler -- Looking for a CUDA compiler - NOTFOUND CMake Warning at CMakeLists.txt:110 (message): CUDA compiler not found, proceeding without CUDA support. CMake Warning at CMakeLists.txt:123 (find_package): By not providing "Findhip.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "hip", but CMake did not find one. Could not find a package configuration file provided by "hip" with any of the following names: hipConfig.cmake hip-config.cmake Add the installation prefix of "hip" to CMAKE_PREFIX_PATH or set "hip_DIR" to a directory containing one of the above files. If "hip" provides a separate development package or SDK, be sure it has been installed. CMake Warning at CMakeLists.txt:149 (message): HIP compiler not found, proceeding without HIP support. -- Linking with TPL_BLAS_LIBRARIES did not work, trying again with additional threading library linked in. -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE CMake Error at CMakeLists.txt:185 (message): BLAS libraries defined in TPL_BLAS_LIBRARIES (D:/Tools/lapack-master/build/lib/libblas.lib) cannot be used. -- Configuring incomplete, errors occurred! See also "E:/UGit/STRUMPACK/build/CMakeFiles/CMakeOutput.log". See also "E:/UGit/STRUMPACK/build/CMakeFiles/CMakeError.log".

output

Could you help me, please, with this issue?

pghysels commented 4 years ago

I have never tried building on windows, but I'm not aware of any reason why it wouldn't work, in theory.

Your problem seems to be with BLAS. I don't know why your BLAS library doesn't work, maybe have a look in E:/UGit/STRUMPACK/build/CMakeFiles/CMakeOutput.log or E:/UGit/STRUMPACK/build/CMakeFiles/CMakeError.log

Perhaps you can try with OpenBLAS: https://www.openblas.net/ I see there is a binary package of OpenBLAS for windows, so it should be easy to install. OpenBLAS provides both BLAS and LAPACK, with good performance. I'm hoping that if you install the OpenBLAS binary package, then STRUMPACK's CMake script will be able to find it in a standard location, i.e., no need to specify TPL_BLAS_LIBRARIES.

Another required dependency is METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download I don't know if there is a windows binary package available for that.

I see you have MPI enabled, so then the next hurdle will be ScaLAPACK. MPI can be disabled by adding -DSTRUMPACK_USE_MPI=OFF.

I have a windows machine here, but it doesn't have any compilers installed. I will try to build on that machine but it might take me a while.

gjbian commented 3 years ago

Thanks O(∩_∩)O.

I have solved the problem above. Actually, the reason of my BLAS library doesn't work is that my lib is 64bit, but i make strumpack project with x86 instruction at last.

Finally, with all hurdle ready, i have generated vs project successfully. But when i build it, some error came to me. Some OpenMP instructions such as #pragma opt task are supported after OpenMP 3.0. But Visual Studio only supported OpenMP 2.0. It is embarrassed and i have no idea how to solve it.

pghysels commented 3 years ago

You can disable openmp with: -DSTRUMPACK_USE_OPENMP=OFF