fdfb48
diff --git a/man/opensm.8.in b/man/opensm.8.in
fdfb48
index df55768..79e1bfb 100644
fdfb48
--- a/man/opensm.8.in
fdfb48
+++ b/man/opensm.8.in
fdfb48
@@ -11,6 +11,7 @@ opensm \- InfiniBand subnet manager and administration (SM/SA)
fdfb48
 [\-g(uid) <GUID in hex>]
fdfb48
 [\-l(mc) <LMC>]
fdfb48
 [\-p(riority) <PRIORITY>]
fdfb48
+[\-\-subnet_prefix <PREFIX in hex>]
fdfb48
 [\-\-smkey <SM_Key>]
fdfb48
 [\-\-sm_sl <SL number>]
fdfb48
 [\-r(eassign_lids)]
fdfb48
@@ -136,6 +137,13 @@ This will effect the handover cases, where master
fdfb48
 is chosen by priority and GUID.  Range goes from 0
fdfb48
 (default and lowest priority) to 15 (highest).
fdfb48
 .TP
fdfb48
+\fB\-\-subnet_prefix\fR <PREFIX in hex>
fdfb48
+This option specifies the subnet prefix to use in
fdfb48
+on the fabric.  The default prefix is
fdfb48
+0xfe80000000000000.  OpenMPI in particular requires
fdfb48
+separate fabrics plugged into different ports to
fdfb48
+have different prefixes or else it won't run.
fdfb48
+.TP
fdfb48
 \fB\-\-smkey\fR <SM_Key value>
fdfb48
 This option specifies the SM\'s SM_Key (64 bits).
fdfb48
 This will effect SM authentication.
fdfb48
diff --git a/opensm/main.c b/opensm/main.c
fdfb48
index 2d23fe2..b4bb348 100644
fdfb48
--- a/opensm/main.c
fdfb48
+++ b/opensm/main.c
fdfb48
@@ -161,6 +161,9 @@ static void show_usage(void)
fdfb48
 	       "          This will effect the handover cases, where master\n"
fdfb48
 	       "          is chosen by priority and GUID.  Range goes\n"
fdfb48
 	       "          from 0 (lowest priority) to 15 (highest).\n\n");
fdfb48
+	printf("--subnet_prefix <prefix>\n"
fdfb48
+	       "          Set the subnet prefix to something other than the\n"
fdfb48
+	       "          default value of 0xfe80000000000000\n\n");
fdfb48
 	printf("--smkey, -k <SM_Key>\n"
fdfb48
 	       "          This option specifies the SM's SM_Key (64 bits).\n"
fdfb48
 	       "          This will effect SM authentication.\n"
fdfb48
@@ -665,6 +668,7 @@ int main(int argc, char *argv[])
fdfb48
 		{"once", 0, NULL, 'o'},
fdfb48
 		{"reassign_lids", 0, NULL, 'r'},
fdfb48
 		{"priority", 1, NULL, 'p'},
fdfb48
+		{"subnet_prefix", 1, NULL, 15},
fdfb48
 		{"smkey", 1, NULL, 'k'},
fdfb48
 		{"routing_engine", 1, NULL, 'R'},
fdfb48
 		{"ucast_cache", 0, NULL, 'A'},
fdfb48
@@ -1008,6 +1012,11 @@ int main(int argc, char *argv[])
fdfb48
 			printf(" Priority = %d\n", temp);
fdfb48
 			break;
fdfb48
 
fdfb48
+		case 16:
fdfb48
+			opt.subnet_prefix = cl_hton64(strtoull(optarg, NULL, 16));
fdfb48
+			printf(" Subnet_Prefix = <0x%" PRIx64 ">\n", cl_hton64(opt.subnet_prefix));
fdfb48
+			break;
fdfb48
+
fdfb48
 		case 'k':
fdfb48
 			sm_key = cl_hton64(strtoull(optarg, NULL, 16));
fdfb48
 			printf(" SM Key <0x%" PRIx64 ">\n", cl_hton64(sm_key));