Hamish,<br><br><div class="gmail_quote">On Sun, Feb 24, 2013 at 1:41 AM, Hamish <span dir="ltr"><<a href="mailto:hamish_b@yahoo.com" target="_blank">hamish_b@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">Doug wrote:<br>
> Compiled with openmp and liblas?<br>
<br>
</div>fwiw I would not really recommend to compile with OpenMP support<br>
unless you are willing to help develop that. Most of it is fine I<br>
think, but the LU parts used by v.surf.rst and v.surf.bspline are<br>
not very efficient, overhead is like 70%. So you do get a little speedup verus single core, but use a lot of power to do it.<br>
(currently that spawns 10s of thousands of threads when it would be better to spawn nearer to the number of local CPU cores)<br>
<br></blockquote><div>I've been playing with generating surfaces at home on an 8 core AMD vishera system 3.5 ghz Ubuntu 12.04 system with G7  using this point layer:</div><div><br></div><div><div>+----------------------------------------------------------------------------+</div>

<div> | Name:            nc_2a                                                     |</div><div> | Mapset:          PERMANENT                                                 |</div><div> | Location:        nc_stpft                                                  |</div>

<div> | Database:        /data2/grass70_data                                       |</div><div> | Title:                                                                     |</div><div> | Map scale:       1:1                                                       |</div>

<div> | Name of creator: dnewcomb                                                  |</div><div> | Organization:                                                              |</div><div> | Source date:     Sat Feb 23 08:16:54 2013                                  |</div>

<div> | Timestamp (first layer): none                                              |</div><div> |----------------------------------------------------------------------------|</div><div> | Map format:      native                                                    |</div>

<div> |----------------------------------------------------------------------------|</div><div> |   Type of map: vector (level: 1)                                           |</div><div> |                                                                            |</div>

<div> |   Number of points:       73232338        Number of centroids:  0          |</div><div> |   Number of lines:        0               Number of boundaries: 0          |</div><div> |   Number of areas:        0               Number of islands:    0          |</div>

<div> |   Number of faces:        0               Number of kernels:    0          |</div><div> |   Number of volumes:      0               Number of holes:      0          |</div><div> |                                                                            |</div>

<div> |   Map is 3D:              Yes                                              |</div><div> |   Number of dblinks:      0                                                |</div><div> |                                                                            |</div>

<div> |   Projection: Lambert Conformal Conic                                      |</div><div> |                                                                            |</div><div> |               N:         694901.76    S:         482704.72                 |</div>

<div> |               E:         580721.99    W:         492486.01                 |</div><div> |               B:           1083.51    T:           5558.44                 |</div><div> |                                                                            |</div>

<div> |   Digitization threshold: 0                                                |</div><div> |   Comment:                                                                 |</div><div> |                                                                            |</div>

<div> +----------------------------------------------------------------------------+</div><div>(Sat Feb 23 09:49:39 2013) Command finished (34 sec) </div><div>----------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>

<div>I get the following 20ft resolution surface using v.usrf.bspline</div><div><br></div><div>---------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>

<div><a href="http://r.info">r.info</a> map=nc_2_bspline_cubic@PERMANENT                                         </div><div> +----------------------------------------------------------------------------+</div><div> | Layer:    nc_2_bspline_cubic@PERMANENT   Date: Sat Feb 23 19:13:29 2013    |</div>

<div> | Mapset:   PERMANENT                      Login of Creator: dnewcomb        |</div><div> | Location: nc_stpft                                                         |</div><div> | DataBase: /data2/grass70_data                                              |</div>

<div> | Title:    bicubic interpolation with Tykhonov regularization ( nc_2_bsplin |</div><div> | Timestamp: none                                                            |</div><div> |----------------------------------------------------------------------------|</div>

<div> |                                                                            |</div><div> |   Type of Map:  raster               Number of Categories: 0               |</div><div> |   Data Type:    DCELL                                                      |</div>

<div> |   Rows:         10568                                                      |</div><div> |   Columns:      4412                                                       |</div><div> |   Total Cells:  46626016                                                   |</div>

<div> |        Projection: Lambert Conformal Conic                                 |</div><div> |            N:     693610    S:     482260   Res: 19.99905375               |</div><div> |            E:     580722    W:     492486   Res: 19.99909338               |</div>

<div> |   Range of data:    min = 92.2649807704968  max = 5558.35850509857         |</div><div> |                                                                            |</div><div> |   Data Description:                                                        |</div>

<div> |    generated by v.surf.bspline                                             |</div><div> |                                                                            |</div><div> |   Comments:                                                                |</div>

<div> |    v.surf.bspline -z input="nc_2a@PERMANENT" layer="1" raster_output="n\   |</div><div> |    c_2_bspline_cubic" sie=40.0 sin=40.0 method="bicubic" lambda_i=0.01 \   |</div>
<div>
 |    solver="cholesky" maxit=200 error=0.000001 memory=3000                  |</div><div> |                                                                            |</div><div> +----------------------------------------------------------------------------+</div>

<div>(Sun Feb 24 19:53:17 2013) Command finished (0 sec)                             </div><div><br></div><div><br></div><div>subregion 920 of 920...</div><div>v.surf.bspline complete.</div><div>(Sun Feb 24 08:39:12 2013) Command finished (805 min 43 sec)  </div>

<div>----------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div><br></div><div>As you can see , the surface generation ran in 805 minutes.  I'm currently rerunning the analysis with maxit = 100 to see how long it takes with the iterations lowered. </div>

<div><br></div><div>Now with v.surf.rst, I generated the following grid:</div><div><br></div><div><br></div><div>---------------------------------------------------------------------------------------------------------------------------------------------------------------------</div>

<div>---------------------------------------------------------------------------+</div><div> | Layer:    nc_2_rst_npmin_120@PERMANENT   Date: Sat Feb 23 01:14:43 2013    |</div><div> | Mapset:   PERMANENT                      Login of Creator: dnewcomb        |</div>

<div> | Location: nc_stpft                                                         |</div><div> | DataBase: /data2/grass70_data                                              |</div><div> | Title:     ( nc_2_rst_npmin_120 )                                          |</div>

<div> | Timestamp: none                                                            |</div><div> |----------------------------------------------------------------------------|</div><div> |                                                                            |</div>

<div> |   Type of Map:  raster               Number of Categories: 0               |</div><div> |   Data Type:    FCELL                                                      |</div><div> |   Rows:         10568                                                      |</div>

<div> |   Columns:      4412                                                       |</div><div> |   Total Cells:  46626016                                                   |</div><div> |        Projection: Lambert Conformal Conic                                 |</div>

<div> |            N:     693610    S:     482260   Res: 19.99905375               |</div><div> |            E:     580722    W:     492486   Res: 19.99909338               |</div><div> |   Range of data:    min = -1.409014e+28  max = 7.890661e+27                |</div>

<div> |                                                                            |</div><div> |   Data Source:                                                             |</div><div> |    vector map nc_2@PERMANENT                                               |</div>

<div> |                                                                            |</div><div> |                                                                            |</div><div> |   Data Description:                                                        |</div>

<div> |    generated by v.surf.rst                                                 |</div><div> |                                                                            |</div><div> |   Comments:                                                                |</div>

<div> |    tension=40.000000, smoothing=0.100000                                   |</div><div> |    dnorm=215.219236, dmin=9.999527, zmult=1.000000                         |</div><div> |    segmax=40, npmin=120, rmsdevi=29786443112213122633433088.000000         |</div>

<div> |    zmin_data=1083.510000, zmax_data=9999.000000                            |</div><div> |    zmin_int=-14090138501368785958609092608.000000, zmax_int=78906611338755 |</div><div> |                                                                            |</div>

<div> |    v.surf.rst input="nc_2@PERMANENT" layer="1" elevation="nc_2_rst_npmi\   |</div><div> |    n_120" tension=40. segmax=40 npmin=120 dmin=9.999527 dmax=49.997634 \   |</div><div> |    zmult=1.0                                                               |</div>

<div> |                                                                            |</div><div> +----------------------------------------------------------------------------+</div><div>(Sat Feb 23 08:10:21 2013) Command finished (0 sec)                             </div>

<div><br></div><div><br></div><div><br></div><div>v.surf.rst complete.</div><div>(Sat Feb 23 17:29:55 2013) Command finished (458 min 33 sec)</div><div>-------------------------------------------------------------------------------------------------------------------------------------------------------------------                 </div>

</div><div><br></div><div>As you can see, it took only 458 minutes to generate the same resolution surface from the same input points.  On the 8 core system, it is using 650% of the cpu to process the data, bouncing  up and down 30% or so as it processes. </div>

<div><br></div><div> v.surf.bspline, on the other hand parses the data up into zones and uses 100% cpu up to the time it writes the individual zone out.  When it writes the zone out, it spikes up to 750% cpu.  For this vector set and grid extent, it generated 920 zones.</div>

<div><br></div><div>V.surf.rst seems to use much more memory than v.surf.bspline</div><div><br></div><div>I am of course, speaking as an end user who has not looked at the source code. ( I'm trying to back myself into learning C :-)) </div>

<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
For that matter I would not recommend that new users be<br>
encouraged to use development versions at all, unless they are<br>
willing to help develop it, or at least debug it. And if<br>
development nightly builds are made available, it should be made<br>
very clear that it could eat all your data, harm your dog, etc.<br>
<br></blockquote><div> </div><div>Agreed , and I plan on giving the output to other folks to check against the official state grid and the QA points.  If this is inefficient, I would really like to try it out after it was made more efficient :-)  Thanks for all the work! </div>

<div><br></div><div>Doug</div><div> </div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
best,<br>Hamish<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Doug Newcomb</div><div>USFWS</div><div>Raleigh, NC</div><div>919-856-4520 ext. 14 <a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a></div>

<div>---------------------------------------------------------------------------------------------------------</div><div>The opinions I express are my own and are not representative of the official policy of the U.S.Fish and Wildlife Service or Dept. of the Interior.   Life is too short for undocumented, proprietary data formats.</div>