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

Make CMake work on version 3.22 #14

Merged
merged 1 commit into from
Dec 19, 2024
Merged

Conversation

chinwobble
Copy link
Contributor

I tested this on Ubuntu-22.04.

This change makes it build with CMake 3.22 which is the latest version on ubuntu-22.04.

benney@DESKTOP-DQNT22A:~/s/fastplong$ cmake --version
cmake version 3.22.1

CMake suite maintained and supported by Kitware (kitware.com/cmake).
benney@DESKTOP-DQNT22A:~/s/fastplong$ cmak^C
benney@DESKTOP-DQNT22A:~/s/fastplong$ make
cmake --build --preset ninja-vcpkg-release
ninja: no work to do.

@sfchen sfchen merged commit 7a93e7d into OpenGene:main Dec 19, 2024
3 checks passed
@sfchen
Copy link
Member

sfchen commented Dec 19, 2024

seems it requires cmake v3.30.1 to install vcpkg

shifu@ShifudeMacBook-Pro fastplong % make 
/opt/homebrew/bin/cmake --preset "ninja-multi-vcpkg"
Preset CMake variables:

  CMAKE_TOOLCHAIN_FILE:FILEPATH="/Users/shifu/fastplong/vcpkg/scripts/buildsystems/vcpkg.cmake"

-- Running vcpkg install
A suitable version of cmake was not found (required v3.30.1).
Downloading cmake-3.30.1-macos-universal.tar.gz

I am getting crazy about the cmake + vcpkg + ninja, since I have bad network access to GitHub. And this will also impact the autobump in anaconda.

So I am considering to drop cmake + vcpkg + ninja, and revert the code to use a pure Makefile, or a simpler cmake with much lower requirement.

I totally agree with you to use simd for performance boost, but we can just simply introduce highway, or probably xsimd, which is also available in conda.

@sfchen
Copy link
Member

sfchen commented Dec 19, 2024

highway is also available in anaconda, which is named as libhwy

@chinwobble
Copy link
Contributor Author

seems it requires cmake v3.30.1 to install vcpkg

shifu@ShifudeMacBook-Pro fastplong % make 
/opt/homebrew/bin/cmake --preset "ninja-multi-vcpkg"
Preset CMake variables:

  CMAKE_TOOLCHAIN_FILE:FILEPATH="/Users/shifu/fastplong/vcpkg/scripts/buildsystems/vcpkg.cmake"

-- Running vcpkg install
A suitable version of cmake was not found (required v3.30.1).
Downloading cmake-3.30.1-macos-universal.tar.gz

I am getting crazy about the cmake + vcpkg + ninja, since I have bad network access to GitHub. And this will also impact the autobump in anaconda.

So I am considering to drop cmake + vcpkg + ninja, and revert the code to use a pure Makefile, or a simpler cmake with much lower requirement.

I totally agree with you to use simd for performance boost, but we can just simply introduce highway, or probably xsimd, which is also available in conda.

I understand your internet may be unreliable from China using a VPN.
It seems like the main problem is vcpkg downloads some extra stuff.

  • vcpkg downloads cmake v3.30.1 since it doesn't know which dependency you are downloading so it gets the latest. This should only be about ~20 MB compressed.
  • ninja is less than 1 MB so I don't think that should be causing too many issues.

vcpkg should only be downloading these dependencies once and will download them to ~/.cache/vcpkg/archives.

I had a look at the packages provided by conda it might be worth investigating. I noticed some of the packages are a little behind the latest version on github though.
I'm not sure how switching to conda will solve your issue though.
Is it because Github requires VPN in China but conda-forge doesn't?

@sfchen
Copy link
Member

sfchen commented Dec 20, 2024

Yes, we should use vpn to access GitHub, and we can hardly use vpn in servers, but we can freely access conda.

@sfchen
Copy link
Member

sfchen commented Dec 20, 2024

I have tested libhwy in conda is working, and I've decided to rollback to c4f2d60

We can then focus on the SIMD acceleration, not the compilation

@chinwobble
Copy link
Contributor Author

chinwobble commented Dec 20, 2024

I have tested libhwy in conda is working, and I've decided to rollback to c4f2d60

We can then focus on the SIMD acceleration, not the compilation

Okay if that's the case, then we can remove vcpkg as a dependency and install cmake, and highway from conda.

  1. Remove vcpkg.json and vcpkg git submodule.
  2. add a environment.yml file to the repository that declares dependency on cmake and libhwy. This will allow older versions of Ubuntu to download the latest version of cmake.
  3. Change the cmake file to use the conda environments lib and include instead.

@sfchen
Copy link
Member

sfchen commented Dec 21, 2024

I've reverted the code, and recommended Anaconda.

And libhwy is working with current setup.

Let's keep it simple, and use libhwy to speed it up.

Can you please update CI as well?

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

Successfully merging this pull request may close these issues.

2 participants