Index: /trunk/autoclean.sh
===================================================================
--- /trunk/autoclean.sh	(revision 20)
+++ /trunk/autoclean.sh	(revision 1)
@@ -1,4 +1,4 @@
 #!/bin/sh
-# $Id$
+# $Id: autoclean.sh 92 2010-04-08 15:40:49Z mamonski $
 
 echo "Removing all generated files. ($PWD)"
Index: /trunk/TODO
===================================================================
--- /trunk/TODO	(revision 20)
+++ /trunk/TODO	(revision 1)
@@ -1,4 +1,1 @@
-= TODO =
-
- * release DRMAA for LoadLeveler on APPs Track
-
+TODO:
Index: /trunk/doc/Makefile.am
===================================================================
--- /trunk/doc/Makefile.am	(revision 20)
+++ /trunk/doc/Makefile.am	(revision 1)
@@ -1,3 +1,3 @@
-# $Id$
+# $Id: Makefile.am 92 2010-04-08 15:40:49Z mamonski $
 #
 # PSNC DRMAA for LoadLeveler
Index: /trunk/doc/rst.css
===================================================================
--- /trunk/doc/rst.css	(revision 20)
+++ /trunk/doc/rst.css	(revision 1)
@@ -1,5 +1,5 @@
 /*
 :Author: David Goodger (goodger@python.org)
-:Id: $Id$
+:Id: $Id: rst.css 92 2010-04-08 15:40:49Z mamonski $
 :Copyright: This stylesheet has been placed in the public domain.
 
Index: /trunk/Makefile.am
===================================================================
--- /trunk/Makefile.am	(revision 24)
+++ /trunk/Makefile.am	(revision 1)
@@ -1,3 +1,3 @@
-# $Id$
+# $Id: Makefile.am 227 2010-05-25 13:14:20Z mamonski $
 #
 # PSNC DRMAA for LoadLeveler
@@ -21,30 +21,5 @@
  autoclean.sh \
  autogen.sh \
- m4/missing-dev-prog.sh \
- m4/acx_pthread.m4 \
- m4/ax_gcc_warnings.m4 \
- m4/libtool.m4 \
- m4/ltsugar.m4 \
- m4/lt~obsolete.m4 \
- m4/ax_docutils.m4  \
- m4/ax_ll.m4 \
- m4/ltoptions.m4 \
- m4/ltversion.m4 \
- drmaa_utils/m4/ac_c_bigendian_cross.m4 \
- drmaa_utils/m4/acx_pthread.m4 \
- drmaa_utils/m4/ax_docutils.m4 \
- drmaa_utils/m4/ax_func_gettid.m4 \
- drmaa_utils/m4/ax_func_va_copy.m4 \
- drmaa_utils/m4/ax_gcc_warnings.m4 \
- drmaa_utils/m4/ax_gperf.m4 \
- drmaa_utils/m4/bison_ylwrap.sh \
- drmaa_utils/m4/libtool.m4 \
- drmaa_utils/m4/lt~obsolete.m4 \
- drmaa_utils/m4/ltoptions.m4 \
- drmaa_utils/m4/ltsugar.m4 \
- drmaa_utils/m4/ltversion.m4 \
- drmaa_utils/m4/missing-dev-prog.sh
+ m4/missing-dev-prog.sh
 
-SUBDIRS = drmaa_utils ll_drmaa 
-
-
+SUBDIRS = drmaa_utils ll_drmaa doc
Index: /trunk/autogen.sh
===================================================================
--- /trunk/autogen.sh	(revision 20)
+++ /trunk/autogen.sh	(revision 1)
@@ -1,4 +1,4 @@
 #!/bin/sh
-# $Id$
+# $Id: autogen.sh 136 2010-04-29 12:19:52Z mmatloka $
 
 run() {
Index: /trunk/ll_drmaa/util.c
===================================================================
--- /trunk/ll_drmaa/util.c	(revision 20)
+++ /trunk/ll_drmaa/util.c	(revision 1)
@@ -1,3 +1,3 @@
-/* $Id$ */
+/* $Id: util.c 224 2010-05-25 08:48:28Z mamonski $ */
 /*
  * PSNC DRMAA for LL
@@ -27,5 +27,5 @@
 		__attribute__ ((unused))
 #	endif
-	= "$Id$";
+	= "$Id: util.c 224 2010-05-25 08:48:28Z mamonski $";
 #endif
 
Index: /trunk/ll_drmaa/job.h
===================================================================
--- /trunk/ll_drmaa/job.h	(revision 26)
+++ /trunk/ll_drmaa/job.h	(revision 1)
@@ -1,3 +1,3 @@
-/* $Id$ */
+/* $Id: job.h 224 2010-05-25 08:48:28Z mamonski $ */
 /*
  * PSNC DRMAA for LL
@@ -36,5 +36,4 @@
 struct lldrmaa_job_s {
 	fsd_job_t super;
-	time_t missing_time;
 
 	void (*read_job_info_mon)( fsd_job_t *self, const char * state , unsigned status);
Index: /trunk/ll_drmaa/util.h
===================================================================
--- /trunk/ll_drmaa/util.h	(revision 20)
+++ /trunk/ll_drmaa/util.h	(revision 1)
@@ -1,3 +1,3 @@
-/* $Id$ */
+/* $Id: util.h 220 2010-05-24 17:42:49Z mmatloka $ */
 /*
  * PSNC DRMAA for LL
Index: /trunk/ll_drmaa/session.c
===================================================================
--- /trunk/ll_drmaa/session.c	(revision 26)
+++ /trunk/ll_drmaa/session.c	(revision 1)
@@ -1,3 +1,3 @@
-/* $Id$ */
+/* $Id: session.c 224 2010-05-25 08:48:28Z mamonski $ */
 /*
  * PSNC DRMAA for LL
@@ -132,5 +132,5 @@
 	LL_job job_info;
 
-	char *monitor_program = LL_DRMAA_BIN_DIR"/lldrmaa_monitor";
+	char *monitor_program = LL_DRMAA_BIN_DIR"/monitor";
 
 	TRY
@@ -147,17 +147,8 @@
 
 		connection_lock = fsd_mutex_lock( &self->drm_connection_mutex );
-		if (self->wait_thread_run_flag) 
-		  {
-			fsd_log_info(("llsubmit(%s, %s, %s, %p, %d)",cmd_path, monitor_program, llself->unix_socket_name, (void*)&job_info, LL_JOB_VERSION));
-			status = llsubmit(cmd_path, monitor_program, llself->unix_socket_name, &job_info, LL_JOB_VERSION);
-		  }
-		else
-		  {
-			fsd_log_info(("llsubmit(%s, NULL, NULL, %p, %d)",cmd_path, (void*)&job_info, LL_JOB_VERSION));
-			status = llsubmit(cmd_path, NULL, NULL, &job_info, LL_JOB_VERSION);
-		  }
+		status = llsubmit(cmd_path, monitor_program, llself->unix_socket_name, &job_info, LL_JOB_VERSION);
 		connection_lock = fsd_mutex_unlock( &self->drm_connection_mutex );
 
-		if(getenv("LLDRMAA_KEEP_CMD") == NULL && remove(cmd_path) == -1)
+		if(remove(cmd_path) == -1)
 			fsd_log_warning(("Can't delete cmd file: %s", cmd_path));
 
@@ -170,7 +161,5 @@
 		 }
 		else /* 0 */
-		 {
 			fsd_log_debug(("llsubmit: %s",lldrmaa_err_submit(status)));
-		 }
 
 		if( start != end )
@@ -181,5 +170,5 @@
 			 {
 			 	job_ids[i] = fsd_asprintf("%s.%d.%d", job_info.step_list[i]->id.from_host, job_info.step_list[i]->id.cluster, job_info.step_list[i]->id.proc);
-				fsd_log_info((" new array job id: %s", job_ids[i]));
+
 				job = lldrmaa_job_new( fsd_strdup(job_ids[i]) );
 				job->session = self;
@@ -196,5 +185,4 @@
 			job_ids[0] = fsd_asprintf( "%s.%d.0", job_info.step_list[0]->id.from_host, job_info.step_list[0]->id.cluster);
 
-			fsd_log_info((" new job id: %s", job_ids[0]));
 			job = lldrmaa_job_new( fsd_strdup(job_ids[0]) );
 			job->session = self;
@@ -259,4 +247,6 @@
 	 }
 
+	if ( !self->wait_thread_started )
+		fsd_exc_raise_msg(FSD_ERRNO_INTERNAL_ERROR, "DRMAA for LL requires that wait thread is enable. Don't disable it in configuration file!" );
 }
 
Index: /trunk/ll_drmaa/drmaa.c
===================================================================
--- /trunk/ll_drmaa/drmaa.c	(revision 26)
+++ /trunk/ll_drmaa/drmaa.c	(revision 1)
@@ -1,3 +1,3 @@
-/* $Id$ */
+/* $Id: drmaa.c 220 2010-05-24 17:42:49Z mmatloka $ */
 /*
  * PSNC DRMAA for LL
@@ -17,4 +17,5 @@
  */
 
+#include <sys/timers.h>
 #include <sys/time.h>
 #include <sys/wait.h>
Index: /trunk/ll_drmaa/Makefile.am
===================================================================
--- /trunk/ll_drmaa/Makefile.am	(revision 26)
+++ /trunk/ll_drmaa/Makefile.am	(revision 1)
@@ -1,3 +1,3 @@
-# $Id$
+# $Id: Makefile.am 144 2010-05-02 15:01:09Z mmatloka $
 #
 # PSNC DRMAA for LoadLeveler
@@ -33,9 +33,9 @@
 libdrmaa_la_LDFLAGS = @LL_LDFLAGS@ -version-info @LL_DRMAA_VERSION_INFO@
 
-bin_PROGRAMS = lldrmaa_monitor
+bin_PROGRAMS = monitor
 
-lldrmaa_monitor_SOURCES = monitor.c
+monitor_SOURCES = monitor.c
 
-lldrmaa_monitor_CPPFLAGS = -I$(top_srcdir)/drmaa_utils
+monitor_CPPFLAGS = -I$(top_srcdir)/drmaa_utils
 
 dist_sysconf_DATA = ll_drmaa.conf.example
Index: /trunk/ll_drmaa/ll_drmaa.conf.example
===================================================================
--- /trunk/ll_drmaa/ll_drmaa.conf.example	(revision 20)
+++ /trunk/ll_drmaa/ll_drmaa.conf.example	(revision 1)
@@ -1,3 +1,3 @@
-## $Id$
+## $Id: ll_drmaa.conf.example 220 2010-05-24 17:42:49Z mmatloka $
 ## ll_drmaa.conf.example - Sample ll_drmaa configuration file.
 
Index: /trunk/ll_drmaa/session.h
===================================================================
--- /trunk/ll_drmaa/session.h	(revision 20)
+++ /trunk/ll_drmaa/session.h	(revision 1)
@@ -1,3 +1,3 @@
-/* $Id$ */
+/* $Id: session.h 224 2010-05-25 08:48:28Z mamonski $ */
 /*
  * PSNC DRMAA for LL
Index: /trunk/ll_drmaa/job.c
===================================================================
--- /trunk/ll_drmaa/job.c	(revision 27)
+++ /trunk/ll_drmaa/job.c	(revision 1)
@@ -1,3 +1,3 @@
-/* $Id$ */
+/* $Id: job.c 227 2010-05-25 13:14:20Z mamonski $ */
 /*
  * PSNC DRMAA for LL
@@ -35,6 +35,4 @@
 
 #include <llapi.h>
-
-#define LL_DRMAA_MAX_MISSING_TIME (60)
 
 static void
@@ -202,7 +200,4 @@
 	self->last_update_time = time(NULL);
 
-        if( self->state >= DRMAA_PS_DONE )
-                fsd_cond_broadcast( &self->status_cond );
-
 	fsd_log_return(( "" ));
 }
@@ -292,37 +287,8 @@
 		}
 
-		data = ll_get_objs(job, LL_CM, NULL, &obj_count, &err_code);
+		data = ll_get_objs(job, LL_SCHEDD, NULL, &obj_count, &err_code);
 		if (data == NULL) {
-			if (err_code == LL_GET_OBJS_NO_OBJECTS_ERR)
-			  {
-				if (self->state != DRMAA_PS_UNDETERMINED) 
-				  {
-					fsd_log_info(("Job %s missing. Assuming finished", self->job_id));
-					self->state = DRMAA_PS_DONE;
-					self->exit_status = 0;
-                			fsd_cond_broadcast( &self->status_cond );
-				  }
-				else if (llself->missing_time == 0)
-				 {
-					llself->missing_time = time(NULL);
-					fsd_log_debug(("Job %s missing for the first time", self->job_id)); /* Job may not yet be visible in LL */
-                			fsd_cond_broadcast( &self->status_cond );
-				 }
-				else if (time(NULL) - llself->missing_time > LL_DRMAA_MAX_MISSING_TIME)
-				 {
-					fsd_log_error(("Job %s missing for more then %d seconds. Assuming failed", self->job_id, LL_DRMAA_MAX_MISSING_TIME)); 
-					/* Job may not yet be visible in LL */
-					self->state = DRMAA_PS_FAILED;
-					self->exit_status = -1;
-				 }
-				else
-				 {
-					fsd_log_debug(("Job %s still missing", self->job_id));
-				 }
-			  }
-			else
-			  {
-				fsd_log_error(("Code: %d,%d ll_get_objs() returns NULL. %s", err_code, lldrmaa_map_get_objs(err_code), lldrmaa_err_get_objs(err_code) ));
-			  }
+			fsd_log_debug(("Code: %d ll_get_objs() returns NULL. %s",lldrmaa_map_get_objs(err_code), lldrmaa_err_get_objs(err_code) ));
+			/* This error means that there is no info in LL_SCHEDD but this job have probably ended and will be detected by wait_thread. This won't be fsd_log_warning because displays too often during program execution */
 		} else {
 
@@ -346,7 +312,7 @@
 			}
 
-			llself->read_job_info(self, step_state, hold_type);
-
-			fsd_log_info(("Job %s LL State: %d -> DRMAA: %s", self->job_id, step_state, drmaa_job_ps_to_str(self->state)));
+			llself->read_job_info( self, step_state, hold_type);
+
+			fsd_log_info(("LL State: %d -> DRMAA: %s",step_state,drmaa_job_ps_to_str(self->state)));
 		}
 	}
@@ -386,5 +352,4 @@
 	self->super.control = lldrmaa_job_control;
 	self->super.update_status = lldrmaa_job_update_status;
-	self->missing_time = 0;
 	self->read_job_info_mon = lldrmaa_job_read_job_info_mon;
 	self->read_job_info = lldrmaa_job_read_job_info;
@@ -481,4 +446,139 @@
 		fprintf(fd,"# File created by LoadLeveler DRMAA. If no LL DRMAA applications are running you can delete this file\n");
 
+		/* job name */
+		value = jt->get_attr( jt, DRMAA_JOB_NAME );
+		if( value )
+		{
+			fprintf(fd,"# @ job_name = %s\n",value);
+			fsd_log_debug(("# @ job_name = %s",value));
+		}
+
+		/* job state at submit */
+		value = jt->get_attr( jt, DRMAA_JS_STATE );
+		if( value )
+	 	{
+			if( 0 == strcmp( value, DRMAA_SUBMISSION_STATE_ACTIVE ) )
+			{}
+			else if( 0 == strcmp( value, DRMAA_SUBMISSION_STATE_HOLD ) )
+			{
+				fprintf(fd,"# @ hold = user\n");
+				fsd_log_debug(("# @ hold = user"));
+			}
+			else
+				fsd_exc_raise_msg(
+					FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE,
+					"invalid value of drmaa_js_state attribute" );
+	 	}
+
+		TRY
+		{
+			const char *command = NULL;
+			char *command_expanded = NULL;
+			const char *const *i;
+			int j;
+
+			/* remote command */
+			command = jt->get_attr( jt, DRMAA_REMOTE_COMMAND );
+			if( command == NULL )
+				fsd_exc_raise_msg(
+						FSD_DRMAA_ERRNO_CONFLICTING_ATTRIBUTE_VALUES,
+						"drmaa_remote_command not set for job template"
+						);
+
+			command_expanded = expand->expand( expand, fsd_strdup(command), FSD_DRMAA_PH_HD | FSD_DRMAA_PH_WD );
+
+			fprintf(fd,"# @ executable = %s\n", command_expanded);
+			fsd_log_debug(("# @ executable = %s\n", command_expanded));
+
+			fsd_free(command_expanded);
+
+			/* arguments list */
+			vector = jt->get_v_attr( jt, DRMAA_V_ARGV );
+
+			if( vector )
+		 	{
+				fprintf(fd,"# @ arguments =");
+				fsd_log_debug(("# @ arguments ="));
+
+				for( i = vector, j = 2;  *i;  i++, j++ )
+				{
+					char *arg_expanded = expand->expand( expand, fsd_strdup(*i), FSD_DRMAA_PH_HD | FSD_DRMAA_PH_WD );
+
+					fprintf(fd," '%s'", arg_expanded);
+					fsd_log_debug(("%s", arg_expanded));
+
+					fsd_free(arg_expanded);
+				}
+			}
+
+			fprintf(fd," \n");
+		}
+		END_TRY
+
+		/* start time */
+		value = jt->get_attr( jt, DRMAA_START_TIME );
+		if( value )
+	 	{
+			char buf[30];
+			const time_t time_ll = fsd_datetime_parse( value );
+			struct tm temp;
+			localtime_r(&time_ll,&temp);
+ 			strftime(buf, sizeof(buf),"%m/%d/%Y %H:%M:%S", &temp );
+			fprintf(fd,"# @ startdate = %s\n", buf);
+			fsd_log_debug(("# @ startdate = %s", buf));
+			fsd_log_debug(( "\n  drmaa_start_time: %s -> %ld",	value, (long)time_ll ));
+		 }
+
+		/* environment */
+		vector = jt->get_v_attr( jt, DRMAA_V_ENV );
+		if( vector )
+		{
+			const char *const *i;
+
+			fprintf(fd,"# @ environment =");
+			fsd_log_debug(("# @ environment ="));
+			for( i = vector;  *i;  i++ )
+	 		{
+				fprintf(fd," %s;",*i);
+				fsd_log_debug((" %s;",*i));
+			}
+			fprintf(fd," \n");
+		 }
+
+		 /* wall clock time soft and hard limit */
+		{
+		 	const char *value2;
+			value = jt->get_attr( jt, DRMAA_WCT_SLIMIT );
+			value2 = jt->get_attr( jt, DRMAA_WCT_HLIMIT );
+			if( value && value2)
+			{
+				fprintf(fd,"# @ wall_clock_limit = %s,%s\n",value,value2);
+				fsd_log_debug(("# @ wall_clock_limit = %s,%s",value,value2));
+			}
+			else if (value)
+			{
+				fprintf(fd,"# @ wall_clock_limit = %s\n",value);
+				fsd_log_debug(("# @ wall_clock_limit = %s",value));
+			}
+			else if (value2)
+			{
+				fprintf(fd,"# @ wall_clock_limit = ,%s\n",value);
+				fsd_log_debug(("# @ wall_clock_limit = ,%s",value));
+			}
+		}
+
+		/* native specification */
+		value = jt->get_attr( jt, DRMAA_NATIVE_SPECIFICATION );
+		if( value )
+		{
+			char * temp = fsd_strdup(value);
+			temp = fsd_replace(temp,"@","\n# $"); /* infinite loop when try replace @ with # @ */
+			temp = fsd_replace(temp,"# $","# @ ");
+
+			fprintf(fd,"# Native specification:%s\n", temp);
+			fsd_log_debug(("Native specification:%s", temp));
+			fsd_free(temp);
+		}
+
 		/* job category */
 		value = jt->get_attr( jt, DRMAA_JOB_CATEGORY );
@@ -515,95 +615,4 @@
 		 	}
 	 	}
-
-		/* job name */
-		value = jt->get_attr( jt, DRMAA_JOB_NAME );
-		if( value )
-		{
-			fprintf(fd,"# @ job_name = %s\n",value);
-			fsd_log_debug(("# @ job_name = %s",value));
-		}
-
-		/* job state at submit */
-		value = jt->get_attr( jt, DRMAA_JS_STATE );
-		if( value )
-	 	{
-			if( 0 == strcmp( value, DRMAA_SUBMISSION_STATE_ACTIVE ) )
-			{}
-			else if( 0 == strcmp( value, DRMAA_SUBMISSION_STATE_HOLD ) )
-			{
-				fprintf(fd,"# @ hold = user\n");
-				fsd_log_debug(("# @ hold = user"));
-			}
-			else
-				fsd_exc_raise_msg(
-					FSD_DRMAA_ERRNO_INVALID_ATTRIBUTE_VALUE,
-					"invalid value of drmaa_js_state attribute" );
-	 	}
-
-		/* start time */
-		value = jt->get_attr( jt, DRMAA_START_TIME );
-		if( value )
-	 	{
-			char buf[30];
-			const time_t time_ll = fsd_datetime_parse( value );
-			struct tm temp;
-			localtime_r(&time_ll,&temp);
- 			strftime(buf, sizeof(buf),"%m/%d/%Y %H:%M:%S", &temp );
-			fprintf(fd,"# @ startdate = %s\n", buf);
-			fsd_log_debug(("# @ startdate = %s", buf));
-			fsd_log_debug(( "\n  drmaa_start_time: %s -> %ld",	value, (long)time_ll ));
-		 }
-
-		/* environment */
-		vector = jt->get_v_attr( jt, DRMAA_V_ENV );
-		if( vector )
-		{
-			const char *const *i;
-
-			fprintf(fd,"# @ environment =");
-			fsd_log_debug(("# @ environment ="));
-			for( i = vector;  *i;  i++ )
-	 		{
-				fprintf(fd," %s;",*i);
-				fsd_log_debug((" %s;",*i));
-			}
-			fprintf(fd," \n");
-		 }
-
-		 /* wall clock time soft and hard limit */
-		{
-		 	const char *value2;
-			value = jt->get_attr( jt, DRMAA_WCT_SLIMIT );
-			value2 = jt->get_attr( jt, DRMAA_WCT_HLIMIT );
-			if( value && value2)
-			{
-				fprintf(fd,"# @ wall_clock_limit = %s,%s\n",value,value2);
-				fsd_log_debug(("# @ wall_clock_limit = %s,%s",value,value2));
-			}
-			else if (value)
-			{
-				fprintf(fd,"# @ wall_clock_limit = %s\n",value);
-				fsd_log_debug(("# @ wall_clock_limit = %s",value));
-			}
-			else if (value2)
-			{
-				fprintf(fd,"# @ wall_clock_limit = ,%s\n",value);
-				fsd_log_debug(("# @ wall_clock_limit = ,%s",value));
-			}
-		}
-
-		/* native specification */
-		value = jt->get_attr( jt, DRMAA_NATIVE_SPECIFICATION );
-		if( value )
-		{
-			char * temp = fsd_strdup(value);
-			temp = fsd_replace(temp,"@","\n# $"); /* infinite loop when try replace @ with # @ */
-			temp = fsd_replace(temp,"# $","# @ ");
-
-			fprintf(fd,"# Native specification:%s\n", temp);
-			fsd_log_debug(("Native specification:%s", temp));
-			fsd_free(temp);
-		}
-
 
 
@@ -770,54 +779,4 @@
 				fprintf(fd,"# @ queue\n");
 				fsd_log_debug(("# @ queue"));
-				
-				fprintf(fd,"\n");
-				fprintf(fd,"echo >&2\n"); /* this line forces creation of stderr file */
-
-				TRY
-				{
-					const char *command = NULL;
-					char *command_expanded = NULL;
-					const char *const *i;
-					int j;
-
-					/* remote command */
-					command = jt->get_attr( jt, DRMAA_REMOTE_COMMAND );
-					if( command == NULL )
-						fsd_exc_raise_msg(
-								FSD_DRMAA_ERRNO_CONFLICTING_ATTRIBUTE_VALUES,
-								"drmaa_remote_command not set for job template"
-								);
-
-					command_expanded = expand->expand( expand, fsd_strdup(command), FSD_DRMAA_PH_HD | FSD_DRMAA_PH_WD );
-
-					fprintf(fd,"%s", command_expanded); /* we put the commmand at the end of script (instead of using @executable keyword
-										 in roder to avoid coping of the binary */
-					fsd_log_debug(("command = %s\n", command_expanded));
-
-					fsd_free(command_expanded);
-
-					/* arguments list */
-					vector = jt->get_v_attr( jt, DRMAA_V_ARGV );
-
-					if( vector )
-					{
-						fsd_log_debug(("arguments = "));
-
-						for( i = vector, j = 2;  *i;  i++, j++ )
-						{
-							char *arg_expanded = expand->expand( expand, fsd_strdup(*i), FSD_DRMAA_PH_HD | FSD_DRMAA_PH_WD );
-
-							fprintf(fd," '%s'", arg_expanded);
-							fsd_log_debug(("%s", arg_expanded));
-
-							fsd_free(arg_expanded);
-						}
-					}
-
-					fprintf(fd," \n");
-				}
-				END_TRY
-
-
 			}
 		}
Index: /trunk/README
===================================================================
--- /trunk/README	(revision 24)
+++ /trunk/README	(revision 1)
@@ -1,2 +1,233 @@
-The manual for the DRMAA for LoadLeveler is available at the project's wiki page:  
- * http://apps.man.poznan.pl/trac/ll-drmaa/wiki
+==========================
+PSNC DRMAA for LoadLeveler
+==========================
+
+:Author:        Michal Matloka <michal.matloka@student.put.poznan.pl>, Mariusz Mamonski <mamonski@man.poznan.pl>
+:Organization:  Poznan Supercomputing and Networking Center
+:Contact:       Mariusz Mamonski <mamonski@man.poznan.pl>, Michal Matloka <michal.matloka@student.put.poznan.pl>
+:Date:          $Date: 2009-05-05 16:09:52 +0200 (Tue, 05 May 2009) $
+:Version:       1.0.1
+:Revision:      $Revision: 220 $
+:Copyright:     Copyright (C) 2010  Poznan Supercomputing and Networking Center
+
+:Abstract:  This document describes installation, configuration and usage
+  of PSNC DRMAA for IBM  Tivoli Workload Scheduler LoadLeveler.
+
+.. meta::
+  :http-equiv=Content-Language: en
+  :http-equiv=Content-Type: application/xhtml+xml; charset=UTF-8
+  :description lang=en: Distributed Resource Management Application API 1.0 implementation for IBM LoadLeveler 
+  :keywords: DRMAA, Distributed Resource Management Application API, IBM Tivoli LoadLeveler, Poznan Supercomputing and Networking Center
+
+.. contents::
+
+.. default-role:: literal
+
+
+Introduction
+============
+
+PSNC DRMAA for LoadLeveler is an implementation of `Open Grid Forum`_ DRMAA_
+1.0 (Distributed Resource Management Application API) specification_
+for submission and control of jobs to `IBM Tivoli LoadLeveler`_.  Using DRMAA,
+grid applications builders, portal developers and ISVs can use the same
+high-level API to link their software with different cluster/resource
+management systems.
+
+This software also enables the integration of `SMOA Computing`_ with the
+underlying LoadLeveler system for remote multi-user job submission and control
+over Web Services.
+
+
+Installation
+============
+
+To compile and install the library just go to main source directory
+and type::
+
+  $ ./configure [options] && make
+  $ sudo make install
+
+The library was tested with LoadLeveler version 3.5. (for AIX operating systems).
+If you encountered any problems using the library on the different systems, please use 
+the contact e-mails for reporting the problem.
+
+Notable `./configure` script options:
+
+  `--with-ll-inc` LL_INCLUDE_PATH
+    Path to LL header files (i.e. directory containing `llapi.h` ). By default the library tries 
+    to guess the `LL_INCLUDE_PATH` and `LL_LIBRARY_PATH` based on location
+    of the `llsubmit` executable.
+
+  `--with-ll-lib` LL_LIBRARY_PATH
+    Path to LL libraries (i.e. directory containing `libllapi.a` ).
+
+  `--prefix` INSTALLATION_DIRECTORY
+    Root directory where PSNC DRMAA for LoadLeveler shall be installed.
+    When not given library is installed alongside with LL.
+
+  `--enable-debug`
+    Compiles library with debugging enabled (with debugging symbols not
+    stripped, without optimizations, and with many log messages enabled).
+    Useful when you are to debug DRMAA enabled application
+    or investigate problems with DRMAA library itself.
+
+There are no unusual requirements for basic usage of library: ANSI C
+compiler and standard make program should suffice.  If you have taken
+sources directly from SVN repository or wish to run test-suite you would
+need additional `developer tools`_.  For further information regarding
+GNU build system see the INSTALL file.
+
+
+Configuration
+=============
+
+During DRMAA session initialization (`drmaa_init`) library tries to
+read its configuration parameters from locations: `/etc/ll_drmaa.conf`,
+`~/.ll_drmaa.conf` and from file given in `LL_DRMAA_CONF` environment
+variable (if set to non-empty string).  If multiple configuration
+sources are present then all configurations are merged with values
+from user-defined files taking precedence (in following order:
+`$LL_DRMAA_CONF`, `~/.ll_drmaa.conf`, `/etc/ll_drmaa.conf`).
+
+Currently recognized configuration parameters are:
+
+  cache_job_state
+    According to DRMAA specification every `drmaa_job_ps()` call should
+    query DRM system for job state.  With this option one may optimize
+    communication with DRM.  If set to positive integer `drmaa_job_ps()`
+    returns remembered job state without communicating with DRM for
+    `cache_job_state` seconds since last update.  By default library
+    conforms to specification (no caching will be performed).
+
+    Type: integer, default: 0
+
+  job_categories
+    Dictionary of job categories.  It's keys are job categories names
+    mapped to `native specification`_ strings.  Attributes set by job
+    category can be overridden by corresponding DRMAA attributes or
+    native specification.  Special category name `default` is used when
+    `drmaa_job_category` job attribute was not set.
+
+    Type: dictionary with string values, default: empty dictionary
+	
+  terminate_job_on_vacated
+	Attribute which determines if job should be terminated just after entering the `vacated` state.
+	
+	Type: integer, default: 1
+
+Configuration file syntax
+-------------------------
+
+Configuration file is in form a dictionary.
+Dictionary is set of zero or more key-value pairs.
+Key is a string while value could be a string, an integer
+or another dictionary.
+::
+
+  configuration: dictionary | dictionary_body
+  dictionary: '{' dictionary_body '}'
+  dictionary_body: (string ':' value ',')*
+  value: integer | string | dictionary
+  string: unquoted-string | single-quoted-string | double-quoted-string
+  unquoted-string: [^ \t\n\r:,0-9][^ \t\n\r:,]*
+  single-quoted-string: '[^']*'
+  double-quoted-string: "[^"]*"
+  integer: [0-9]+
+
+
+Native specification
+====================
+
+DRMAA interface allows to pass DRM dependent job submission options.
+Those options may be specified directly by setting `drmaa_native_specification` job
+template attribute or indirectly by the `drmaa_job_category` job template attribute. 
+The legal format of the native options looks like::
+
+  @ll_cmd_keyword1 = value @ll_cmd_keyword2 = value1 value2 value3 
+
+where the `ll_cmd_keyword` can be any of the `keyword`_ accepted by the LoadLeveler. It is user
+responsibility to provide legal combination of the `drmaa_native_specification`/`drmaa_job_category`
+and the other DRMAA attributes.
+
+Release notes
+=============
+ * 1.0.1 - first public release
+
+Known bugs and limitations
+--------------------------
+
+Library covers all `DRMAA 1.0 specification`_ with exceptions listed
+below.  It was successfully tested with `IBM Tivoli LoadLeveler`_ 3.5.0.5 on AIX
+OS and passes 43/44 tests of the `official DRMAA test-suite`_. All mandatory and
+nearly all optional job attributes (except job run duration soft limit, job run duration hard limit, 
+drmaa_transfer_files and drmaa_deadline_time) are implemented.
+
+Known limitations:
+
+ * `drmaa_control()` - `DRMAA_CONTROL_RESUME` and `DRMAA_CONTROL_SUSPEND` are not implemented as suspending jobs in LoadLeveler requires administrator privileges. 
+
+.. note:: There are plans, depending on the end users feedback, to implement the RESUME/SUSPEND functionality by leveraging the checkpointing mechanism.
+
+Authors
+-------
+
+The library was developed by:
+
+ * Michal Matloka <michal.matloka@student.put.poznan.pl> - core implementation
+ * Mariusz Mamonski <mamonski@man.poznan.pl> - AIX portability issues
+
+This library relies heavily on the *Fedstage DRMAA utils* code developed by:
+
+ * Lukasz Ciesnik <lukasz.ciesnik@gmail.com>.
+
+Acknowledgments
+---------------
+We would like to thank `Louisiana Optical Network Initiative`_ for providing us access to the clusters managed by LoadLeveler.
+
+Developer tools
+---------------
+Although not needed for library user the following tools may be required
+if you intend to develop PSNC DRMAA for LoadLeveler:
+
+ * GNU autotools (autoconf, automake, libtool),
+ * Bison_ parser generator,
+ * Docutils_ for processing this `README`,
+ * LaTeX_ for creating documentation in PDF format,
+ * Doxygen_ for generating source code documentation.
+
+.. _Bison:     http://www.gnu.org/software/bison/
+.. _Docutils:  http://docutils.sourceforge.net/
+.. _LaTeX:     http://www.latex-project.org/
+.. _Doxygen:   http://www.stack.nl/~dimitri/doxygen/
+.. _DRMAA: http://www.drmaa.org/
+.. _Open Grid Forum: http://www.gridforum.org/
+.. _DRMAA 1.0 specification: http://www.ogf.org/documents/GFD.133.pdf
+.. _specification: http://www.ogf.org/documents/GFD.133.pdf
+.. _Official DRMAA test-suite: http://drmaa.org/testsuite.php
+.. _SMOA Computing: http://larix.man.poznan.pl/wiki/SMOA_Computing
+.. _IBM Tivoli LoadLeveler: http://www-03.ibm.com/systems/software/loadleveler/index.html
+.. _keyword: http://publib.boulder.ibm.com/infocenter/clresctr/vxrx/topic/com.ibm.cluster.loadl.doc/loadl33/am2ug30223.html#jobkey
+.. _Louisiana Optical Network Initiative: http://loni.org/
+
+
+License
+=======
+
+Copyright (C) 2009-2010  Poznan Supercomputing and Networking Center 
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+.. vim700: spell spelllang=en
+.. vim: ft=rst
+.. vim: ts=2 sw=2 et
Index: /trunk/m4/ax_docutils.m4
===================================================================
--- /trunk/m4/ax_docutils.m4	(revision 20)
+++ /trunk/m4/ax_docutils.m4	(revision 1)
@@ -1,3 +1,3 @@
-# $Id$
+# $Id: ax_docutils.m4 92 2010-04-08 15:40:49Z mamonski $
 #
 # SYNOPSIS
Index: /trunk/m4/ax_ll.m4
===================================================================
--- /trunk/m4/ax_ll.m4	(revision 26)
+++ /trunk/m4/ax_ll.m4	(revision 1)
@@ -1,3 +1,3 @@
-# $Id$
+# $Id: ax_ll.m4 208 2010-05-20 10:24:54Z mmatloka $
 #
 # SYNOPSIS
@@ -45,10 +45,9 @@
 	LL_INCLUDES="-I${with_ll_inc}"
 else
-	LLSUBMIT_PATH=`readlink -f $(which llsubmit)`
+	LLSUBMIT_PATH=`which llsubmit`
 	if test x"$LLSUBMIT_PATH" != x; then
 		LLSUBMIT_DIR=`dirname $LLSUBMIT_PATH`
 		LL_HOME=`dirname $LLSUBMIT_DIR`
 		LL_INCLUDES="-I$LL_HOME/include"
-		AC_MSG_NOTICE([no --with-ll-inc given. Using llsubmit path based guess: $LL_INCLUDES])
 	else
 		ax_ll_msg="no llsubmit in PATH"
@@ -62,5 +61,5 @@
 if test x$with_ll_lib == x; then
 	
-	LLSUBMIT_PATH=`readlink -f $(which llsubmit)`
+	LLSUBMIT_PATH=`which llsubmit`
 	
 	if test x"$LLSUBMIT_PATH" != x; then
@@ -68,5 +67,4 @@
 		LL_HOME=`dirname $LLSUBMIT_DIR`
 		with_ll_lib=$LL_HOME/lib
-		AC_MSG_NOTICE([no --with-ll-lib given. Using llsubmit path based guess: $with_ll_lib])
 	else
 		ax_ll_msg="no llsubmit in PATH"
Index: /trunk/m4/acx_pthread.m4
===================================================================
--- /trunk/m4/acx_pthread.m4	(revision 20)
+++ /trunk/m4/acx_pthread.m4	(revision 1)
@@ -1,3 +1,3 @@
-dnl $Id$
+dnl $Id: acx_pthread.m4 92 2010-04-08 15:40:49Z mamonski $
 
 dnl
Index: /trunk/m4/ax_gcc_warnings.m4
===================================================================
--- /trunk/m4/ax_gcc_warnings.m4	(revision 20)
+++ /trunk/m4/ax_gcc_warnings.m4	(revision 1)
@@ -1,3 +1,3 @@
-# $Id$
+# $Id: ax_gcc_warnings.m4 92 2010-04-08 15:40:49Z mamonski $
 #
 # SYNOPSIS
Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 24)
+++ /trunk/configure.ac	(revision 1)
@@ -1,5 +1,5 @@
-AC_INIT([PSNC DRMAA for LoadLeveler], [1.0.0], [mamonski@man.poznan.pl], [ll_drmaa])
+AC_INIT([PSNC DRMAA for LoadLeveler], [1.0.1], [mamonski@man.poznan.pl], [ll_drmaa])
 AC_PREREQ(2.58)
-AC_REVISION([$Id$])
+AC_REVISION([$Id: configure.ac 228 2010-05-25 15:34:28Z mamonski $])
 AC_COPYRIGHT([
 PSNC DRMAA for LoadLeveler
@@ -21,6 +21,6 @@
 LL_DRMAA_MAJOR=1
 LL_DRMAA_MINOR=0
-LL_DRMAA_MICRO=0
-LL_DRMAA_VERSION_INFO=1:0:0
+LL_DRMAA_MICRO=1
+LL_DRMAA_VERSION_INFO=1:1:0
 AC_SUBST([LL_DRMAA_MAJOR])
 AC_SUBST([LL_DRMAA_MINOR])
@@ -197,4 +197,5 @@
 	Makefile
 	ll_drmaa/Makefile
+	doc/Makefile
 ])
 AC_CONFIG_HEADERS([config.h])
Index: unk/AUTHORS
===================================================================
--- /trunk/AUTHORS	(revision 19)
+++ 	(revision )
@@ -1,9 +1,0 @@
-$Id: AUTHORS 746 2008-03-06 15:07:58Z lukasz $
-
-Author:
-	Michal Matloka <michal.matloka@student.put.poznan.pl>
-	Mariusz Mamonski <mamonski@man.poznan.pl>
-
-Send bug reports to:
-	Mariusz Mamonski <mamonski@man.poznan.pl>
-	Michal Matloka <michal.matloka@student.put.poznan.pl>
