chengpengzhao / Zcp_blog_comments

0 stars 0 forks source link

Install Dakota 6.11 on Ubuntu 18.04 | Zcp's Zone #15

Open utterances-bot opened 1 year ago

utterances-bot commented 1 year ago

Install Dakota 6.11 on Ubuntu 18.04 | Zcp's Zone

First I’d like to thank Chien Nguyen for his blog, it’s very helpful for a noob to linux like me. Dakota released the v

https://chengpengzhao.com/2019-11-19-install-dakota-6.11-on-ubuntu-18.04/

zxdsf59481 commented 1 year ago

Hello I am a graduate student, and I need to use DAKOTA during the research process, but during the installation process, he ran out of cmake and could not find HDF5...

I'm running the following code and I get an error HDF5 not found

sudo cmake . $DAK_SRC/cmake/BuildDakotaCustom.cmake $DAK_SRC -DCMAKE_INSTALL_PREFIX=$DAK_INSTALL\ -DDAKOTA_HAVE_MPI:BOOL=TRUE \ -DDAKOTA_HAVE_HDF5:BOOL=TRUE

May I ask you how to install HDF5 so that cmake can find it? If I use the default version of HDF5, Cmake can find it, but because the dakota version requires not the default version, but 1.10.4 or higher. I use the system as ubuntu18.04 My installation path is /usr/local/hdf5 in the HDF5 installation path

Thank you for your help

zxdsf59481 commented 1 year ago

This is error message for me

CMake Error at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS HDF5_HL_LIBRARIES) (found version "") Call Stack (most recent call first): /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE) /usr/local/share/cmake-3.25/Modules/FindHDF5.cmake:1007 (find_package_handle_standard_args) cmake/DakotaFindSystemTPLs.cmake:126 (find_package) CMakeLists.txt:185 (dakota_find_hdf5)

chengpengzhao commented 1 year ago

@zxdsf59481

First download the latest HDF5 library(or compile from source code), then you have serveral choices(select one):

  1. add set(HDF5_LIBRARIES /path/to/libhdf5.a) and set(HDF5_INCLUDE_DIRS /path/to/hdf5/include) to the CMakeList.txt file of DAKOTA
  2. run ccmake .. in build folder and add environment variables HDF5_LIBRARIES, HDF5_INCLUDE_DIRS manually
  3. add new HDF5 to system PATH, and then DAKOTA could find it automatically

By the way, I remember that HDF5 is just an optional feature of DAKOTA, maybe it's OK to just disable it.

zxdsf59481 commented 1 year ago

First of all, thank you very much for your reply, really appreciate it. I'm sorry I'm a beginner. I don't know how to use ccmake.. Manually add HDF5_LIBRARIES, HDF5_INCLUDE_DIRS to environment variables, can you teach me? May I ask you to add HDF5 to the PATH of the system? sudo gedit ~./path is this command right? If it is correct, what I added is to use my installation path /usr/local/hdf5?

The reason why HDF5 will be used is because I saw on DAKOTA's website that the current version seems to require HDF5? (Or am I wrong?)

If there is an offense to the place, I first say sorry! thank you for your help

chengpengzhao commented 1 year ago

First of all, thank you very much for your reply, really appreciate it. I'm sorry I'm a beginner. I don't know how to use ccmake..

Maybe you should learn some cmake-basics first, ccmake is just a GUI for Cmake.

The reason why HDF5 will be used is because I saw on DAKOTA's website that the current version seems to require HDF5?

No, from the official website, it's marked (optional) obviously.

zxdsf59481 commented 1 year ago

Hello! Sorry to bother you!I try to execute ccmake.. he ran out this error (cmake error: the source directory "/home/kai/dakota" does not appear to contain cmakelists.txt. specify --help for usage, or press the help button on the cmake gui.) The picture in the attachment (error1) I tried to find some solutions on the Internet but still failed. I remembered that you said that HDF5 is only an option, so I slightly modified the CmakeList.txt in DAKOTA to remove the command to find HDF5. The picture in the attachment (HDF5 off) However, I still encountered an error and could not find H5Cpp.h. The picture in the attachment (error2)I would like to ask how I should set the settings in DAKOTA if I don't use HDF5 so that I can install it smoothly. thanks for you help 在 2023年2月2日 星期四 下午10:20:29 [GMT+8], @.***> 寫道:

First of all, thank you very much for your reply, really appreciate it. I'm sorry I'm a beginner. I don't know how to use ccmake..

Maybe you should learn some cmake-basics first, ccmake is just a GUI for Cmake.

The reason why HDF5 will be used is because I saw on DAKOTA's website that the current version seems to require HDF5?

No, from the official website, it's marked (optional) obviously.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

chengpengzhao commented 1 year ago

(cmake error: the source directory "/home/kai/dakota" does not appear to contain cmakelists.txt

.. means the parent directory, use ccmake -h to learn how to use it first.

The error you encountered is indicating that the CMake build system is unable to find the required header file "H5Cpp.h", which is a part of the HDF5 library. It seems that the HDF5 library is still being used by Dakota, even though you have tried to remove the command to find HDF5 in the CMakeLists.txt file.

To resolve this issue, you will need to make sure that the HDF5 library is not being used or required by Dakota. To do this, you may need to remove or comment out any references to HDF5 in the Dakota source code, as well as in the CMakeLists.txt file. You may also need to update any configuration or build options in Dakota to ensure that the HDF5 library is not being used.

Once you have made the necessary changes, you should be able to run the "ccmake" command without encountering any errors related to HDF5. If you continue to encounter errors, you may need to consult the Dakota documentation or reach out to the Dakota community for further assistance.

zxdsf59481 commented 1 year ago

Hello Thank you very muchI tried successfully to get ccmake .. to read the path to HDF5, and I successfully installed DAKOTA. Sorry, I want to ask you a little question at the end.When I execute some Dakota examples, there will be a warning that I have not installed python, but it does not seem to affect the running process, but there will always be warnings. Wondering if this will change my results?There is a warning picture in Attachment  Thanks for you help 在 2023年2月10日 星期五 下午03:00:09 [GMT+8], @.***> 寫道:

(cmake error: the source directory "/home/kai/dakota" does not appear to contain cmakelists.txt

.. means the parent directory, use ccmake -h to learn how to use it first.

The error you encountered is indicating that the CMake build system is unable to find the required header file "H5Cpp.h", which is a part of the HDF5 library. It seems that the HDF5 library is still being used by Dakota, even though you have tried to remove the command to find HDF5 in the CMakeLists.txt file.

To resolve this issue, you will need to make sure that the HDF5 library is not being used or required by Dakota. To do this, you may need to remove or comment out any references to HDF5 in the Dakota source code, as well as in the CMakeLists.txt file. You may also need to update any configuration or build options in Dakota to ensure that the HDF5 library is not being used.

Once you have made the necessary changes, you should be able to run the "ccmake" command without encountering any errors related to HDF5. If you continue to encounter errors, you may need to consult the Dakota documentation or reach out to the Dakota community for further assistance.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>