# Add support for intel mpi by removing references to BI_COMM_WORLD
# BI_COMM_WORLD just appears to shadow MPI_COMM_WORLD.
--- pbdBASE.orig/src/export_blacs/pkg_tools.c	2015-06-02 15:25:57.705288000 +0200
+++ pbdBASE/src/export_blacs/pkg_tools.c	2015-06-02 15:25:29.470539000 +0200
@@ -25,7 +25,9 @@
 	BLACS_APTS.BI_AuxBuff = &BI_AuxBuff;
 	BLACS_APTS.BI_MyContxts = BI_MyContxts;
 	BLACS_APTS.BI_SysContxts = BI_SysContxts;
+#ifndef __INTEL_COMPILER
 	BLACS_APTS.BI_COMM_WORLD = BI_COMM_WORLD;
+#endif
 	BLACS_APTS.BI_Stats = BI_Stats;
 
 	#if (BLACS_APTS_DEBUG & 1) == 1
@@ -44,7 +46,9 @@
 			BI_AuxBuff.nAops, BI_AuxBuff.N);
 		REprintf("  %s (a): %x %x %x %x %x.\n", __FILE__, &BI_MaxNCtxt,
 			&BI_MaxNSysCtxt, &BI_Iam, &BI_Np, &BI_AuxBuff);
+#ifndef __INTEL_COMPILER
 		REprintf("  %s (a): %x %x %x %x.\n", __FILE__, BI_ReadyB,
+#endif
 			BI_ActiveQ, *BI_MyContxts, BI_COMM_WORLD);
 		REprintf("  %s (a): %x %x.\n", __FILE__, BI_SysContxts,
 			BI_Stats);
@@ -89,7 +93,9 @@
 
 	BI_MyContxts = (BLACSCONTEXT**) BLACS_APTS_ptr->BI_MyContxts;
 	BI_SysContxts = (MPI_Comm*) BLACS_APTS_ptr->BI_SysContxts;
+#ifndef __INTEL_COMPILER
 	BI_COMM_WORLD = (int*) BLACS_APTS_ptr->BI_COMM_WORLD;
+#endif
 	BI_Stats = (MPI_Status*) BLACS_APTS_ptr->BI_Stats;
 
 	#if (BLACS_APTS_DEBUG & 1) == 1
@@ -109,7 +115,9 @@
 		REprintf("  %s (a): %x %x %x %x %x.\n", __FILE__, &BI_MaxNCtxt,
 			&BI_MaxNSysCtxt, &BI_Iam, &BI_Np, &BI_AuxBuff);
 		REprintf("  %s (a): %x %x %x %x.\n", __FILE__, BI_ReadyB,
+#ifndef __INTEL_COMPILER
 			BI_ActiveQ, *BI_MyContxts, BI_COMM_WORLD);
+#endif
 		REprintf("  %s (a): %x %x.\n", __FILE__, BI_SysContxts,
 			BI_Stats);
 	}

