Index: /issm/trunk-jpl/src/m/classes/qmu.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/qmu.m	(revision 19649)
+++ /issm/trunk-jpl/src/m/classes/qmu.m	(revision 19650)
@@ -72,6 +72,24 @@
 			if ~md.qmu.isdakota, return; end
 
-			if md.qmu.params.evaluation_concurrency~=1,
-				md = checkmessage(md,['concurrency should be set to 1 when running dakota in library mode']);
+			version=IssmConfig('_DAKOTA_VERSION_'); version=str2num(version(1:3));
+
+			if version < 6,
+				if md.qmu.params.evaluation_concurrency~=1,
+					md = checkmessage(md,['concurrency should be set to 1 when running dakota in library mode']);
+				end
+			else
+				if ~strcmpi(self.params.evaluation_scheduling,'master'),
+					md = checkmessage(md,['evaluation_scheduling in qmu.params should be set to ''master''']);
+				end
+				if md.cluster.np<=1,
+					md = checkmessage(md,['in parallel library mode, Dakota needs to run on at least 2 cpus, 1 cpu for the master, 1 cpu for the slave. Modify md.cluser.np accordingly.']);
+				end
+					
+				if self.params.processors_per_evaluation<1,
+					md = checkmessage(md,['in parallel library mode, Dakota needs to run at least one slave on one cpu (md.qmu.params.processors_per_evaluation >=1)!']);
+				end
+				if mod(md.cluster.np-1,self.params.processors_per_evaluation), 
+					md = checkmessage(md,['in parallel library mode, the requirement is for md.cluster.np = md.qmu.params.processors_per_evaluation * number_of_slaves, where number_of_slaves will automatically be determined by Dakota. Modify md.cluster.np accordingly']);
+				end
 			end
 			if ~isempty(md.qmu.partition),
