prashjha / PeriDEM

Peridynamics-based discrete element method (PeriDEM) model of granular systems
Boost Software License 1.0
61 stars 14 forks source link

Difficulty compiling dependencies for PeriDEM #6

Closed prashjha closed 3 years ago

prashjha commented 3 years ago

Sharing the conversation with Tangjin with regard to compiling dependencies HPX and PCL for PeriDEM. Hope this will be of some help.

Hi,

If you are using Ubuntu18.04, you should

  1. first install the dependencies using apt-get:

    sudo apt-get install libboost-dev libvtk7-dev libyaml-cpp-dev libhwloc-dev libjemalloc-dev libflann-dev
  2. install HPX and PCL libraries by running the bash script 'install_libs.sh' as follows

    cd <peridem-libs-dir> # <-- create a directory where you want to store the HPX, PCL libraries
    ./install_libs.sh Release # <--- copy install_libs.sh from here https://github.com/prashjha/PeriDEM/blob/main/tools/script/build_scripts/ubuntu-18.04/install_libs.sh and run it

Above will install HPX and PCL.

HPX will be installed to directory /local/hpx/1.3.0/Release

PCL will be installed to directory /local/pcl/1.11.1/Release

  1. Now you can install PeriDEM
    
    cd <peridem-dir>
    git clone https://github.com/prashjha/PeriDEM.git
    cd PeriDEM
    mkdir build && cd build

run cmake

cmake -DHPX_DIR="/lib/cmake/HPX" \ -DPCL_DIR="" \ -DEnable_Documentation=ON \ -DEnable_Tests=ON \ -DCMAKE_BUILD_TYPE=Release \ ./..

make

make -j 4

run tests

ctest --verbose



I will update the instructions in https://github.com/prashjha/PeriDEM/blob/main/README.md in next few days. Let me know if you have any issues.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
On Tue, Apr 6, 2021 at 9:25 AM 我心飞翔💪 <yuansu928@qq.com> wrote:

Dr Prashjha hello, I am a graduate student from China agricultural university,YUAN Tangjin, I focus on making to you about the near field dynamics and the coupling of the discrete element code, I want to try to run, but ran into trouble when the build environment, want to ask you, in your code “/PeriDEM/tree/main/tools/script/build_scripts/ubuntu 18.04” path, files can be directly used to build the application environment?  Or do you want to download the source code of those dependent libraries from the Internet and compile it yourself ? Can you give us some guidance? If I can get your guidance, sincerely thank you !
![unnamed](https://user-images.githubusercontent.com/32655458/114225623-2a30ed80-9938-11eb-92fb-255f8ec961f1.png)
github-actions[bot] commented 3 years ago

Hey # thanks for reporting an issue! We will try to get in touch with you soon.

prashjha commented 3 years ago

Hi,

Thanks for trying to build the library. We may be missing some libraries in your OS. Let us try more thorough approach.

  1. Run install_base.sh script which installs some additional libraries.
  2. Run install_libs.sh script which install HPX and PCL. In the attached script, I no longer build cmake.
  3. Follow step 3 of my previous email for building PeriDEM.

Please send me the log file if there is still some error. You are close to installing the libraries.

Regards, Prashant

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< On Thu, Apr 8, 2021 at 7:55 AM 我心飞翔💪 yuansu928@qq.com wrote:

Good morning, Dr Prashjha Thank you very much for your reply. I have made some progress in the configuration of the code environment, but I still have some problems, so I would like to consult you again. I operated according to the email you replied, but I met some problems in the second step. The remaining problems are mainly as follows:

unnamed (1)

continue:

unnamed (2)

Regarding to the second question, are there any version requirements for these packages? It is difficult to find the installation package links on the web page. How should I do ? The attached is the log file that was generated when I ran the second step (install HPX and PCL libraries by running the bash script 'install_libs.sh' as follows), more information is available in this file.

prashjha commented 3 years ago

Hi,

Weird. Can you delete the directories associated to PCL library:

a. /source/pcl b. /build/pcl/ c. /local/pcl/

Since you are able to compile HPX, you can turn HPX compilation off by having hpx_build="0" in install_libs.sh

Send me the build log again if there is an error. Thanks.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< On Fri, Apr 9, 2021 at 10:04 AM 我心飞翔💪 yuansu928@qq.com wrote:

Hi! Dr Prashant I'm sorry to bother you again. I followed the steps in your second email.

1、Run install_base.sh script which installs some additional libraries. (A problem was encountered here, but it has been resolved. ) Solved by changing the last line of theinstall_base.sh script to : pip3 install numpy pyvista pandas -i https://pypi.douban.com/simple 2、Run install_libs.sh script which install HPX and PCL. I had the same problem as before. Among these problems, I have solved the problem about 'metslib find'. But the rest of the problems have not been solved, mainly because the corresponding installation package cannot be found(Is there a version requirement?) Related to the package: davidSDK 、DSSDK、RSSDK and RSSDK2 And then there are some other issues as seen in the last part of the graph 3、building PeriDEM:I haven't gone this far yet

Attached is my log file.

unnamed (3)

unnamed (4)

unnamed (5)

build.log

prashjha commented 3 years ago

These errors:

gzip: stdin: unexpected end of file tar: 归档文件中异常的 EOF tar: 归档文件中异常的 EOF tar: Error is not recoverable: exiting now

could mean that you are not extracting the pcl tar file properly. Can you download the tar file from https://github.com/PointCloudLibrary/pcl/archive/pcl-1.11.1.tar.gz, extract it to correct place i.e. /source/pcl /1.11.1. Then disable the block in install_libs.sh where we extract the pcl tar file.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< On Fri, Apr 9, 2021 at 10:37 AM 我心飞翔💪 yuansu928@qq.com wrote:

There are still errors.

build-1.log

prashjha commented 3 years ago

Hi, Prashant I'm fine about copying our conversation. There is no need to hide the email. Create an issue in PeriDEM library, that's a great idea! I have gained a lot from communicating with you, and I also want to help others in need as much as I can. Regards, Yuan tangjin (This is my name. I'm from China Agricultural University, majoring in water conservancy and civil engineering. You can call me tangjin)

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ---Original--- From: "Prashant K. Jha"pjha.sci@gmail.com Date: Sat, Apr 10, 2021 01:38 AM To: "我心飞翔💪"yuansu928@qq.com; Subject: Re: About PeriDEM code

Hi Yuan,

Great. I remember getting similar errors. Since you have built PCL and HPX, hopefully PeriDEM will not give you more trouble. I have updated the readme in https://github.com/prashjha/PeriDEM very extensively. You may find them useful.

You could check (later when you have time) where exactly the install_libs.sh was failing. Was it due to tar extraction, download of corrupt tar file using wget command, or something else?

Are you fine if I copy our conversation (hiding your email if you prefer not to disclose it) and create an issue in PeriDEM library? This may be useful for other users.

Thanks.

Regards, Prashant

(I hope I got your name right. If not let me know your correct name. You can call me Prashant.)

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< On Fri, Apr 9, 2021, 12:18 我心飞翔💪 yuansu928@qq.com wrote:

Dr Prashant

It is true that there is something wrong with the compressed package. I have installed the dependent library successfully, and I will try to build PeriDEM tomorrow! Thanks for your help !