-
Notifications
You must be signed in to change notification settings - Fork 85
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
Compiling on Windows 10 #95
Comments
Thanks @mrthiele for trying neural-fortran. I don't have a direct and immediate answer for you due to my limited understanding of CMake and Windows. As I understand it, h5fortran, which is a high-level interface to HDF5 and a dependency to neural-fortran, implements its own CMake HDF5 finder. I think that you can set the path to your HDF5 build to the @scivision am I on the right track with the above? Anything you'd add to help @mrthiele build this? Thanks! |
@milancurcic Thanks Milan. I did try the HDF5_ROOT option (in Windows the command is I've been able to make some progress however: I'm able to create to build directory in hdf5-directory:
And if I then change directory to the C:/Users/thiel/code/NNetwork/hdf5-1.12.2/build directory and execute
it does something. But if I then return to the neural-fortran\build directory to continue to build, it complains that it can't find the HDF5 stuff. I'm guessing I'm close, but struggling to understand where things have to sit relative to each other and possibly how to set environment variables so that the build works. Thanks for all your help. Will try any other suggestions that may come in. |
@mrthiele without further progress here, I encourage you to post your question on the Fortran Discourse, which has quite a few Windows and CMake experts. |
The HDF5 install wasn't completed: cmake --install C:/Users/thiel/code/NNetwork/hdf5-1.12.2/build --prefix ~/hdf5-1.12.2 Then tell CMake where your HDF5 library is via: cmake -S neutral-fortran -B neural-fortran/build -DHDF5_ROOT=~/hdf5-1.12.2 --fresh
cmake --build neural-fortran/build |
@milancurcic I could add to neural-fortran project a small script similar to h5fortran.cmake that would auto-build HDF5 if needed. |
Example with Windows 11, Intel oneAPI 2022.3 (Intel Fortran version 2022.2), on latest commit of neural-fortran. > cmake -Bbuild -DHDF5_ROOT=c:/lib_intel
-- buildng for: Ninja
-- The C compiler identification is IntelLLVM 2022.2.0 with MSVC-like command-line
-- The Fortran compiler identification is IntelLLVM 2022.2.0 with MSVC-like command-line
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/icx.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/bin/ifx.exe - skipped
-- Configuring build for parallel execution
-- h5fortran 4.6.3 CMake 3.24.2
-- checking that C and Fortran compilers can link
-- checking that C and Fortran compilers can link - OK
-- Looking for H5_HAVE_FILTER_SZIP
-- Looking for H5_HAVE_FILTER_SZIP - not found
-- Looking for H5_HAVE_FILTER_DEFLATE
-- Looking for H5_HAVE_FILTER_DEFLATE - found
-- Looking for H5_HAVE_PARALLEL
-- Looking for H5_HAVE_PARALLEL - found
-- Found MPI_C: C:/Program Files (x86)/Intel/oneAPI/mpi/latest/lib/release/impi.lib (found version "3.1")
-- Found MPI_Fortran: C:/Program Files (x86)/Intel/oneAPI/mpi/latest/lib/release/impi.lib (found version "3.1")
-- Found MPI: TRUE (found version "3.1") found components: C Fortran
-- Found ZLIB: C:/lib_intel/lib/zlibstatic.lib (found version "1.2.11")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Looking for H5Pset_fapl_mpio
-- Looking for H5Pset_fapl_mpio - found
-- Performing Test HDF5_C_links
-- Performing Test HDF5_C_links - Success
-- Performing Test HDF5_Fortran_links
-- Performing Test HDF5_Fortran_links - Success
-- Found HDF5: C:/lib_intel/lib/libhdf5_hl.lib;C:/lib_intel/lib/libhdf5.lib (found suitable version "1.12.2", minimum required is "1.8.7") found components: Fortran HL
-- Found MPI: TRUE (found version "3.1") found components: Fortran
-- Found MPI: TRUE (found version "3.1") found components: C Fortran
-- Found HDF5: C:/lib_intel/lib/libhdf5_hl.lib;C:/lib_intel/lib/libhdf5.lib (found version "1.12.2") found components: Fortran
-- Configuring done
-- Generating done
-- Build files have been written to: C:/neural-fortran/build
C:\neural-fortran>cmake --build build
[200/200] Linking Fortran executable bin\sine.exe
> ctest --test-dir build
Internal ctest changing into directory: C:/neural-fortran/build
Test project C:/neural-fortran/build
Start 12: test_cnn_from_keras
Start 11: test_dense_network_from_keras
Start 8: test_dense_network
Start 13: test_conv2d_network
1/13 Test #13: test_conv2d_network .............. Passed 1.06 sec
Start 2: test_input3d_layer
2/13 Test #8: test_dense_network ............... Passed 1.19 sec
Start 1: test_input1d_layer
3/13 Test #2: test_input3d_layer ............... Passed 0.75 sec
Start 5: test_maxpool2d_layer
4/13 Test #1: test_input1d_layer ............... Passed 0.73 sec
Start 4: test_conv2d_layer
5/13 Test #12: test_cnn_from_keras .............. Passed 4.01 sec
Start 3: test_dense_layer
6/13 Test #5: test_maxpool2d_layer ............. Passed 2.04 sec
Start 6: test_flatten_layer
7/13 Test #4: test_conv2d_layer ................ Passed 2.15 sec
Start 7: test_reshape_layer
8/13 Test #11: test_dense_network_from_keras .... Passed 4.22 sec
Start 9: test_io_hdf5
9/13 Test #6: test_flatten_layer ............... Passed 1.18 sec
10/13 Test #3: test_dense_layer ................. Passed 1.25 sec
11/13 Test #7: test_reshape_layer ............... Passed 1.11 sec
12/13 Test #9: test_io_hdf5 ..................... Passed 1.03 sec
Start 10: test_keras_read_model
13/13 Test #10: test_keras_read_model ............ Passed 0.52 sec
100% tests passed, 0 tests failed out of 13 |
Michael, I think that'd be great, assuming the auto-build would run only if an existing build of HDF5 was not found or provided. Thank you! |
I'm trying to compile on Windows 10 and running into an issue with HDF and was wondering if somebody can help.
cmake .. -DSERIAL=1
and get the following:My questions at this point are:
scripts
directory when that directory is nowhere to be found.Any help is much appreciated.
The text was updated successfully, but these errors were encountered: