Changing UPCR_MAX_THREADS on an already installed UPC

12 views
Skip to first unread message

Sri Raj Paul

unread,
Jun 2, 2020, 12:51:56 PM6/2/20
to upc-users
Hello,

I am trying to run a UPC program with 2048 threads at NERSC Cori. But I receive the message "UPC Runtime error: too many runtime threads! UPCR_MAX_THREADS=1024, thread count=2048".
I saw other posts in the forum that says this limit is set during configure time. Is it still the case, or is there any way to overcome this in the Cori's 'bupc/2020.4.0' module.

To compile the code (I am using already available UPC codes from another repository), I use the GUPC option ( upcc -gupc) because it seems to not work properly with the default bupc translator. 

Thank you
Sriraj

Dan Bonachea

unread,
Jun 2, 2020, 1:44:26 PM6/2/20
to Sri Raj Paul, upc-users
Hi Sriraj -

Depending on your code's requirements, you may find success switching to the "bupc-narrow" module on cori, which trades block-size bits in the pointer-to-shared representation for more thread bits, raising the maximum number of threads. Note this will reduce the value of UPC_MAX_BLOCKSIZE to compensate.

If you are having trouble with the BUPC translator, I'd recommend trying -cupc2c

Berkeley UPC also supports a (more expensive) 128-bit pointer-to-shared representation that removes all practical limits on threads, blocks and shared heap, but I don't think we currently curate installs for this configuration on cori. If you think your code needs this mode, talk to us further about your code's requirements and we can either install a copy for you or provide more detailed instructions.

Hope this helps..

-D

--
You received this message because you are subscribed to the Google Groups "upc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to upc-users+...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/upc-users/0f526a4e-8fc4-436a-bf64-fe60cafd13d3%40lbl.gov.

Paul Hargrove

unread,
Jun 2, 2020, 2:04:45 PM6/2/20
to Dan Bonachea, Sri Raj Paul, upc-users
Sriraj,

The `bupc/2020.4.0` module has been configured with the 128-bit representation Dan mentions, which has a 32-bit field for thread.
So I don't believe the error you report should occur with this build.

I will look into the possibility that the build has not been configured as intended.
In the meantime, perhaps you can double check that you are using the UPC compiler you think you are?

I also agree w/ Dan's recommendation to try `-cupc2c` rather than `-gupc`.

-Paul




--
Paul H. Hargrove <PHHar...@lbl.gov>
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department
Lawrence Berkeley National Laboratory

Paul Hargrove

unread,
Jun 2, 2020, 2:10:13 PM6/2/20
to Dan Bonachea, Sri Raj Paul, upc-users
Sriraj,

Sorry for the two messages in rapid succession.

I have determined that the 1024-thread limit is ONLY present with `-gupc`.
This appears to be intentional in my build scripts, but I can no longer recall the motivation.

Please use `-cupc2c` on Cori if the default `-bupc` is not working for you.
Both have a 2^32 limit on threads.

Of course, if you still have problems, please let us know.

-Paul

Sri Raj Paul

unread,
Jun 2, 2020, 4:59:47 PM6/2/20
to upc-users, dobon...@lbl.gov, srira...@gmail.com
Thanks Paul and Dan. 
Using -cupc2c solved the problem. I am able to use 2048 threads now.
Thank you
Sriraj
To unsubscribe from this group and stop receiving emails from it, send an email to upc-...@lbl.gov.

--
You received this message because you are subscribed to the Google Groups "upc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to upc-...@lbl.gov.


--
Paul H. Hargrove <PHHar...@lbl.gov>
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department
Lawrence Berkeley National Laboratory
Reply all
Reply to author
Forward
0 new messages