xcfem / xc

finite element analysis package for civil engineering structures.
http://www.xcengineering.xyz/html_files/software.html
GNU General Public License v3.0
266 stars 54 forks source link

Error on installing on Ubuntu 21.04 #95

Closed Josileissu closed 3 years ago

Josileissu commented 3 years ago

Well, now its me with an error.

Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
make[2]: *** [CMakeFiles/xc_basic_utils.dir/build.make:1018: CMakeFiles/xc_basic_utils.dir/umfpack/umd2f0.f.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:218: CMakeFiles/xc_basic_utils.dir/all] Error 2
make: *** [Makefile:149: all] Error 2

What i do for now: 1) Install Ubuntu 21.04; 2) Run the script; 3) Mkdir build_xc; 4) clone xc_utils and xc at ~/build_xc$ 5) mkdir build-xc_utils, cmake src, make -j 12 (for testing) and here i get this two errors.

How can i undo these final step? To cmake and make again? or i cant?

lcpt commented 3 years ago

Hi @Josileissu.

The order must be:

All the information stored in the build process is generated from the repositories, it is perfectly safe to delete this information and generate it again.

  1. Clone xc_utils repository
  2. Install package dependencies (the package names for Ubuntu 21.04 could be different: to check).
  3. mkdir build/xc_utils
  4. cd build-xc_utils
  5. cmake ../xc_utils/src
  6. make -j 12 (or whatever)
  7. sudo make install
  8. cd ../xc_utils/python_modules
  9. sh local_install.sh
  10. cd ../verif -> run verification tests: ./run_verif.sh | grep -v ok
  11. clone xc repository
  12. install package dependencies (see previous note about Ubuntu 21.04)
  13. mkdir build-xc
  14. cd build-xc
  15. cmake ../xc/src
  16. make -j 12
  17. sudo make install
  18. cd ../xc/python_modules
  19. sh local_install.sh
  20. cd ../verif -> run verification tests: ./run_verif.sh | grep -v ok
lcpt commented 3 years ago

A part of that, I think we must get rid of xc_utils repository and put all the code into the xc repo. Many people find confusing the existence of the xc_utils repository.

Josileissu commented 3 years ago

Thanks for answered. I'm trying to run. For now my folders are with this configuration: 1) In home, i have the build_xc 2) Inside build_xc i have two folders: xc and xc_utils.

With your step-by-step, i create the build-xc_utils in home (~/build-xc_utils), but when i do cmake ../xc_utils/src this doesnt work. take the same errors that i get before. 1) /usr/bin/vtkParseOGLExt-7.1 2) usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so 3) /usr/bin/vtk 4) /usr/bin/pvtk

And when i run the make -j 2, for example, i get an error:

Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar) make[2]: [CMakeFiles/xc_basic_utils.dir/build.make:1018: CMakeFiles/xc_basic_utils.dir/umfpack/umd2f0.f.o] Error 1 make[2]: Waiting for unfinished jobs....

lcpt commented 3 years ago

Hi, @Josileissu.

The cmake commands reads its input from the CMakeLists.txt file that is included in the src directory ("src" is short for "source code") of each repository. So you can use any empty directory to build, but you must tell cmake where is the srcdirectory with respect to the current one. The name or the path of the building folder does not matter. So if you type cmake ../xc_utils/src cmake expects to find the src folder under a directory named xc_utils hanging from the parent directory; is that the case?

On the other hand, if cmake crashes, trying to compile the code with make is useless.

Josileissu commented 3 years ago

Well, i dont know what happen. I follow the adress and i cant find the files labeled vtk as i mention before. I Will try install Debian o.s. to test...

lcpt commented 3 years ago

Hi @Josileissu

I didn't pay attention to the VTK files you mentioned. I thought it was garbage error from cmake...

If there are packages that are not installed the problem may be the different names of some of them in Ubuntu 20.04 and Ubuntu 21.04. The scripts packages_install_ubuntu_focal_fossa.sh in xc and xc_utils work well in Ubuntu 20.04, but they are not tested in Ubuntu 21.04. I think the easiest solution is to check the packages installed by the script and install manually the missing ones. If you install Debian you'll have a similar problem I think.

Josileissu commented 3 years ago

Hello @lcpt

Well, i will try again with ubuntu 20.04. My debian instalation doesnt works well. The steps that i will do, i will coment here after.

lcpt commented 3 years ago

OK. If I can help just let me know.

Josileissu commented 3 years ago

Thanks for helping. For now i re installed the ubuntu 20.04, and do the commands:

sudo apt update sudo apt upgrade sudo apt dist-upgrade

wget https://raw.githubusercontent.com/xcfem/xc/master/install/packages_install_ubuntu_focal_fossa.sh sudo bash packages_install_ubuntu_focal_fossa.sh #

wget https://raw.githubusercontent.com/xcfem/xc/master/install/xc_code_install.sh bash xc_code_install.sh #

Before this, the program was compiled. But the same error with vtk shows to me. And while the installing with the scripts, an phrase shows: syntaxwarning: "is" with a literal. Did you mean "=="? Why this occurs?

And when install the project... began sudo: python: command not found appeared. I will try update the python and run all things again...

Josileissu commented 3 years ago

My python version is: 3.8.5

For examples: the erros i get.

image

image

image

image

Josileissu commented 3 years ago

and when i try to use the local_install.sh appears:

image

ebrahimraeyat commented 3 years ago

maybe python3 is your main python installation. run: python3

what is output?

Josileissu commented 3 years ago

image

lcpt commented 3 years ago

Hi, @Josileissu. @ebrahimraeyat is right.

Install python-is-python3:

' sudo apt install python-is-python3`

Josileissu commented 3 years ago

Oh, thanks. I will test this. If this work i will comment after here.

Josileissu commented 3 years ago

Hi @lcpt.

I atualize my CMAKE to version 3.20.2 and install python-is-python3.

Now, the tests are ok. But the vtk_utils was not found.

image

How i install only vtk from the site?

lcpt commented 3 years ago

Hi @Josileissu The vtk_utils module is part of the XC distribution. It must be here: xc/python_modules/misc/vtk_utils/utils_vtk.py (a clear lack of imagination naming the files yeah :).

Have you executed sh local_install.sh' insidexc/python_modules` after your last pull from the repository?

I have been doing major modifications on the xc python modules these days, and maybe you have downloaded (pulled) an updated version of the tests but without updating the installed python modules (this is done by the local_install.sh script).

Josileissu commented 3 years ago

Hello @lcpt, Hmm, ok. I think maybe this are ocurring. I Will try again. And download the new content.

Josileissu commented 3 years ago

Hi @lcpt, My installation keeps given me the error no module named 'vtk_utils'. I open terminal inside the folder python_modules and run sudo sh local_install.sh and run the verify before this.

I dont know what i'm doing in error...

regards

Josileissu commented 3 years ago

I've reinstall vtk from source code and the qt5, but the error, for example:

from postprocess.xcVtk.FE_model import vtk_FE_graphic
  File "/usr/local/lib/python3.8/dist-packages/postprocess/xcVtk/FE_model/vtk_FE_graphic.py", line 18, in <module>
    from vtk_utils import utils_vtk
ModuleNotFoundError: No module named 'vtk_utils'

keeps appearing.

lcpt commented 3 years ago

I've reinstall vtk from source code and the qt5, but the error, for example:

from postprocess.xcVtk.FE_model import vtk_FE_graphic
  File "/usr/local/lib/python3.8/dist-packages/postprocess/xcVtk/FE_model/vtk_FE_graphic.py", line 18, in <module>
    from vtk_utils import utils_vtk
ModuleNotFoundError: No module named 'vtk_utils'

keeps appearing.

Hi. As I said before this error has nothing to do with the VTK or the QT modules. The problem is that the vtk_utils module (that belongs to XC) it is not installed in your computer.

lcpt commented 3 years ago

Hi @Josileissu

I've found the problem. Some import lines in the XC python modules and verification tests were not correctly updated after removal of the xc_utils package. I think I've fixed them all. The error was not detectable at my side because the old Python modules from xc_utils remained installed.

Could you pull the XC repository again, update the modules (i.e. run sh local_install.sh) and run the verification tests again?

Josileissu commented 3 years ago

Hi @lcpt

I'm begin understand the process to analyze the code.. A question, after all tests passed, maybe vtk open an window with structure of test?

Change topic, i've found an mismatch with SIA_snow.py

image

So i think the correction retval = (160+1.4*(h/100)*2)9.81. How i can help upgrade the code, or fix an lib?

The same error with vtk keeps working: image

And reading my terminal, above vtk errors, i see this: image

Before this, i run local_install and redo the verif_test (run_verif.sh), and an error appear: image

lcpt commented 3 years ago

Hi @Josileissu

I think we have solved this issue, and we can close it. It's better to open an issue for each of the questions you mention in your last post (error in snowSIA, error in shell_mitc9 verification test, and so on) otherwise it's impossible to track the issues and to close them when they are solved. Could you please open new issues for those questions?

Concerning the procedure to collaborate with the development this is not an issue, so it's better to open a "discussion" I'll do it myself tomorrow if possible.

Thank you.

lcpt commented 3 years ago

It's something I said? :)

Josileissu commented 3 years ago

Oh, i stopped for now. I'm working on some projects here (design houses)... I guess at next week i'm going to restart install.

But, i see an videos on youtube to see how vtk works. And the vtk on my linux o.s. doesnt work the same way. When i call VTK on terminal they open, but doesnt work when the tests finishes.

I'm reading something (on nights) about the opensees to understand how it works kk' i like understanding the kernel of calculus.

So, thanks for helping.