Hexagon Geospatial
MENU

Spatial Modeler

Discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 6
Registered: ‎04-04-2016
Accepted Solution

Problems running a spatial model in 64-bit mode

Hi, 

 

I am trying to run a spatial model in 64-bit, because the model I am using will exceed the memory limit for 32-bit processes (of somewhere close to 3.4GB). To do this, I am calling the smprocess.exe (64bit) in commandline, and I am using the command as is also used when trying to run a batch command.

 

When I execute this command while Erdas Imagine is not started, I can see that the spatial modeler process (64bit) is started, however it exits immediately after, without running anything. It doesn't matter whether I am using cmd.exe in 32-bit or 64-bit.

When I execute the command while Erdas Imagine is started, the spatial model will be executed. Only the spatial modeler process is now started in 32-bit mode, which results in that the model will exit because there is not enough memory. 

When I execute the command while calling smprocess.exe (in 32-bit), without starting Erdas Imagine, the spatial modeler process will start, but will exit because it will hit the memory limit again.

 

How can I start the spatial modeler process in 64-bit?

I am using Erdas Imagine 16.1 on Windows 10.

 

This is the command I use in commandline (from the 'C:\Program Files\Hexagon\ERDAS IMAGINE 2016\bin\x64URelease' directory):

smprocess {path to .gmdx file} 'Directory of SPOT products={directory of SPOT products}' 'Wildcard for RPC_SPOT*.XML files=RPC_SPOT*MS*.XML' 'Wildcard for DIM_SPOT*.XML files=DIM_SPOT*MS*.XML' 'Include subdirectories?=true' 'AHN 0.5m={AHN_file}' 'Output Directory={Output Directory}' 'JulianDays with Earth-Sun Distances file={csv file}'

 

Ofcourse, I replace everything between { } into required paths.

 

 

 

Thanks in advance!

 

Kind regards, 

 

Hester Bijen

 

Technical Evangelist
Posts: 714
Registered: ‎10-01-2015

Re: Problems running a spatial model in 64-bit mode

Hi Hester,

 

You can execute a Spatial Model in 64-bit mode from within the ERDAS IMAGINE user interface by using the following option:

 

Spatial Modeler tab / Execute tab / Run in Background

 

Cheers

 

Ian

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Occasional Contributor
Posts: 6
Registered: ‎04-04-2016

Re: Problems running a spatial model in 64-bit mode

Hi Ian, 

 

Thank you for your fast response. 

I have tried this, but after trying to start smprocess in 64-bit, again the model will run in 32-bit.

 

Here is my session log message:

 

28/09/17 15:01:08 SessionMgr(17124): Connection success for the external process 'eWkspace'
28/09/17 15:01:42 C:/Program Files/Hexagon/ERDAS IMAGINE 2016/bin/x64URelease/smprocess.exe C:/Users/Bijen/AppData/Local/Temp/SM_GMDX_009840 -temp
28/09/17 15:01:51 C:/Program Files/Hexagon/ERDAS IMAGINE 2016/bin/Win32Release/smprocess.exe C:/Users/Bijen/AppData/Local/Temp/SM_GMDX_009840

 

I do make use of a python script inside the model, which is in 32-bit mode in order to work in the spatial modeler. Could this be the problem?

 

Kind regards, 

 

Hester Bijen

Technical Evangelist
Posts: 714
Registered: ‎10-01-2015

Re: Problems running a spatial model in 64-bit mode

Is your model running a funtion or accessing a datatype whch is forcing the process to fall back to 32-bit mode? For example - esri Grid support if via 32-bit dlls, so trying to run a model which reads esri Grid data will always force the process to 32-bit. 

 

Oh - just saw that you say you are running a 32-bit python process as part of the model - yes, the process has to cater to the lowest common denominator and therefore will fall back to 32-bit.

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Occasional Contributor
Posts: 6
Registered: ‎04-04-2016

Re: Problems running a spatial model in 64-bit mode

Do you know then if it is possible to use a 64-bit python process inside the spatial model? I thought this was not possible.

My model kind of depends on this python operator, since I use it to read out metadata variables from a DIMAP-2 (xml) file.

Now it is kind of a useless model...

 

Kind regards, 

 

Hester Bijen

Technical Evangelist
Posts: 714
Registered: ‎10-01-2015

Re: Problems running a spatial model in 64-bit mode

Hi Hester,

 

Just checked the System Requirements section of the Release Guide for v16.1 and according to that you should be able to use "Python 3.4 (32-bit is highly recommended for best compatibility, but 64-bit is Viable for background processing)."

 

You might also want to go over to the Ideas board and make a suggestion to have a "Read Sensor Metadata" operator which reads DIMAP v2 metadata into a Dictionary :-)

 

Cheers

 

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Occasional Contributor
Posts: 6
Registered: ‎04-04-2016

Re: Problems running a spatial model in 64-bit mode

Okay, but I am not using python for background processing now, since I am using it as an operator in the spatial modeler. 

Do you know by any chance if in the new release of erdas imagine 2018 python 64bit operators are supported in the spatial modeler?

 

Thank you!

 

Cheers, 

 

Hester Bijen

Highlighted
Technical Evangelist
Posts: 714
Registered: ‎10-01-2015

Re: Problems running a spatial model in 64-bit mode

[ Edited ]

Hi Hester,

 

 

Perhaps I'm misunderstanding what you are asking. If you use the "Run in Background" option to execute a spatial model which includes 64-bit operators (including python based ones), the process should be capable of running 64-bit (so long as everything being called is 64-bit).

 

And yes, ERDAS IMAGINE 2018's ribbon interface (including the Spatial Model Editor) runs 64-bit, so both foreground and background execution of spatial models will run 64-bit (but again - only if everything they are calling is capable of running 64-bit). So really there should be no difference in background processing between ERDAS IMAGINE 2016 v16.1 and ERDAS IMAGINE 2018 - it should be possible in both.

 

Cheers

 

Ian Anderson
Chief Product Owner, Desktop Remote Sensing
Hexagon Geospatial
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.