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

Setting up autocmake to compile gimic #295

Open
mariavd opened this issue Jan 20, 2023 · 10 comments
Open

Setting up autocmake to compile gimic #295

mariavd opened this issue Jan 20, 2023 · 10 comments
Assignees

Comments

@mariavd
Copy link
Contributor

mariavd commented Jan 20, 2023

@bast I'm not sure if the gimic repo is the right place to ask about autocmake, but I ran into trouble recompiling gimic on the CSC computers. We no longer have a full Anaconda but containerized Miniconda. Apparently, autocmake is missing. I downloaded the tar with the latest release of autocmake, but I couldn't figure out how to get it running to compile gimic.

I tried making a custom environment from a yml file but it fails to install autocmake. One of my attempts was:

channels:
  - conda-forge
dependencies:
  - python=3.10
  - pip=22.2.2
  - cython
  - numpy
  - pyparsing=2.4.7
  - pyyaml
  - sphinx
  - sphinx_rtd_theme
  - pip:
      - runtest=2.3.2
      - autocmake
@bast
Copy link
Member

bast commented Jan 27, 2023

The autocmake part is not distributed via PyPI and it should not be needed to list it in environment.yml. Does it not work when you remove it? What error do you get then?

@mariavd
Copy link
Contributor Author

mariavd commented Jan 28, 2023

I first tried cloning the gimic repo and loading the python and the cmake modules but there was an error that autocmake is missing. This happened for the first time to me. The CSC computers got an update to RHEL 8.

$ module load python-data
$ module load cmake
$ ../setup --omp --blas
Traceback (most recent call last):
  File "/projappl/pyykko2/mariavd/gimic/2023/build/../setup", line 11, in <module>
    from autocmake import configure
ModuleNotFoundError: No module named 'autocmake'

I then tried setting up a python environment with autocmake but it was not working with variations of the yaml script above.

@bast
Copy link
Member

bast commented Jan 28, 2023

I will look and test ...

@bast
Copy link
Member

bast commented Feb 1, 2023

I think I understand. You need to invoke the setup script from the top-level folder. You seem to call it from the build directory.

In other words:

$ ./setup ...

but not:

$ cd build
$ ../setup ...

@mariavd
Copy link
Contributor Author

mariavd commented Feb 5, 2023

Thank you very much, indeed, that was the problem. I should have replied earlier but I came across another issue that I only now started looking into. What is the correct way of specifying the path to the python libraries? Below is the output of the setup script.

-- Found Cython: /CSC_CONTAINER/miniconda/envs/env1/bin/cython
-- Configuring incomplete, errors occurred!
See also "/projappl/pyykko2/mariavd/gimic/2023/build/CMakeFiles/CMakeOutput.log".
See also "/projappl/pyykko2/mariavd/gimic/2023/build/CMakeFiles/CMakeError.log".

CMake Deprecation Warning at CMakeLists.txt:5 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Error at /appl/spack/v018/install-tree/gcc-8.5.0/cmake-3.23.1-vrdlmy/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python (missing: PYTHON_LIBRARY)
Call Stack (most recent call first):
  /appl/spack/v018/install-tree/gcc-8.5.0/cmake-3.23.1-vrdlmy/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/custom/FindPython.cmake:141 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/custom/cython.cmake:75 (find_package)
  cmake/custom/own.cmake:11 (include)
  CMakeLists.txt:104 (include)

I tried specifying the path to the site-packages directory, but it seems not to work.

export PYTHON_LIBRARY=/CSC_CONTAINER/miniconda/envs/env1/lib/python3.10/site-packages

Do you have any hints about that?

@bast
Copy link
Member

bast commented Feb 7, 2023

I am looking at it ...

@mariavd
Copy link
Contributor Author

mariavd commented Feb 7, 2023

Actually, a person at CSC noted this morning that the paths related to the containerized python are not visible outside of the container, so that is causing the problem. I will have to try an alternative python.

@bast
Copy link
Member

bast commented Feb 7, 2023

OK. But please know that I am now working on removing dust from the autocmake code so there will be some improvements soon.

@heikef
Copy link
Contributor

heikef commented Jun 10, 2023

Assigning @bast hope this is OK for you. While reading through the conversation I realized that you might want to close this issue when the "dust" from autocmake has been removed.

@bast
Copy link
Member

bast commented Jun 11, 2023

Thanks! Yes. Also thanks for the issue cleanup across the repository. That is helpful to increase focus.

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

3 participants