Index: /issm/trunk/cron/nightlyrun.sh
===================================================================
--- /issm/trunk/cron/nightlyrun.sh	(revision 1854)
+++ /issm/trunk/cron/nightlyrun.sh	(revision 1855)
@@ -138,5 +138,4 @@
 fi
 
-
 #Launch matlab and the nightly run script
 mktemp matlaberror.log
@@ -149,5 +148,5 @@
 	%An error occured, get report and exit
 	message=getReport(me)
-	fid=fopen('matlaberror.log', 'wt');
+	fid=fopen([ISSM_DIR '/matlaberror.log'], 'wt');
 	fprintf(fid,'Matlab error occured in: %s\n',pwd);                                                                                                       
 	fprintf(fid,'%s',message);                                                                                                                              
@@ -157,5 +156,5 @@
 EOF
 
-matlab -wait -nojvm -nosplash  -r matlab_run -logfile nightlylong.log
+matlab -nojvm -nosplash  -r matlab_run -logfile nightlylong.log
 
 #removed unused lines to deal with a smaller file
Index: /issm/trunk/cron/report.sh
===================================================================
--- /issm/trunk/cron/report.sh	(revision 1854)
+++ /issm/trunk/cron/report.sh	(revision 1855)
@@ -50,4 +50,7 @@
 FOOTER_STYLE='width="800px"  cellpadding="10"'
 FOOTER_FONT='style="color:#404040; font-family:Arial, Verdana, Tahoma; font-size:12px; font-weight: normal;" align="center"'
+
+MATLAB_STYLE='width="820px"'
+MATLAB_FONT='style="color:#404040; font-family:Arial, Verdana, Tahoma; font-size:14px; font-weight: normal;" align="left"'
 
 #build report.html
@@ -120,4 +123,11 @@
 END
 
+#Matlab error report
+cat << END > matlaberror.html
+<table $H2_STYLE><tr><td $H2_FONT>Matlab error</td></tr></table>
+<table $MATLAB_STYLE><tr><td $MATLAB_FONT>
+<pre>$(more matlaberror.log)</pre>
+</td></tr></table>
+END
 
 #report content
@@ -190,4 +200,5 @@
 END
 else
+	mktemp content.html
 	for  package in "macayeal" "ice" "cielo_serial" "cielo_parallel"; do
 		rm $package.log
@@ -203,16 +214,9 @@
 
 #concatenate files
-if [ $IS_INSTALL -eq 1 ];
-then
-	if [ $IS_RUN -eq 1 ];
-	then
-		cat summary.html content.html footer.html > report.html
-		rm  summary.html content.html footer.html
-	else
-		cat summary.html footer.html > report.html
-		rm  summary.html footer.html
-	fi
-else
-	cat summary.html footer.html > report.html
-	rm  summary.html footer.html
-fi
+if [ $IS_RUN -eq 0 ] || [ $IS_END -eq 0 ];
+then
+	cat summary.html matlaberror.html content.html footer.html > report.html
+else
+	cat summary.html                  content.html footer.html > report.html
+fi
+rm  summary.html content.html footer.html matlaberror.html
