Index: ../trunk-jpl/test/NightlyRun/test340.m
===================================================================
--- ../trunk-jpl/test/NightlyRun/test340.m	(revision 18686)
+++ ../trunk-jpl/test/NightlyRun/test340.m	(revision 18687)
@@ -14,13 +14,6 @@
 md.inversion.maxiter=6;
 md.inversion.cost_functions=[102  501];
 md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=2.*10^-7;
-PETSCMAJOR = IssmConfig('_PETSC_MAJOR_');
-PETSCMINOR = IssmConfig('_PETSC_MINOR_');
-if(PETSCMAJOR>3 | (PETSCMAJOR==3 & PETSCMINOR>=5)),
-	md.inversion.algorithm='blmvm';
-else
-	md.inversion.algorithm='tao_blmvm';
-end
 md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
 
 md.cluster=generic('name',oshostname(),'np',3);
Index: ../trunk-jpl/src/m/classes/taoinversion.m
===================================================================
--- ../trunk-jpl/src/m/classes/taoinversion.m	(revision 18686)
+++ ../trunk-jpl/src/m/classes/taoinversion.m	(revision 18687)
@@ -59,7 +59,13 @@
 			obj.gttol = 1e-4;
 
 			%minimization algorithm
-			obj.algorithm = 'blmvm';
+			PETSCMAJOR = IssmConfig('_PETSC_MAJOR_');
+			PETSCMINOR = IssmConfig('_PETSC_MINOR_');
+			if(PETSCMAJOR>3 | (PETSCMAJOR==3 & PETSCMINOR>=5))
+				obj.algorithm = 'blmvm';
+			else
+				obj.algorithm = 'tao_blmvm';
+			end
 
 			%several responses can be used:
 			obj.cost_functions=101;
