Mercury Bugs - mercury
View Issue Details
0000144mercuryBugpublic2010-04-17 22:102011-02-08 14:47
Reporterpbone 
Assigned Topbone 
PrioritynormalSeverityminorReproducibilitysometimes
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000144: The --max-contexts-per-thread runtime option is not obeyed in asm_fast.par grades.
Description--max-contexts-per-thread was used to limit the number of contexts created by the Mercury runtime. It was used by the runtime decision to schedule a spark locally or globally. Scheduling a spark globally would require creating a new context, where as local sparks for the current parallel conjunction can be executed using the current context.

Since implementing work stealing for sparks all sparks are scheduled locally, and te --max-contexts-per-thread option is no-longer obeyed. In some cases (I assume doubly-recursive code such as quicksort) where the left and right arguments of the & operator cannot be swapped or are both deeply recursive this could create an overwhelming number of contexts and use too much memory.
TagsNo tags attached.
Attached Files

Notes
(0000312)
pbone   
2011-02-08 14:47   
Committed a fix.

Issue History
2010-04-17 22:10pboneNew Issue
2010-04-17 22:11pboneStatusnew => assigned
2010-04-17 22:11pboneAssigned To => pbone
2011-02-08 14:47pboneNote Added: 0000312
2011-02-08 14:47pboneStatusassigned => closed
2011-02-08 14:47pboneResolutionopen => fixed