-
Notifications
You must be signed in to change notification settings - Fork 935
Description
unaligned access on IA64 causes low performance.
#mpirun -np 2 -mca btl openib,self ./mpi_latency 1 1
mpi_latency(24896): unaligned access to 0x60000000008a8593, ip=0x2000000000c1b261
mpi_latency(24896): unaligned access to 0x60000000008a8595, ip=0x2000000000c1b2a1
mpi_latency(24896): unaligned access to 0x60000000008a8599, ip=0x2000000000c1b2d1
mpi_latency(24896): unaligned access to 0x60000000008a859d, ip=0x2000000000c1b301
1 5.37
After a digging in the code and some googling we found the fallowing:
- The applications that attempt the unaligned memory access are not written optimally but unaligned access '''is not considered a bug''', just unexpected or odd behavior.The output mentioned above should only appear on Intel Itanium systems as this CPU provides a hardware "trap", which tells the kernel to emulate the unaligned access.
Unaligned access happens when an application declares a memory section of a certain "type" and accesses it using a different smaller type. For example, assigning an array of char type and accessing it with a short integer. These messages are informative only. When any application performs an unaligned access, the processor traps into the kernel and the kernel emulates the unaligned access. The program will work correctly however there will be a performance hit, as emulating the unaligned memory access is a software operation and not a hardware operation.
It is possible to completely disable the printing of unaligned access messages from the current point in time forward till the next reboot by issuing this command at run-time as the root user
Echo 1 > /proc/sys/kernel/ignore-unaligned-usertrap
- In order to catch it ( get bus error when trying to access unaligned memory ) use the fallowing:
#prctl --unaligned=signal
#ulimit -c unlimited
- In this particular case the unalighed access happens in pml/ob1 but it's a global issue and can't be easily fixed.
Lenny.