3

I am using openmp on a cluster. When I use MPI_INIT_THREAD with desired level of thread support as MPI_THREAD_MULTIPLE, the provided level is support is only 2. I do not know, whether I am doing some mistake or missing a compiler flag. On this cluster, mpi, openmp etc are available to be used.

On my ubuntu laptop with mpich2, I do get provided level of support as 3, with same code. However, I need to use the cluster for studies. My program is C++.

Can you please tell me, if I need to change something. Thanks. Let me know, if I need to provide more information.

5
  • I think it is openmp, which I run using aprun. On another cluster, it is definitely openmp, since I personally installed it.
    – user984260
    May 8, 2012 at 2:04
  • Yes. The one with aprun is cray.
    – user984260
    May 8, 2012 at 2:11
  • 1
    tell us more: XT? mpt version?
    – Anycorn
    May 8, 2012 at 2:12
  • /opt/xt-asyncpe/5.07/bin/cc: This is the location of my compiler. So it is XT, I think.
    – user984260
    May 8, 2012 at 2:14
  • let us continue this discussion in chat
    – user984260
    May 8, 2012 at 2:15

1 Answer 1

6

On most current Cray machines, you can enable the desired MPI_THREAD_MULTIPLE by setting the environment variable

MPICH_MAX_THREAD_SAFETY=multiple

For Cray XT4, you had to load a module to enable it (it would replace the default MPI library); I don't have access on an XT4 anymore, so I don't remember the name of the module.

3
  • Thank you, I am grateful for stumbling across this. Why is this so poorly documented? I haven't found this in any Cray documentation. Have an upvote. Aug 24, 2013 at 23:15
  • 2
    The relevant Cray documentation is normally in man pages. Doing a "man mpi" will give a lot of interesting information.
    – ipapadop
    Aug 27, 2013 at 21:59
  • 1
    For others who come here, using the man pages is the way to go, because in some cases additional flags are required to build with the correct libraries. E.g. on the machine I'm using, you need to build with cc -craympich-mt or else the MPICH_MAX_THREAD_SAFETY variable won't be respected at runtime. Oct 28, 2018 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.