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

Easy Install and MISC Fix #108

Merged
merged 126 commits into from
May 31, 2024
Merged

Easy Install and MISC Fix #108

merged 126 commits into from
May 31, 2024

Conversation

cindytsai
Copy link
Collaborator

@cindytsai cindytsai commented May 2, 2024

Easy Install and MISC Fix

Enhancements

MISC
  • Reorganize CMake and add minimum version requirement for Python.
  • Fix the yt_rma_particle printing error msg when failing to read particle data from the particle_data dictionary even though the particle data isn't loaded. (These kind of particle data will be generated through user-defined C function)
Easy Install
  • Make libyt fetches dependencies itself when -DJUPYTER_KERNEL=ON.
  • The dependencies will be stored under libyt/vendor for reuse and linkage purpose.
APIs
  • Remove uint (unsigned int), ulong (unsigned long). This is useless and unnecessary.
  • Add velocity_unit to yt_param_yt. This is important in cosmology simulation. libyt now enforces user to set this parameter manually.
    • Inform Fish.
    • Need yt_libyt 0.0.8 releases
Test
  • cmake-build-test.yml for making sure each option can compile successfully and independently.
  • example-test-run.yml for running example/amr-example and make sure it can run.
Doc
  • Add quick start page and example.
  • Update document to make install page easier to follow (I hope)
  • Add setting OMPI_MCA_osc=sm,pt2pt when running libyt in parallel.
Example
  • Add quick start example.

Bug

  • Fix the logic of identifying user not-done-yet error and real error. It now follows the rule:
    1. If the last line has valid '' -> not-done-yet
    2. If err msg matches those from compound keywords (ex: if) and colon exist at last line and error lineno is at the last line -> not-done-yet
    3. If err msg matches those from bracket (ex: (, [, """) -> not-done-yet
    4. Else, it's a true error.

It turns out the the identifying multi-line statement or so called distinguish what is not-done-yet code is more complicated then I initially thought, since each python version prints out different error messages and even defines error lineno differently. And some API (PyErr_Fetch and PyErr_Restore) are deprecated since python 3.12. These are the API that is deprecated, the others are stable API.

  • Make sure exception hook is set before entering interactive mode or jupyter mode.

    • The exception hook to avoid MPI abort if one of the process gets error can be overwritten by yt.enable_parallelism() or other stuff. I'm not sure if this is a bug or not. (Probably not, should ask Matt)
  • Fix yt_libyt when using mpi4py in Serial Mode.

    • Push to PyPI

GitHub Action

TODOs

  • Publish jupyter_libyt on PyPI

Check

  • amr-example run
  • Enzo
  • Gamer

pre-commit-ci bot and others added 30 commits March 18, 2024 17:35
updates:
- [github.com/pre-commit/mirrors-clang-format: v17.0.6 → v18.1.1](pre-commit/mirrors-clang-format@v17.0.6...v18.1.1)
Though it can build example, it cannot install libyt and linked properly. it also install vendor library which is not we want.
1. If nlohmann_json_DIR is not provided, xeus/xeus-zmq will also count as not found.
2. Since nlohmann_json/xeus/xeus-zmq does not have XXXTargets.cmake, it gets errors when populating the path.
---
Don't know why is this happening, fix it later.
Not yet tested on eureka.
User can try to provided READLINE_PATH to help find, but this is not mandatory
Can build, but it seems to link to system readline when READLINE_PATH is provided.
Readline does not use cmake to build, it is better to install by user.
Normally, every computer would have one (?), and it is easy to install.
@cindytsai
Copy link
Collaborator Author

cindytsai commented May 2, 2024

@hyschive Can you try compiling libyt on MacOS?
Because macos-latest and macos-14 image in GitHub Actions failed to set up Python < 3.11. (Don't know why)
Maybe follow the Install page generated by the PR, it wouldn't take long.

@cindytsai
Copy link
Collaborator Author

Thank you @ChunYen-Chen for going through the documents, and giving feedbacks.

macos-latest which is now macos-14 only supports python 3.11 and 3.12
I think I accidentally removed index_offset in the example.
@cindytsai
Copy link
Collaborator Author

Hi @hyschive,

I'm enforcing setting velocity_unit in libyt. Please update libyt and use yt_libyt >= 0.0.8.

@cindytsai cindytsai merged commit 49ec75e into yt-project:main May 31, 2024
26 checks passed
@cindytsai cindytsai deleted the EasyInstall branch June 5, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working doc Improvements or additions to documentation enhancement New feature or request new-feature New feature.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant