Index: /trunk/src/cluster_command_psmn.m
===================================================================
--- /trunk/src/cluster_command_psmn.m	(revision 1042)
+++ /trunk/src/cluster_command_psmn.m	(revision 1042)
@@ -0,0 +1,42 @@
+%'cluster_command_psmn': creates the command string for launching jobs in the PSMN cluster
+%------------------------------------------------------------------------
+% function cmd=cluster_command_psmn(ListProcess,ActionFullName,DirLog,NbProcess, NbCore,CPUTimeProcess)
+%
+%OUTPUT
+% cmd=system command (char string) to launch jobs
+%%
+%
+%INPUT:
+% ListProcessFile: name of the file containing the list of processes to perform
+% ActionFullName: name given to the action (function activated by series)
+% DirLog: name of the folder used to store the log files from calculations
+% NbProcess: number of processes in the list, these processed are grouped by the systwm into jobs dipatched to NbCore cores
+% NbCore: number of computer cores to which the processes are dispatched
+% CPUTimeProcess: estimated CPU time for an individual process (in min)
+
+function cmd=cluster_command_psmn(ListProcessFile, ActionFullName, DirLog, NbProcess, NbCore, CPUTimeProcess)
+    SubmitScriptFile = regexprep(ListProcessFile, '\job_list.txt\>', 'submit_script.sh');
+	fid_list = fopen(ListProcessFile, 'r');
+    fid_submit = fopen(SubmitScriptFile, 'w');
+    i=1;
+	while(true)
+		process = fgets(fid_list);
+        if(process == -1)
+			break
+        end
+        n = numel(process);
+        process = process(1:(n-1)); % on enlÃšve le trailing \n
+        LogFile = regexprep(regexprep(process, '0_EXE\>', '0_LOG'), '\.sh\>', '.log');
+        fwrite(fid_submit, ['qsub -V '...
+                            '-e ' LogFile ' '...
+                            '-o ' LogFile ' '...
+                            '-q piv_debian '...
+                            '-N UVmat_' num2str(i) ' '...
+                            process char(10)]);
+        i=i+1;
+	end
+	fclose(fid_list);
+    fclose(fid_submit);
+    system(['chmod +x ' SubmitScriptFile]);
+    cmd = SubmitScriptFile;
+end
Index: /trunk/src/series.xml.psmn
===================================================================
--- /trunk/src/series.xml.psmn	(revision 1042)
+++ /trunk/src/series.xml.psmn	(revision 1042)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<SeriesParam>
+   <DiskQuotaCmd></DiskQuotaCmd> <!-- pas de quota au psmn -->
+<ClusterParam>
+<ExistenceTest>qstat -help</ExistenceTest>
+<!-- la politique au PSMN est d'envoyer de nombreux jobs, de courte durÃ©e et
+     de 1 cÅur. En effet, on n'est pas les seuls Ã  avoir besoin de jobs non
+     parallÃ©lisÃ©. Et il y a des nÅuds financÃ©s avec des projets spÃ©cifiques
+     auxquels on a accÃšs avec le deal que les financeurs devront attendre
+     moins de 15 minutes. La queue Ã  utiliser est "piv_debian" et c'est une
+     queue virtuelle.
+     Le staff du PSMN est trÃšs favorable Ã  ce qu'on envoie un grand nombre de
+     jobs courts sur un seul cÅur car ils les utilisent pour Ã©quilibrer la
+     charge.
+     Les tests rÃ©cents ont montrÃ© qu'on peut sans problÃšme avoir prÃšs de 80k
+     jobs. Donc 10k jobs par utilisateur n'est pas un problÃšme.
+-->
+  <NbCoreAdvised>1</NbCoreAdvised> <!-- 1 cÅur -->
+  <NbCoreMax>1</NbCoreMax>         <!--maximum 1 cÅur -->
+  <JobCPUTimeAdvised unit="minute">1</JobCPUTimeAdvised> <!--used to group 
+                    the iterations into jobs of sufficient CPU time.
+                    Default estimate is 1 min per image pair, so
+                    JobCPUTimeAdvised=1min means 1 image pair per job-->
+  <JobNumberMax>10000</JobNumberMax><!--maximum number of jobs allowed (will group the iterations to fit in)-->
+  <WallTimeMax unit="hour">23</WallTimeMax> <!--maximum allowed time for a job -->  
+  <JobStatCmd>qstat |grep UVmat</JobStatCmd> <!--command to know the number of active and waiting job launches-->  
+  <LaunchCmdFcn>cluster_command_psmn</LaunchCmdFcn> <!--name of the function used to create job launch commmand--> 
+</ClusterParam>
+<SgeParam>
+</SgeParam>
+</SeriesParam>
