none
Affinity masks for higher core counts RRS feed

  • Question

  • Good afternoon,

    This question is related to my previous question:

    Assign cores to processes

    Setting the affinity mask as suggested in the answer worked for core counts of 4 or 8 respectively.

    However, I want to use a system with 8 physical cores and hyper-threading (so 16 virtual cores).

    I tried to set the affinity mask as follows:

    mpiexec -hosts 2 localhost 1,3 localhost 1,65532

    ... but got an error that "An explicit affinity was used but the cores specified were either not allowed or do not exist."

    I tried several variations but did not get anywhere.

    Is there a limit to the affinity mask? Is it split into blocks of 8 maybe? I could not find anything in other forum posts or the documentation.

    Thanks.

    Anton


    Friday, September 13, 2019 9:44 AM

Answers

  • Anton,

    it looks like there is some bug with decimal format of masks, try hexadecimal instead, it works for me:

    mpiexec -hosts 2 localhost 1,0xFFFC localhost 1,3 app.exe

    -thanks, Anna

    • Marked as answer by antonhinneck Wednesday, September 18, 2019 11:15 PM
    Monday, September 16, 2019 6:06 PM

All replies

  • Anton,

    it looks like there is some bug with decimal format of masks, try hexadecimal instead, it works for me:

    mpiexec -hosts 2 localhost 1,0xFFFC localhost 1,3 app.exe

    -thanks, Anna

    • Marked as answer by antonhinneck Wednesday, September 18, 2019 11:15 PM
    Monday, September 16, 2019 6:06 PM
  • Anna, thank you very much.

    Using hexadecimals works reliably.

    ... I have a short follow-up question, if you don't mind.

    The ranks seem to be mapped to hosts as follows:

    (3 hosts)

    rank | 2 | 1 | 0 |

    host | 1 | 2 | 3 |

    Does that always hold?

    Best Regards,

    Anton Hinneck

    Wednesday, September 18, 2019 11:15 PM