From 05564f428cf8a9f31af2ee6dce134f85be7ffbb7 Mon Sep 17 00:00:00 2001 From: degomme Date: Sun, 13 Nov 2016 15:35:54 -0700 Subject: [PATCH] Add a hint about a non trivial error. mmap reports no memory left, while the error is actually the number of allowed mappings per process. --- src/smpi/smpi_bench.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/smpi/smpi_bench.cpp b/src/smpi/smpi_bench.cpp index c6af124900..50cd907b5e 100644 --- a/src/smpi/smpi_bench.cpp +++ b/src/smpi/smpi_bench.cpp @@ -175,7 +175,7 @@ static void* shm_map(int fd, size_t size, shared_data_key_type* data) { mem = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if(mem == MAP_FAILED) { - xbt_die("Could not map fd %d with size %zu: %s", fd, size, strerror(errno)); + xbt_die("Could not map fd %d with size %zu: %s.\n If you are running a lot of processes, you may be exceeding the amount of mappings allowed per process. \n On linux systems, this value can be set by using sudo sysctl -w vm.max_map_count=newvalue .\n Default value is 65536", fd, size, strerror(errno)); } snprintf(loc, PTR_STRLEN, "%p", mem); meta.size = size; -- 2.20.1