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

Issues pip installing on powerpc #20

Open
Sulla2012 opened this issue Oct 12, 2023 · 8 comments
Open

Issues pip installing on powerpc #20

Sulla2012 opened this issue Oct 12, 2023 · 8 comments

Comments

@Sulla2012
Copy link

When pip installing ducc on a powerpc based system, the flag -march=native causes issues. Replacing that flag with -mcpu=native seems to work fine.

@mreineck
Copy link
Owner

Hmm ... which exact compiler is installed there? If it is gcc, can you please run gcc -v and report the output here?

I'm a bit reluctant to switch to -mcpu=native, since that allows only portable optimizations, as far as I understand.

@Sulla2012
Copy link
Author

Exact output:

10.3.0 --disable-multilib --enable-languages=c,c++,fortran,lto Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.3.0 (GCC)

To be clear I was just reporting what worked for me, not necessarily suggesting it as a fix.

@Sulla2012 Sulla2012 reopened this Oct 13, 2023
@mreineck
Copy link
Owner

I'll try to find a way to compile cleanly on PowerPC. However, this won't make it into ducc 0.32, which I hope to release later today.

@Sulla2012
Copy link
Author

Thanks!

@mreineck
Copy link
Owner

mreineck commented Nov 7, 2023

I think you can achieve clean compilation without editing the files by setting two environment variables, like so:

DUCC0_OPTIMIZATION=portable-strip DUCC0_CFLAGS="-mcpu=native" pip install --user --no-binary=ducc0 ducc0

The first variable switches off -march=native, and with the second one you can supply any additional flags you'd like to use.

I admit it's not terribly comfortable, but I don't have a more convenient way at the moment.

@mreineck
Copy link
Owner

This is strange ... I got an email with a comment on this issue, but the comment doesn't seem to appear here.

Anyway, the problem mentioned was the error

      ********************************************************************************
      The following seems to be defined outside of `pyproject.toml`:

      `dependencies = ['numpy>=1.17.0']`

      According to the spec (see the link below), however, setuptools CANNOT
      consider this value unless `dependencies` is listed as `dynamic`.

      https://packaging.python.org/en/latest/specifications/declaring-project-metadata/

      To prevent this problem, you can list `dependencies` under `dynamic` or alternatively
      remove the `[project]` table from your file and rely entirely on other means of
      configuration.
      ********************************************************************************

As far as I understand, this should be fixed on the ducc0 branch since Nov 21, 2023. So hopefully this will go away with the next release.

@Sulla2012
Copy link
Author

Sorry I was writing a comment, accidentally submitted it, and then deleted it. Anyway I tried the above an it raised the
attached error.. I'll try again when the next release is out.

@mreineck
Copy link
Owner

I just released version 0.33. It has "dependencies" in the "dynamic" list in pyproject.toml, as the error message suggests.

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