aamaricci / SciFortran

A library of fortran modules and routines for scientific calculations (*in a way* just like scipy for python)
GNU Lesser General Public License v3.0
160 stars 39 forks source link

Issues about ```cmake ..``` #3

Closed WangYun1995 closed 3 years ago

WangYun1995 commented 3 years ago

Hi aamaricci,

The information returned after that I input cmake .. is shown below

 CMake Deprecation Warning at CMakeLists.txt:4 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- The Fortran compiler identification is GNU 6.3.1
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/f95 - skipped
-- Checking whether /usr/bin/f95 supports Fortran 90
-- Checking whether /usr/bin/f95 supports Fortran 90 - yes
-- OS: Linux 4.11.12-100.fc24.x86_64
-- BUILD_TYPE=RELEASE
-- Fortran Compiler id = GNU
-- Could NOT find MPI_Fortran (missing: MPI_Fortran_LIB_NAMES MPI_Fortran_F77_HEADER_DIR MPI_Fortran_MODULE_DIR MPI_Fortran_WORKS) 
CMake Error at /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message):
  Could NOT find MPI (missing: MPI_Fortran_FOUND)

      Reason given by package: MPI component 'C' was requested, but language C is not enabled.  MPI component 'CXX' was requested, but language CXX is not enabled.  

Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.19/Modules/FindMPI.cmake:1721 (find_package_handle_standard_args)
  CMakeLists.txt:52 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!
See also "/home/wangy/downloads/scifor/build/CMakeFiles/CMakeOutput.log".
See also "/home/wangy/downloads/scifor/build/CMakeFiles/CMakeError.log".

Does it mean that the installation fail?

aamaricci commented 3 years ago

Hi, this is error message from Cmake which, in order,

this will analyze your system without checking for MPI. If everything goes well a suitable Makefile is created and you can compile/install the library as usual: $make $make install $make post-install

Cheers. A

On Mon, Nov 30, 2020 at 2:47 PM WangYun1995 notifications@github.com wrote:

Hi aamaricci,

The information returned after that I input cmake .. is shown below

CMake Deprecation Warning at CMakeLists.txt:4 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake.

Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions.

-- The Fortran compiler identification is GNU 6.3.1 -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Check for working Fortran compiler: /usr/bin/f95 - skipped -- Checking whether /usr/bin/f95 supports Fortran 90 -- Checking whether /usr/bin/f95 supports Fortran 90 - yes -- OS: Linux 4.11.12-100.fc24.x86_64 -- BUILD_TYPE=RELEASE -- Fortran Compiler id = GNU -- Could NOT find MPI_Fortran (missing: MPI_Fortran_LIB_NAMES MPI_Fortran_F77_HEADER_DIR MPI_Fortran_MODULE_DIR MPI_Fortran_WORKS) CMake Error at /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message): Could NOT find MPI (missing: MPI_Fortran_FOUND)

  Reason given by package: MPI component 'C' was requested, but language C is not enabled.  MPI component 'CXX' was requested, but language CXX is not enabled.

Call Stack (most recent call first): /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.19/Modules/FindMPI.cmake:1721 (find_package_handle_standard_args) CMakeLists.txt:52 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred! See also "/home/wangy/downloads/scifor/build/CMakeFiles/CMakeOutput.log". See also "/home/wangy/downloads/scifor/build/CMakeFiles/CMakeError.log".

Does it mean that the installation fail?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/QcmPlab/SciFortran/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARRDWBNDUD6IPWYCWB5WTDSSOO6HANCNFSM4UHTDF2A .

WangYun1995 commented 3 years ago

Hi, this is error message from Cmake which, in order, - informs you that you're using a too old version of Cmake and - informs you that MPI can not be found in your system. By default SciFortran uses MPI, so if you do not want to use it you should set the cmake variable USE_MPI=False. This is done using the option -D: $cmake .. -DUSE_MPI=False this will analyze your system without checking for MPI. If everything goes well a suitable Makefile is created and you can compile/install the library as usual: $make $make install $make post-install Cheers. A On Mon, Nov 30, 2020 at 2:47 PM WangYun1995 @.***> wrote: Hi aamaricci, The information returned after that I input cmake .. is shown below CMake Deprecation Warning at CMakeLists.txt:4 (CMAKE_MINIMUM_REQUIRED): Compatibility with CMake < 2.8.12 will be removed from a future version of CMake. Update the VERSION argument value or use a ... suffix to tell CMake that the project does not need compatibility with older versions. -- The Fortran compiler identification is GNU 6.3.1 -- Detecting Fortran compiler ABI info -- Detecting Fortran compiler ABI info - done -- Check for working Fortran compiler: /usr/bin/f95 - skipped -- Checking whether /usr/bin/f95 supports Fortran 90 -- Checking whether /usr/bin/f95 supports Fortran 90 - yes -- OS: Linux 4.11.12-100.fc24.x86_64 -- BUILD_TYPE=RELEASE -- Fortran Compiler id = GNU -- Could NOT find MPI_Fortran (missing: MPI_Fortran_LIB_NAMES MPI_Fortran_F77_HEADER_DIR MPI_Fortran_MODULE_DIR MPI_Fortran_WORKS) CMake Error at /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:218 (message): Could NOT find MPI (missing: MPI_Fortran_FOUND) Reason given by package: MPI component 'C' was requested, but language C is not enabled. MPI component 'CXX' was requested, but language CXX is not enabled. Call Stack (most recent call first): /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:577 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.19/Modules/FindMPI.cmake:1721 (find_package_handle_standard_args) CMakeLists.txt:52 (FIND_PACKAGE) -- Configuring incomplete, errors occurred! See also "/home/wangy/downloads/scifor/build/CMakeFiles/CMakeOutput.log". See also "/home/wangy/downloads/scifor/build/CMakeFiles/CMakeError.log". Does it mean that the installation fail? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#3>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARRDWBNDUD6IPWYCWB5WTDSSOO6HANCNFSM4UHTDF2A .

But my cmake version is the latest release , i.e. "CMake 3.19.1".

aamaricci commented 3 years ago

Check that the version you are using is actually the one you are invoking $cmake --version Anyway this is only a warning, the error message comes from missing MPI.

WangYun1995 commented 3 years ago

Actually, I checked the version by invoking cmake --version. QQ图片20201201201026

So I didn't understand why this warning appears.

aamaricci commented 3 years ago

I see. I guess you can safely ignore this warning and compile without MPI support. Everything should be fine.

Cheers. A

On Tue, Dec 1, 2020 at 1:16 PM WangYun1995 notifications@github.com wrote:

Actually, I checked the version by invoking cmake --version. [image: QQ图片20201201201026] https://user-images.githubusercontent.com/68187127/100739270-cb031f80-3411-11eb-973c-4ceffa806ee0.png

So I didn't understand why this warning appears.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/QcmPlab/SciFortran/issues/3#issuecomment-736515444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARRDWDQADXD4GMJHRG72GDSSTNBXANCNFSM4UHTDF2A .

WangYun1995 commented 3 years ago

Thank you so much for your help 👍