Index: /issm/trunk-jpl/src/m/coordsystems/gmtmask.m
===================================================================
--- /issm/trunk-jpl/src/m/coordsystems/gmtmask.m	(revision 21940)
+++ /issm/trunk-jpl/src/m/coordsystems/gmtmask.m	(revision 21941)
@@ -31,5 +31,7 @@
 	%First, write our lat,long file for gmt:
 	nv=length(lat);
-	dlmwrite('./all_vertices.txt',[long lat (1:nv)'],'delimiter','\t','precision',10);
+	filename = ['all_vertices-' num2str(feature('GetPid')) '.txt']
+	dlmwrite(filename,[long lat (1:nv)'],'delimiter','\t','precision',10);
+
 
 	%Avoid bypassing of the ld library path by Matlab (:()
@@ -40,5 +42,5 @@
 
 	%figure out which vertices are on the ocean, which one on the continent:
-	[status,result] = system('gmt gmtselect ./all_vertices.txt -h0 -Df -R0/360/-90/90  -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt');
+	[status,result] = system(['gmt gmtselect ./' filename ' -h0 -Df -R0/360/-90/90  -A0 -JQ180/200 -Nk/s/s/k/s > ./oce_vertices.txt']);
 	if status~=0,
 		error(result);
@@ -64,4 +66,4 @@
 	mask(oce_vertices)=1;
 	
-	system('rm -rf ./all_vertices.txt ./oce_vertices.txt ./gmt.history');
+	system(['rm -rf ./' filename ' ./oce_vertices.txt ./gmt.history']);
 	if ~recursive, disp(sprintf('gmtmask: done')); end;
