Index: /issm/trunk-jpl/src/m/classes/clusters/generic.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic.m	(revision 27948)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic.m	(revision 27949)
@@ -33,5 +33,5 @@
 
 			%Change the defaults if ispc
-			if ispc & ~ismingw,
+			if ispc,
 				cluster.codepath      = [issmdir() '\bin'];
 				cluster.etcpath       = [issmdir() '\etc'];
@@ -99,23 +99,16 @@
 
 			if ~ispc(),
+				% Check that executable exists at the right path
+				if ~exist([cluster.codepath '/' executable],'file'),
+					error(['File ' cluster.codepath '/' executable ' does not exist']);
+				end
+
+				% Process codepath and prepend empty spaces with \ to avoid errors in queuing script
+				codepath=strrep(cluster.codepath,' ','\ ');
+
+				% Write queuing script
 				fid=fopen([modelname '.queue'],'w');
 				fprintf(fid,'#!%s\n',cluster.shell);
-				if ~isvalgrind,
-					if cluster.interactive
-						if IssmConfig('_HAVE_MPI_'),
-							fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
-						else
-							fprintf(fid,'%s/%s %s %s %s',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
-						end
-					else
-						if IssmConfig('_HAVE_MPI_'),
-							fprintf(fid,'mpiexec -np %i %s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
-						else
-							fprintf(fid,'%s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
-						end
-					end
-				elseif isgprof,
-					fprintf(fid,'\n gprof %s/issm.exe gmon.out > %s.performance',cluster.codepath,modelname);
-				else
+				if isvalgrind,
 					%Add --gen-suppressions=all to get suppression lines
 					%fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib); it could be deleted
@@ -137,4 +130,20 @@
 						end
 					end
+				elseif isgprof,
+					fprintf(fid,'\n gprof %s/issm.exe gmon.out > %s.performance',cluster.codepath,modelname);
+				else
+					if cluster.interactive
+						if IssmConfig('_HAVE_MPI_'),
+							fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
+						else
+							fprintf(fid,'%s/%s %s %s %s',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
+						end
+					else
+						if IssmConfig('_HAVE_MPI_'),
+							fprintf(fid,'mpiexec -np %i %s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
+						else
+							fprintf(fid,'%s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
+						end
+					end
 				end
 				if ~io_gather, %concatenate the output files:
@@ -144,18 +153,11 @@
 
 			else % Windows
-
 				fid=fopen([modelname '.bat'],'w');
 				fprintf(fid,'@echo off\n');
 
-				% if IssmConfig('_HAVE_PETSC_MPI_'),
-				% 	warning('parallel runs not allowed yet in Windows. Defaulting to 1 cpus');
-				% 	cluster.np=1;
-				% end
-
 				if cluster.np>1,
-					% fprintf(fid,'"C:\\Program Files\\MPICH2\\bin\\mpiexec.exe" -n %i "%s/%s" %s ./ %s',cluster.np,cluster.codepath,executable,solution,modelname);
 					fprintf(fid,'"C:\\Program Files\\Microsoft MPI\\Bin\\mpiexec.exe" -n %i "%s/%s" %s ./ %s',cluster.np,cluster.codepath,executable,solution,modelname);
 				else
-					fprintf(fid,'"%s/%s" %s ./ %s',cluster.codepath,executable,solution,modelname);
+					fprintf(fid,'"%s\\%s" %s ./ %s',cluster.codepath,executable,solution,modelname);
 				end
 				fclose(fid);
Index: /issm/trunk-jpl/src/m/classes/clusters/generic.py
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 27948)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic.py	(revision 27949)
@@ -18,5 +18,5 @@
 
 class generic(object):
-    """GENERIC cluster class definition
+    """generic cluster class definition
 
     Usage:
Index: /issm/trunk-jpl/src/m/classes/clusters/generic_static.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/clusters/generic_static.m	(revision 27948)
+++ /issm/trunk-jpl/src/m/classes/clusters/generic_static.m	(revision 27949)
@@ -3,4 +3,10 @@
 %   Usage:
 %      cluster=generic_static('name','astrid','np',3);
+%      cluster=generic('name',oshostname(),'np',3,'login','username');
+%
+%   TODO:
+%   - Add support for restart to Windows (under MSYS2), then activate tests 125 
+%   and 126 in test suite
+%
 
 classdef generic_static
@@ -17,4 +23,5 @@
 	methods
 		function cluster=generic_static(varargin) % {{{
+
 			%use provided options to change fields
 			options=pairoptions(varargin{:});
@@ -69,23 +76,49 @@
 			end
 
-			% Check that executable exists at the right path
-			if ~exist([cluster.codepath '/' executable],'file'),
-				error(['File ' cluster.codepath '/' executable ' does not exist']);
+			if ~ispc(),
+				% Check that executable exists at the right path
+				if ~exist([cluster.codepath '/' executable],'file'),
+					error(['File ' cluster.codepath '/' executable ' does not exist']);
+				end
+
+				% Process codepath and prepend empty spaces with \ to avoid errors in queuing script
+				codepath=strrep(cluster.codepath,' ','\ ');
+
+				% Write queuing script
+				fid=fopen([modelname '.queue'],'w');
+				fprintf(fid,'#!%s\n',cluster.shell);
+				if cluster.interactive
+					if IssmConfig('_HAVE_MPI_'),
+						fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
+					else
+						fprintf(fid,'%s/%s %s %s %s',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname);
+					end
+				else
+					if IssmConfig('_HAVE_MPI_'),
+						fprintf(fid,'mpiexec -np %i %s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
+					else
+						fprintf(fid,'%s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);
+					end
+				end
+				fclose(fid);
+			else % Windows
+				fid=fopen([modelname '.bat'],'w');
+				fprintf(fid,'@echo off\n');
+
+				if cluster.np>1,
+					fprintf(fid,'"%s\\mpiexec.exe" -n %i "%s/%s" %s ./ %s',cluster.codepath,cluster.np,cluster.codepath,executable,solution,modelname);
+				else
+					fprintf(fid,'"%s\\%s" %s ./ %s',cluster.codepath,executable,solution,modelname);
+				end
+				fclose(fid);
 			end
 
-			% Process codepath and prepend empty spaces with \ to avoid errors in queuing script
-			codepath=strrep(cluster.codepath,' ','\ ');
-
-			% Write queuing script
-			fid=fopen([modelname '.queue'],'w');
-			fprintf(fid,'#!%s\n',cluster.shell);
-			fprintf(fid,['%s/mpiexec -np %i %s/%s %s %s %s \n'],codepath,cluster.np,codepath,executable,solution,'./',modelname);
-			fclose(fid);
-
-			% Create an errlog and outlog file
-			fid=fopen([modelname '.errlog'],'w');
-			fclose(fid);
-			fid=fopen([modelname '.outlog'],'w');
-			fclose(fid);
+			%in interactive mode, create a run file, and errlog and outlog file
+			if cluster.interactive,
+				fid=fopen([modelname '.errlog'],'w');
+				fclose(fid);
+				fid=fopen([modelname '.outlog'],'w');
+				fclose(fid);
+			end
 		end
 		%}}}
