Index: /issm/trunk-jpl/test/NightlyRun/test3015.m
===================================================================
--- /issm/trunk-jpl/test/NightlyRun/test3015.m	(revision 23289)
+++ /issm/trunk-jpl/test/NightlyRun/test3015.m	(revision 23290)
@@ -15,12 +15,23 @@
 %setup autodiff parameters
 index=1; %this is the scalar component we are checking against
-md.autodiff.independents={...
-	independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
+
+if IssmConfig('_HAVE_CODIPACK_')
+	md.autodiff.independents={...
+		independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices)
+	};
+	md.autodiff.dependents={...
+		dependent('name','IceVolume','type','scalar','fos_reverse_index',index)...
+		};
+	md.autodiff.driver='fos_reverse';
+else
+	md.autodiff.independents={...
+		independent('name','md.geometry.thickness','type','vertex','nods',md.mesh.numberofvertices,'fos_forward_index',index)
 	};
 
-md.autodiff.dependents={...
-	dependent('name','IceVolume','type','scalar')...
-	};
-md.autodiff.driver='fos_forward';
+	md.autodiff.dependents={...
+		dependent('name','IceVolume','type','scalar')...
+		};
+	md.autodiff.driver='fos_forward';
+end
 
 %parameters for the step-wise derivative
@@ -70,7 +81,11 @@
 md=solve(md,'Masstransport');
 %retrieve directly
-dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian;
+if IssmConfig('_HAVE_CODIPACK_')
+	dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian(index);
+else
+	dVdh_ad=md.results.MasstransportSolution.AutodiffJacobian;
+end
 
-disp(sprintf('dV/dh: analytical:  %16.16g\n       using adolc:  %16.16g\n',dVdh_an,dVdh_ad));
+disp(sprintf('dV/dh: analytical:  %16.16g\n       using ad:    %16.16g\n',dVdh_an,dVdh_ad));
 
 %Fields and tolerances to track changes
