Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Failing in running test_malloc_compliance

johnsonjthomas
Beginner
894 Views
Hi,

I am porting TBB 2.2 to HPUX IA64 platform. As mentioned in the attached file, there are some errors when running the /src/test/test_malloc_compliance.cpp and some other files under test directory. The errors are such that functions such as getpagesize() and other functions are not defined. I included the appropriate header files and it runs test_maloc_functionality fine but when it tries to run test_malloc_compliance it hangs, actually the entire system hangs. I dont know why this happens. Could anyone suggest a method to solve this problem?. If I leave the errors just like that (ie. not define getpagesize() ) then it runs the examples perfectly. Is it necessary that the /src/test/ directory also be built? . Any help would be great!

Thanks,
Johnson
0 Kudos
7 Replies
Alexandr_K_Intel1
894 Views
Most probable reason for the entire system hangs is failing to set memory limits. That's strange because in HP-UX man page at http://docs.hp.com/en/B2355-60103/getrlimit.2.html I don't see special notes on RLIMIT_AS support that we use for limiting proposes. You can find more exact information on hang by running test_malloc_compliance with -v key, i.e. LD_LIBRARY_PATH=. ./test_malloc_compliance.exe -v 1.

By the way, output file you attached is identical to the attachment in "ld: (Warning) Unsatisfied symbol" thread.
0 Kudos
johnsonjthomas
Beginner
894 Views
Hi Alexandr,

When test_malloc_compliance.exe is running, the system hangs. Actually there was one thing that I forgot to mention, it was showing an error "ulimit: specified value greater than user allowed". This error was at line no: 39 in /build/test_launcher.sh. I checked the configuration of the system using ulimit -aH and found out that the allowed stack size or maximum is 8152 and the specified value in test_launcher.sh was 10240. I reduced this value to 8000 and thats when this whole error of hanging took place. Hopefully this could bring more light into the problem. Btw I attached the same file since the errors regarding the undefining of getpagesize() and various such errors are present in this file.

Thanks,
Johnson
0 Kudos
Alexandr_K_Intel1
894 Views
When test_malloc_compliance.exe is running, the system hangs.

So, could you detect (either using -v or by bisection in a debugger) on which exactly step test_malloc_compliance.exe and the system hang? Another possible useful technique is looking at memory usage by test_malloc_compliance.exe in another terminal window. If it becameunusually high (as you can see limit is 200 MB per thread) it might be sign of setrlimit-releated problem.
0 Kudos
johnsonjthomas
Beginner
894 Views
Hi Alexandr,

I tried running test_malloc_compliance.exe individually using the command ./test_malloc_compliance.exe -v 1, I get the following error
The memory manager cannot access sufficient memory to initialize; exiting

Hopefully this is useful

Thanks,
Johnson
0 Kudos
Alexandr_K_Intel1
894 Views
Could you find which exactly MapMemory call returns no memory and what errno it set? By the way, are you map MapMemory to something special or it calls malloc?
0 Kudos
johnsonjthomas
Beginner
894 Views
Hi Alexandr,

I tried using the -v with ./test_malloc_compliance.exe and this is the output I got. I have attached the output with this post.

Thanks,
Johnson
0 Kudos
Alexandr_K_Intel1
894 Views
Could you try to comment out NULLReturn call? If it helps, the reason is a problem in memory limit implementation by OS. Then, you can try to create isolated test case agains setrlimit.
0 Kudos
Reply