|
@@ -711,12 +711,14 @@ size_t _starpu_memory_reclaim_generic(unsigned node, unsigned force, size_t recl
|
|
|
|
|
|
if (reclaim && !force)
|
|
|
{
|
|
|
- static int warned;
|
|
|
+ static unsigned warned;
|
|
|
if (!warned) {
|
|
|
- char name[32];
|
|
|
- _starpu_memory_node_get_name(node, name, sizeof(name));
|
|
|
- _STARPU_DISP("Not enough memory left on node %s. Your application data set seems too huge to fit on the device, StarPU will cope by trying to purge %lu MiB out. This message will not be printed again for further purges\n", name, (unsigned long) (reclaim / 1048576));
|
|
|
- warned = 1;
|
|
|
+ if (STARPU_ATOMIC_ADD(&warned, 1) == 1)
|
|
|
+ {
|
|
|
+ char name[32];
|
|
|
+ _starpu_memory_node_get_name(node, name, sizeof(name));
|
|
|
+ _STARPU_DISP("Not enough memory left on node %s. Your application data set seems too huge to fit on the device, StarPU will cope by trying to purge %lu MiB out. This message will not be printed again for further purges\n", name, (unsigned long) (reclaim / 1048576));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -767,12 +769,14 @@ void starpu_memchunk_tidy(unsigned node)
|
|
|
target = (total * target_p) / 100;
|
|
|
amount = target - available;
|
|
|
|
|
|
- static int warned;
|
|
|
+ static unsigned warned;
|
|
|
if (!warned) {
|
|
|
- char name[32];
|
|
|
- _starpu_memory_node_get_name(node, name, sizeof(name));
|
|
|
- _STARPU_DISP("Low memory left on node %s (%luMiB over %luMiB). Your application data set seems too huge to fit on the device, StarPU will cope by trying to purge %lu MiB out. This message will not be printed again for further purges. The thresholds can be tuned using the STARPU_MINIMUM_AVAILABLE_MEM and STARPU_TARGET_AVAILABLE_MEM environment variables.\n", name, (unsigned long) (available / 1048576), (unsigned long) (total / 1048576), (unsigned long) (amount / 1048576));
|
|
|
- warned = 1;
|
|
|
+ if (STARPU_ATOMIC_ADD(&warned, 1) == 1)
|
|
|
+ {
|
|
|
+ char name[32];
|
|
|
+ _starpu_memory_node_get_name(node, name, sizeof(name));
|
|
|
+ _STARPU_DISP("Low memory left on node %s (%luMiB over %luMiB). Your application data set seems too huge to fit on the device, StarPU will cope by trying to purge %lu MiB out. This message will not be printed again for further purges. The thresholds can be tuned using the STARPU_MINIMUM_AVAILABLE_MEM and STARPU_TARGET_AVAILABLE_MEM environment variables.\n", name, (unsigned long) (available / 1048576), (unsigned long) (total / 1048576), (unsigned long) (amount / 1048576));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
free_potentially_in_use_mc(node, 0, amount);
|