I go this ex1.c file from Intel 11. However, when I execute it, it fails:
gsamaras@pythagoras:~/konstantis$ ../mpich-install/bin/mpicc -o test ex1.c -I../intel/mkl/include ../intel/mkl/lib/intel64/libmkl_scalapack_ilp64.a -Wl,--start-group ../intel/mkl/lib/intel64/libmkl_intel_ilp64.a ../intel/mkl/lib/intel64/libmkl_core.a ../intel/mkl/lib/intel64/libmkl_sequential.a -Wl,--end-group ../intel/mkl/lib/intel64/libmkl_blacs_intelmpi_ilp64.a -lpthread -lm -ldl
gsamaras@pythagoras:~/konstantis$ mpiexec -n 4 ./test
{ 0, 0}: On entry to
DESCI{ 1, 0}: On entry to NIT parameter number 9 had an illegal value
{ 0, 0}: On entry to
DESCINIT parameter number 4 had an illegal value
0 0 vals 1.00000 0.20100 0.50100 0.60100 0.10200 2.00000 0.50200 0.60200 0.10500 0.20500 5.00000 0.60500 0.10600 0.20600 0.50600 6.00000
DESCINIT parameter number 4 had an illegal value
0 0 vals 1.00000 0.20100 0.50100 0.60100 0.10200 2.00000 0.50200 0.60200 0.10500 0.20500 5.00000 0.60500 0.10600 0.20600 0.50600 6.00000
{ 0, 1}: On entry to
DESCINIT parameter number 6 had an illegal value
{ 0, 1}: On entry to
DESCINIT parameter number 6 had an illegal value
0 1 vals 0.10300 0.20300 0.50300 0.60300 0.10400 0.20400 0.50400 0.60400 0.10700 0.20700 0.50700 0.60700 0.10800 0.20800 0.50800 0.60800
{ 1, 1}: On entry to { -1, -1}: On entry to
PSGESV
parameter number 602 had an illegal value
*** Error in `./test': free(): invalid next size (fast): 0x00000000021a6ae0 ***
DESCINIT parameter number 6 had an illegal value
{ 1, 1}: On entry to
DESCINIT parameter number 6 had an illegal value
0 1 vals 0.10300 0.20300 0.50300 0.60300 0.10400 0.20400 0.50400 0.60400 0.10700 0.20700 0.50700 0.60700 0.10800 0.20800 0.50800 0.60800
{ -1, -1}: On entry to
PSGESV parameter number 602 had an illegal value
*** Error in `./test': free(): invalid next size (fast): 0x000000000195dae0 ***
===================================================================================
= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
= PID 13140 RUNNING AT pythagoras
= EXIT CODE: 6
= CLEANING UP REMAINING PROCESSES
= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)
Why? This is my first time running an example with ScaLAPACK and I do not know what is happening.
This answer is courtesy of Ying from Intel, all the credits go to him!
The int in C are supposed to be 32bit, you may try lp64 mode.