heal-research / operon

C++ Large Scale Genetic Programming
https://operongp.readthedocs.io
MIT License
144 stars 26 forks source link

Question about running ctest based on the instructions in HACKING.md #27

Closed msnliu closed 2 years ago

msnliu commented 2 years ago

The command I ran:

cmake --preset=dev

The error message I was getting: We added -Wno-error=dev flag and was using vcpkg The machine is based on Ubuntu.

Preset CMake variables:

  CMAKE_BUILD_TYPE="Release"
  CMAKE_CXX_EXTENSIONS="OFF"
  CMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Wno-error=dev"
  CMAKE_CXX_STANDARD="17"
  CMAKE_CXX_STANDARD_REQUIRED="ON"
  operon_DEVELOPER_MODE="ON"

CMake Error (dev) at build/vcpkg_installed/x64-linux/share/FastFloat/FastFloatConfig.cmake:16 (foreach):
  uninitialized variable 'fast_float_FIND_COMPONENTS'
Call Stack (most recent call first):
  build/vcpkg_installed/x64-linux/share/FastFloat/FastFloatConfig.cmake:28 (check_required_components)
  CMakeLists.txt:82 (find_package)
This error is for project developers. Use -Wno-error=dev to suppress it.
foolnotion commented 2 years ago

Hi,

Sorry, ctest integration is not complete yet. If you want to check the available presents, please see cmake --list-presets. If you do want to run the available unit tests, there are available in a separate project. Just pass -Doperon_DEVELOPER_MODE=ON to cmake and it will get build in build/test/operon-test.

lacava commented 2 years ago

hi @foolnotion, @msnliu is working with me to install and test operon. Thanks for your quick response. Could you recommend a simple starting example we can follow for running the CLI version?

foolnotion commented 2 years ago

This is mostly from the top of my head as I can't test everything right now, but you have some options:

  1. in a conda environment, run the install script e.g. install.sh from the competition (don't forget to update the revisions to get the latest version of operon). you can remove pyoperon from that script if it's not needed.
  2. using nix, as per BUILDING.md will get you a dev shell where you can configure and build operon. one can also do to get a built version. a result symlink will then point to its location in the nix store.
    nix build github:heal-research/operon/cpp20 --no-write-lock-file

    same as above but inside docker:

    docker run -ti --rm docker.nix-community.org/nixpkgs/nix-flakes nix shell github:heal-research/operon/cpp20 --no-write-lock-file
  3. vcpkg - this might not work as I suspect some of the port files might be outdated, but instructions are present in BUILDING.md

Feel free to reopen this and I'll do my best to help.

lacava commented 2 years ago

thanks @foolnotion ! we went the vcpkg route, but will switch to 1 or 2 and see how it goes.

foolnotion commented 2 years ago

Happy to help! For option 1, the cmake flag -DBUILD_CLI_PROGRAMS=OFF needs to be -DBUILD_CLI_PROGRAMS=ON. eve, vstat, operon revisions need to be the latest ones. You probably also want to pass -DCMAKE_CXX_FLAGS=-march=x86-64-v3 or something similar, in order to get the best performance.