Skip to content
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

Python Version? #277

Closed
Kekushke opened this issue Aug 5, 2020 · 15 comments
Closed

Python Version? #277

Kekushke opened this issue Aug 5, 2020 · 15 comments

Comments

@Kekushke
Copy link

Kekushke commented Aug 5, 2020

Hi! Tried various older releases including the newest 'master' branch with all kinds of installation options. Several errors in the pysph -v test of one type or another (not counting skipped) even when all local- and global-dependencies are satisfied. Problem occurs even for the older releases.

Are there any recommendations as to the version of PySPH and the version of Python would be the best choice to start a new project?

Having good pip freeze -> requirements.txt with the package==xx.xx.xx (not >=) will help a lot for master as well as when release is made. Thanks a lot... K

@Kekushke
Copy link
Author

Kekushke commented Aug 5, 2020

Sample output. Python 3.7.3 with PySPH Release 1.0a6
========================== short test summary info ============================ FAILED base/tests/test_octree.py::TestOctreeFor1DDataset::test_levels_in_tree FAILED base/tests/test_octree.py::TestOctreeFor1DDataset::test_parent_for_node FAILED base/tests/test_octree.py::TestOctreeFor1DDataset::test_plot_root - Ty... FAILED base/tests/test_octree.py::TestOctreeFor1DDataset::test_sum_of_indices_lengths_equals_total_number_of_particles FAILED base/tests/test_octree.py::TestCompressedOctreeFor1DDataset::test_levels_in_tree FAILED base/tests/test_octree.py::TestCompressedOctreeFor1DDataset::test_parent_for_node FAILED base/tests/test_octree.py::TestCompressedOctreeFor1DDataset::test_plot_root FAILED base/tests/test_octree.py::TestCompressedOctreeFor1DDataset::test_sum_of_indices_lengths_equals_total_number_of_particles FAILED parallel/tests/test_parallel.py::DumpLoadTestCase::test_dump_and_load_work_in_parallel FAILED solver/tests/test_solver_utils.py::TestOutputNumpy::test_dump_and_load_with_constants FAILED solver/tests/test_solver_utils.py::TestOutputNumpy::test_dump_and_load_with_partial_data_dump FAILED solver/tests/test_solver_utils.py::TestOutputNumpy::test_dump_and_load_works_by_default FAILED solver/tests/test_solver_utils.py::TestOutputNumpy::test_dump_and_load_works_with_compress FAILED solver/tests/test_solver_utils.py::TestOutputNumpy::test_that_output_array_information_is_saved FAILED solver/tests/test_solver_utils.py::TestOutputNumpyV1::test_load_works_with_dump_version1 FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_be_able_to_update_particle_arrays FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_correctly_update_domain FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_work_on_2d_data FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_work_when_arrays_have_different_props FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_work_with_changed_data FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_work_with_explicit_points_in_constructor FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_work_with_explicit_points_without_z FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_work_with_ghost_particles FAILED tools/tests/test_interpolator.py::TestInterpolator::test_should_work_with_multiple_arrays FAILED tools/tests/test_interpolator.py::TestInterpolator::test_that_set_interpolation_points_works FAILED tools/tests/test_sph_evaluator.py::TestSPHEvaluator::test_evaluation FAILED tools/tests/test_sph_evaluator.py::TestSPHEvaluator::test_evaluation_with_domain_manager FAILED tools/tests/test_sph_evaluator.py::TestSPHEvaluator::test_updating_particle_arrays = 28 failed, 681 passed, 267 skipped, 58 deselected, 110 warnings

@prabhuramachandran
Copy link
Contributor

@Kekushke -- we build constantly on windows and Linux (and I personally use a Mac) so the requirements certainly work. Can you please let me know what platform, what python distribution you have used and the exact steps you followed? As regards Python versions, we test on 3.8 and 3.7 and it works on 3.6 as well.

@Kekushke
Copy link
Author

Kekushke commented Aug 5, 2020

Here is the environment and procedure :
Platform: Ubuntu 18.04
Python: 3.7.3
GCC: 8.3.0
Steps:
STEP1 : APT Installs build-essential python-dev libomp-dev openmpi-bin libopenmpi-dev libtrilinos-zoltan-dev python-pip python3 python3-venv
STEP2: Create python3 venv for using pip3, and activate the venv
STEP4: Download PySPH: 1.0a6.tar.gz
STEP5: Uncompressed and run pip3 --no-cache-dir requirements.txt and also for requirements-test.txt, and mpi4py.
STEP6: export ZOLTAN variables to use apt installed libraries
STEP7: make clean, make cleanall, python setup.py build and python setup.py install
STEP8: pysph -v test
Many tests fail.
Please note no special pip3 steps for pyzoltan as in the instructions at readthedocs.io. What is the right way to install pyzoltan for this version?
Anything I am missing? Suggestions for which pysph version to use? I think some requirements are not probably set to be == that could be the problem. Anything to do with gcc version?

@Kekushke
Copy link
Author

Kekushke commented Aug 5, 2020

Looks like pyzoltan is built without inclusion by pip3 install pyzoltan as per the build log. If pip3 install pyzoltan is executed before build and install, ALL tests fail.

@Kekushke
Copy link
Author

Kekushke commented Aug 5, 2020

After super clean install, still exact same error log as in posted in the 2nd message in the thread above:
28 failed, 681 passed, 267 skipped, 58 deselected, 85 warnings

@Kekushke
Copy link
Author

Kekushke commented Aug 5, 2020

Some more information:
13 errors are TypeError
8 errors are UnicodeDecodeError
6 errors are ValueError

@prabhuramachandran
Copy link
Contributor

Please use master and not the pip version i.e. STEP4: Download PySPH: 1.0a6.tar.gz. The pip version will almost certainly be broken. Do the following, git clone the pysph repo, then run pip -r requirements.txt, since you need pyzoltan, pip install pyzoltan then python setup.py install or python setup.py develop.

There were a lot of bugs fixed due to changes with numpy upstream that are fixed in master. If things are still broken, can you send me at least one of the 28 test errors.

In any case this issue tells me that we absolutely have to push a release so things are easier to install -- even if we think there is a lot more to fix and do.

@Kekushke
Copy link
Author

Kekushke commented Aug 6, 2020

Many thanks to you. I will try this.

@prabhuramachandran
Copy link
Contributor

Thanks, do let us know if master is broken, our CI tests all use master as do me and others using pysph.

@Kekushke
Copy link
Author

Update: I managed to get a very old version to work for my work. It was struggle. I think for each release here on GitHub, it will be useful to have author provided requirements.txt and should separately also include dump of pip3 freeze; version of python, version of gcc, cython etc. This will allow to replicate any release made in the past. Currently, it is difficult to go back or forward due to too many varying conditions of dependencies. Great work here, but if it is made even more easy to install, it will be very useful. Many thanks again.

@Kekushke
Copy link
Author

Kekushke commented Sep 2, 2020

Update: Hi! Used MASTER using your notes. Got through, but got 6 XFAIL errors in pysph/base/tests/test_nnps.py::ExtendedZOrderNNPSSubdividedAsymTestCase::test_neighbors_* tests.
Again thanks. :-)

@prabhuramachandran
Copy link
Contributor

@Kekushke -- this is a good idea, to include explicit requirements for a release. The xfail means expected failures, so I think those can be safely ignored. Those are experimental NNPS algorithms that are almost never used except if you are doing research in NNPS. So I think you should be good at this point. We are working towards a release though so hopefully this weekend or so that should happen.

@Kekushke
Copy link
Author

Kekushke commented Sep 2, 2020

Many thanks for your note. I will continue to test MASTER. I will definitely try new release when out. In new release it will be good to include not only requirements.txt but also separate dump of pip3 freeze, version number of gcc, version number of zoltan, version number of pyzoltan and all other dependencies etc. to recreate an old snapshot when needed. Again thanks :-)

@prabhuramachandran
Copy link
Contributor

This is now fixed for the latest 1.0b1 release: https://github.com/pypr/pysph/releases/tag/1.0b1

@Kekushke
Copy link
Author

Kekushke commented May 4, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants