<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
I've been using *.mapcalc_start to do some simple parallel processing in the i.pansharpen module and in r.landscape.evol. My understanding previously has been that *.mapcalc_start returns a Popen object that can be directed to wait to finish (like *.start_command),
 allowing multiple mapcalc operations to be initiated on multiple cores. 
<div class=""><br class="">
</div>
<div class="">But when running r.landscape.evol on another computer, it is acting like mapcalc is not waiting to finish in spite of the *.wait() commands. 
<div class=""><br class="">
</div>
<div class="">The description in the programmer's manual is not clear to me on this (see below). In one place, it says it does not wait to finish and in the example it says it does wait. </div>
<div class=""><br class="">
</div>
<div class="">Can anyone clarify this?</div>
<div class=""><br class="">
</div>
<div class="">Thanks</div>
<div class="">Michael<br class="">
<div class="">
<div class=""><br class="">
</div>
<div class="">==== from programmer's manual ====</div>
<div class=""><br class="">
</div>
<div class="">script.raster.mapcalc_start(exp, quiet=False, verbose=False, overwrite=False, seed=None, env=None, **kwargs)[source]<br class="">
Interface to r.mapcalc, doesn’t wait for it to finish, returns Popen object.<br class="">
<br class="">
>>> output = 'newele'<br class="">
>>> input = 'elevation'<br class="">
>>> expr1 = '"%s" = "%s" * 10' % (output, input)<br class="">
>>> expr2 = '...'   # etc.<br class="">
>>> # launch the jobs:<br class="">
>>> p1 = mapcalc_start(expr1)<br class="">
>>> p2 = mapcalc_start(expr2)<br class="">
...<br class="">
>>> # wait for them to finish:<br class="">
>>> p1.wait()<br class="">
0<br class="">
>>> p2.wait()<br class="">
1<br class="">
<div class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<span class="Apple-style-span" style="border-collapse: separate; orphans: 2; text-indent: 0px; widows: 2; border-spacing: 0px;">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;" class="">
____________________</div>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">C. Michael Barton</font></div>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">Director, Center for Social Dynamics & Complexity </font></div>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">Professor of Anthropology, School of Human Evolution & Social Change</font></div>
<div class=""><font face="Helvetica" size="3" class="">Head, Graduate Faculty in Complex Adaptive Systems Science</font></div>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">Arizona State University</font></div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<font face="Helvetica" size="3" class=""><font class="">voice:  </font><font class="">480-965-6262 (SHESC), 480-965-8130/727-9746 (CSDC)</font><br class="">
<font class="">fax: 480-965-7671 (SHESC),  480-727-0709 (CSDC)</font><br class="">
</font>
<div style="font-variant: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<font face="Helvetica" size="3" class="">www: <a href="http://www.public.asu.edu/~cmbarton" class="">
http://www.public.asu.edu/~cmbarton</a>, <a href="http://csdc.asu.edu" class="">http://csdc.asu.edu</a></font></div>
<br class="">
</div>
<br class="">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
</span><br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</div>
</div>
</div>
</body>
</html>