|
|
|
Juan Manuel Barreneche
|
Dear users,
I got this problem and i don't have a clue of what it could be happening... The context: i'm running a loop in which i extract information from a raster map (I work with GRASS and R, using spgrass6 package), and rearrange it to create a matrix. I've tried it with small maps and it works smoothly, but in large maps I have to resort to saving data in the hard disk regularly in order to avoid the "cannot allocate vector of size..." problem (builted in the loop itself). Even so, the message "address (nil), cause 'memory not mapped'" appeared, and i really don't have a clue of what it means. I run R 2.7.0 on openSUSE 10.2 If anyone can be of any help, it'll be greatly appreciated... below I'm writing the output i got (and the R.Version() output...) thank you, Juan <grass output> Null cells excluded from cost evaluation. Source map is: Floating point (double) cell type 189 rows, 178 cols Creating some temporary files Reading riosypondas3000 100% Initializing output 100% Finding cost path Writing nombre Double cell type. Writing... 100% Peak cost value: 13.614127 Creating BIL support files... Header File = /home/mastermind/GRASSDATA//yacare1/jmb/.tmp/SpongeBob/nombre.hdr World File = /home/mastermind/GRASSDATA//yacare1/jmb/.tmp/SpongeBob/nombre.wld Exporting raster as double values (bytes=8) Using the current region settings... north=6681799.617727 south=6115500.667945 east=756812.903880 west=223200.856418 r=189 c=178 100% <end of grass output> *** caught segfault *** address (nil), cause 'memory not mapped' Traceback: 1: system("g.proj -j -f", intern = TRUE, ignore.stderr = ignore.stderr) 2: ifelse(.Platform$OS.type == "windows", projstr <- system("g.proj -j -f", intern = TRUE), projstr <- system("g.proj -j -f", intern = TRUE, ignore.stderr = ignore.stderr)) 3: getLocationProj() 4: nchar(projargs) 5: CRS(getLocationProj()) 6: readRAST6("nombre") 7: dist.grass(matrizPaisaje.riosypondas3000, "riosypondas3000", direct = "/home/mastermind/r/distancias", division = 17) 8: eval(expr, envir, enclos) 9: eval(parse(text = sprintf("dist.%s <<- dist.grass(matrizPaisaje.%s, '%s', direct='%s', division=%s)", i, i, i, direct, division))) 10: dist.grass.loop(c("riosypondas3000", "maxent3000", "alturas3000.2"), direct = "/home/mastermind/r/distancias", division = 17) 11: eval(expr, envir, enclos) 12: eval(expr, envir = loc.frame) 13: system.time(dist.grass.loop(c("riosypondas3000", "maxent3000", "alturas3000.2"), direct = "/home/mastermind/r/distancias", division = 17)) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace > R.Version() $platform [1] "i686-pc-linux-gnu" $arch [1] "i686" $os [1] "linux-gnu" $system [1] "i686, linux-gnu" $status [1] "" $major [1] "2" $minor [1] "7.0" $year [1] "2008" $month [1] "04" $day [1] "22" $`svn rev` [1] "45424" $language [1] "R" $version.string [1] "R version 2.7.0 (2008-04-22)" _______________________________________________ grass-stats mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-stats |
||||||||||||||||
|
Juan Manuel Barreneche
|
just to mention that the loop was already running for about 20 hours...
Juan On Tue, Aug 19, 2008 at 6:31 PM, Juan Manuel Barreneche <[hidden email]> wrote:
_______________________________________________ grass-stats mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-stats |
||||||||||||||||
|
Roger Bivand
|
On Tue, 19 Aug 2008, Juan Manuel Barreneche wrote:
> just to mention that the loop was already running for about 20 hours... This question was also posted to the r-help list, where it does not belong. The thread will continue here (cross-posting is not a good idea). The messages so far do not contain information about what is happening, other than that a system() call from the R side, provoking an issue in running a GRASS module, should not bring R down. I feel that the general workflow is not adequate, and that very possibly the same instance of R should not be left running (script the other way round from the shell or similar). Think of a shell or Python script issuing commands to GRASS and R in turn, accumulating intermediate results in RData files. If you have to stay with your current workflow design, start R with -d gdb to get a backtrack of the problem in the compiled code. Make sure that ignore.stderror is FALSE so that error messages from GRASS modules are visible. Roger > > Juan > > On Tue, Aug 19, 2008 at 6:31 PM, Juan Manuel Barreneche > <[hidden email]>wrote: > >> Dear users, >> I got this problem and i don't have a clue of what it could be happening... >> >> The context: i'm running a loop in which i extract information from a >> raster map (I work with GRASS and R, using spgrass6 package), and rearrange >> it to create a matrix. I've tried it with small maps and it works smoothly, >> but in large maps I have to resort to saving data in the hard disk regularly >> in order to avoid the "cannot allocate vector of size..." problem (builted >> in the loop itself). >> >> Even so, the message "address (nil), cause 'memory not mapped'" appeared, >> and i really don't have a clue of what it means. >> >> I run R 2.7.0 on openSUSE 10.2 >> >> If anyone can be of any help, it'll be greatly appreciated... below I'm >> writing the output i got (and the R.Version() output...) >> >> thank you, >> >> Juan >> >> <grass output> >> Null cells excluded from cost evaluation. >> Source map is: Floating point (double) cell type >> 189 rows, 178 cols >> Creating some temporary files >> Reading riosypondas3000 >> 100% >> Initializing output >> 100% >> Finding cost path >> Writing nombre >> Double cell type. >> Writing... >> 100% >> Peak cost value: 13.614127 >> Creating BIL support files... >> Header File = >> /home/mastermind/GRASSDATA//yacare1/jmb/.tmp/SpongeBob/nombre.hdr >> World File = >> /home/mastermind/GRASSDATA//yacare1/jmb/.tmp/SpongeBob/nombre.wld >> Exporting raster as double values (bytes=8) >> Using the current region settings... >> north=6681799.617727 >> south=6115500.667945 >> east=756812.903880 >> west=223200.856418 >> r=189 >> c=178 >> 100% >> <end of grass output> >> >> *** caught segfault *** >> address (nil), cause 'memory not mapped' >> >> Traceback: >> 1: system("g.proj -j -f", intern = TRUE, ignore.stderr = ignore.stderr) >> 2: ifelse(.Platform$OS.type == "windows", projstr <- system("g.proj -j >> -f", intern = TRUE), projstr <- system("g.proj -j -f", intern = >> TRUE, ignore.stderr = ignore.stderr)) >> 3: getLocationProj() >> 4: nchar(projargs) >> 5: CRS(getLocationProj()) >> 6: readRAST6("nombre") >> 7: dist.grass(matrizPaisaje.riosypondas3000, "riosypondas3000", direct >> = "/home/mastermind/r/distancias", division = 17) >> 8: eval(expr, envir, enclos) >> 9: eval(parse(text = sprintf("dist.%s <<- dist.grass(matrizPaisaje.%s, >> '%s', direct='%s', division=%s)", i, i, i, direct, division))) >> 10: dist.grass.loop(c("riosypondas3000", "maxent3000", >> "alturas3000.2"), direct = "/home/mastermind/r/distancias", division = >> 17) >> 11: eval(expr, envir, enclos) >> 12: eval(expr, envir = loc.frame) >> 13: system.time(dist.grass.loop(c("riosypondas3000", "maxent3000", >> "alturas3000.2"), direct = "/home/mastermind/r/distancias", division = >> 17)) >> >> Possible actions: >> 1: abort (with core dump, if enabled) >> 2: normal R exit >> 3: exit R without saving workspace >> 4: exit R saving workspace >> >>> R.Version() >> $platform >> [1] "i686-pc-linux-gnu" >> >> $arch >> [1] "i686" >> >> $os >> [1] "linux-gnu" >> >> $system >> [1] "i686, linux-gnu" >> >> $status >> [1] "" >> >> $major >> [1] "2" >> >> $minor >> [1] "7.0" >> >> $year >> [1] "2008" >> >> $month >> [1] "04" >> >> $day >> [1] "22" >> >> $`svn rev` >> [1] "45424" >> >> $language >> [1] "R" >> >> $version.string >> [1] "R version 2.7.0 (2008-04-22)" >> >> > -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: [hidden email] _______________________________________________ grass-stats mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-stats Roger Bivand
Economic Geography Section Department of Economics Norwegian School of Economics and Business Administration Helleveien 30 N-5045 Bergen, Norway |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |