If you want to link intel MKL ScaLAPCK、please fill the appropriate contents into https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl-link-line-advisor.html, and get the link opthion from "Use this link line”.
example:link with LP64 + dynamic linking + intel MPI + ScaLAPACK
-L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl
And if you want custom MPI with BLACS, do
$ module load intel
$ cp -pr $MKLROOT/interfaces/mklmpi .
$ cd mklmpi
$ make libintel64 INSTALL_DIR=.
then you can get the custom BLACS library, please replace -lmkl_blacs_intelmpi_lp64 with it.