Index: /issm/trunk/src/mex/GetPId/GetPId.cpp
===================================================================
--- /issm/trunk/src/mex/GetPId/GetPId.cpp	(revision 5004)
+++ /issm/trunk/src/mex/GetPId/GetPId.cpp	(revision 5004)
@@ -0,0 +1,34 @@
+/*\file GetPId.c
+ *\brief:  test module. do whatever you want in here
+ */
+
+#include "./GetPId.h"
+
+void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+
+	/*output*/
+	int pid;
+
+	/*Boot module: */
+	MODULEBOOT();
+
+	/*checks on arguments on the matlab side: */
+	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&GetPIdUsage);
+
+	/*Get Process id*/
+	pid=getpid();
+
+	/*write output : */
+	WriteData(PID,pid);
+
+	/*end module: */
+	MODULEEND();
+
+}
+
+void GetPIdUsage(void)
+{
+	_printf_("\n");
+	_printf_("   usage: pid=%s();\n",__FUNCT__);
+	_printf_("\n");
+}
Index: /issm/trunk/src/mex/GetPId/GetPId.h
===================================================================
--- /issm/trunk/src/mex/GetPId/GetPId.h	(revision 5004)
+++ /issm/trunk/src/mex/GetPId/GetPId.h	(revision 5004)
@@ -0,0 +1,29 @@
+/*!\file:  GetPId.h
+ * \brief header file for GetPId module.
+ */ 
+
+#ifndef _GETPID_H
+#define _GETPID_H
+
+#include <mex.h>
+#include <unistd.h>
+
+#include "../../c/modules/modules.h"
+#include "../../c/shared/shared.h"
+
+/* local prototypes: */
+void GetPIdUsage(void);
+    
+/* serial output macros: */
+#define PID (mxArray**)&plhs[0]
+
+/* serial arg counts: */
+#undef NLHS
+#define NLHS  1
+#undef NRHS
+#define NRHS  0
+
+#undef __FUNCT__ 
+#define __FUNCT__  "GetPId"
+
+#endif
Index: /issm/trunk/src/mex/Makefile.am
===================================================================
--- /issm/trunk/src/mex/Makefile.am	(revision 5003)
+++ /issm/trunk/src/mex/Makefile.am	(revision 5004)
@@ -23,4 +23,5 @@
 				InputControlUpdate \
 				InputConvergence\
+				GetPId\
 				GetSolutionFromInputs\
 				GetVectorFromInputs\
@@ -151,4 +152,7 @@
 			  ElementConnectivity/ElementConnectivity.h
 
+GetPId_SOURCES = GetPId/GetPId.cpp\
+					  GetPId/GetPId.h
+
 GetSolutionFromInputs_SOURCES = GetSolutionFromInputs/GetSolutionFromInputs.cpp\
 			  GetSolutionFromInputs/GetSolutionFromInputs.h
