-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
I'm using v1.1. To illustrate, I made this patch to the hello_world example. If I run with a large number of ULTs, the memory grows very fast. Since it is executing hello_world, I would expect it to be a much smaller memory footprint. Note, I also changed the stacksize, not sure if that has anything to do with the problem but it matches an issue we see with memory growth in DAOS
index 822b10f..8b988be 100644
--- a/examples/hello_world/hello_world.c
+++ b/examples/hello_world/hello_world.c
@@ -81,19 +81,23 @@ int main(int argc, char **argv)
for (i = 0; i < num_xstreams; i++) {
ABT_xstream_get_main_pools(xstreams[i], 1, &pools[i]);
}
+ABT_thread_attr attr;
+ABT_thread_attr_create(&attr);
+
+ABT_thread_attr_set_stacksize(attr, 128*1024);
/* Create ULTs. */
for (i = 0; i < num_threads; i++) {
+ int rc1;
int pool_id = i % num_xstreams;
+
thread_args[i].tid = i;
ABT_thread_create(pools[pool_id], hello_world, &thread_args[i],
- ABT_THREAD_ATTR_NULL, &threads[i]);
+ attr, NULL);
}
/* Join and free ULTs. */
- for (i = 0; i < num_threads; i++) {
- ABT_thread_free(&threads[i]);
- }
+ ABT_thread_attr_free(&attr);
/* Join and free secondary execution streams. */
for (i = 1; i < num_xstreams; i++) {```Metadata
Metadata
Assignees
Labels
No labels