PRO_CMN_ADJ_CFG.xml DistanceCalculation value not respected?

Issues related to runtime execution of algorithms in ADL

PRO_CMN_ADJ_CFG.xml DistanceCalculation value not respected?

Postby geoffc » Thu Jan 23, 2014 4:09 pm

I have been trying to run the VIIRS cloud mask in ADL 4.2 (ProEdrViirsMasksController.exe), and am
getting a core dump due to a segfault in the pixel adjacency code...

Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0x00002aaab57f6f52 in ProCmnAdjMODTable::getDistance (this=0x2610480, aRow1=2, aCol1=0, aRow2=2, aCol2=1) at ProCmnAdjMODTable.cpp:238
238                gridRow1 = gRowColData_[granIndex1]->grow[granRow1][granCol1];


I put in a bunch of breakpoints around the statments

Code: Select all
getGranIndexValues(aRow1, granIndex1, granRow1);
getGranIndexValues(aRow2, granIndex2, granRow2);


at line 173 of ProCmnAdjMODTable.cpp, giving me

Code: Select all
Breakpoint 1, ProCmnAdjMODTable::getDistance (this=0x2613240, aRow1=2, aCol1=0, aRow2=2, aCol2=1) at ProCmnAdjMODTable.cpp:173
173         getGranIndexValues(aRow1, granIndex1, granRow1);
aRow1 =  = 2
granIndex1 = -1256697856
granRow1  = 10922

Breakpoint 5, ProCmnAdjTable::getGranIndexValues (this=0x2613240, aRow=2, aGranIndex=@0x7fffffffb748, aGranRow=@0x7fffffffb74c) at ProCmnAdjTable.cpp:652
652                          (aRow -( crossGranScans_ * rowsPerScan_) ));
aRow = 2
crossGranScans_ = 2
rowsPerScan_ = 16
scansInPreGran_ = 0
scansInCurGran_ = 0

Breakpoint 2, ProCmnAdjMODTable::getDistance (this=0x2613240, aRow1=2, aCol1=0, aRow2=2, aCol2=1) at ProCmnAdjMODTable.cpp:174
174         getGranIndexValues(aRow2, granIndex2, granRow2);
aRow1 = 2
granIndex1 = 0
granRow1 = -30
aRow2 = 2
granIndex2 = -1256678544
granRow2 = 10922

Breakpoint 5, ProCmnAdjTable::getGranIndexValues (this=0x2613240, aRow=2, aGranIndex=@0x7fffffffb740, aGranRow=@0x7fffffffb744) at ProCmnAdjTable.cpp:652
652                          (aRow -( crossGranScans_ * rowsPerScan_) ));
aRow = 2
crossGranScans_ = 2
rowsPerScan_ = 16
scansInPreGran_ = 0
scansInCurGran_ = 0

Breakpoint 3, ProCmnAdjMODTable::getDistance (this=0x2613240, aRow1=2, aCol1=0, aRow2=2, aCol2=1) at ProCmnAdjMODTable.cpp:176
176         Float64 distance = -1;
aRow2 = 2
granIndex2 = 0
granRow2 = -30


So it looks like I am getting negative values for granRow1 and granRow2, which I think arise from a
zero value of scansInCurGran_ in ProCmnAdjTable.cpp:getGranIndexValues() (line 651).

Before trying to dig back too far looking for the source of these values, I had a look at the ADL
log file, and found...

Code: Select all
DBG_MED ProCmnAdjFactory.cpp|223|Distance calculation type = GROWCOL
DBG_MED ProCmnAdjFactory.cpp|261|Number of cross granule scans = 2
DBG_MED ProCmnMethodAudit.cpp|124|ProCmnAlgorithm[ProEdrViirsActiveFires]::getAnInputItemFromMe(NPP000562837161) [0x1b658b0] entered
DBG_MED ProCmnMethodAudit.cpp|219|ProCmnAlgorithm[ProEdrViirsActiveFires]::getAnInputItemFromMe(NPP000562837161) [0x1b658b0] PRO_SUCCESS
DBG_LOW ProCmnDataItem.cpp|1496|ProCmnDataItem::dataPtrEstablished(VIIRS-MOD-GRC-TC) 0x1bcdf40 index 0 has data pointer established
DBG_MED ProCmnMethodAudit.cpp|124|ProCmnAlgorithm[ProEdrViirsActiveFires]::getAnInputItemFromMe(NPP000562837161) [0x1b658b0] entered
DBG_MED ProCmnMethodAudit.cpp|219|ProCmnAlgorithm[ProEdrViirsActiveFires]::getAnInputItemFromMe(NPP000562837161) [0x1b658b0] PRO_SUCCESS
DBG_LOW ProCmnDataItem.cpp|1496|ProCmnDataItem::dataPtrEstablished(VIIRS-MOD-GRC-TC) 0x1bce3f0 index 0 has data pointer established
DBG_MED ProCmnMethodAudit.cpp|124|ProCmnAlgorithm[ProEdrViirsActiveFires]::getAnInputItemFromMe(NPP000562837161) [0x1b658b0] entered
DBG_MED ProCmnMethodAudit.cpp|219|ProCmnAlgorithm[ProEdrViirsActiveFires]::getAnInputItemFromMe(NPP000562837161) [0x1b658b0] PRO_SUCCESS
DBG_LOW ProCmnDataItem.cpp|1496|ProCmnDataItem::dataPtrEstablished(VIIRS-MOD-GRC-TC) 0x1bcf1a0 index 0 has data pointer established
DBG_LOW ProCmnAdjMODTable.cpp|142|cmn adj distance search type = GROWCOL
DBG_LOW ProCmnAdjMODTable.cpp|215| grid_to_latlon : grid_to_latlon, 200: grid_type=0, is illegal


which is associated with the Active Fires alg, and then...

Code: Select all
DBG_MED Cloud_Adjacency.cpp|141|Cloud_Adjacency -- Entered
DBG_MED ProCmnAdjFactory.cpp|223|Distance calculation type = GROWCOL
DBG_MED ProCmnAdjFactory.cpp|261|Number of cross granule scans = 5
DBG_MED ProCmnMethodAudit.cpp|124|ProCmnAlgorithm[ProEdrViirsCM]::getAnInputItemFromMe(NPP000562837161) [0x2aab312c2010] entered
DBG_MED ProCmnMethodAudit.cpp|219|ProCmnAlgorithm[ProEdrViirsCM]::getAnInputItemFromMe(NPP000562837161) [0x2aab312c2010] PRO_SUCCESS
DBG_LOW ProCmnDataItem.cpp|1496|ProCmnDataItem::dataPtrEstablished(VIIRS-MOD-GRC) 0x1c0a950 index 0 has data pointer established
DBG_MED ProCmnMethodAudit.cpp|124|ProCmnAlgorithm[ProEdrViirsCM]::getAnInputItemFromMe(NPP000562837161) [0x2aab312c2010] entered
DBG_MED ProCmnMethodAudit.cpp|219|ProCmnAlgorithm[ProEdrViirsCM]::getAnInputItemFromMe(NPP000562837161) [0x2aab312c2010] PRO_SUCCESS
DBG_LOW ProCmnDataItem.cpp|1496|ProCmnDataItem::dataPtrEstablished(VIIRS-MOD-GRC) 0x1eb4740 index 0 has data pointer established
DBG_MED ProCmnMethodAudit.cpp|124|ProCmnAlgorithm[ProEdrViirsCM]::getAnInputItemFromMe(NPP000562837161) [0x2aab312c2010] entered
DBG_MED ProCmnMethodAudit.cpp|219|ProCmnAlgorithm[ProEdrViirsCM]::getAnInputItemFromMe(NPP000562837161) [0x2aab312c2010] PRO_SUCCESS
DBG_LOW ProCmnDataItem.cpp|1496|ProCmnDataItem::dataPtrEstablished(VIIRS-MOD-GRC) 0x1dc2840 index 0 has data pointer established
DBG_LOW ProCmnAdjMODTable.cpp|142|cmn adj distance search type = GROWCOL


which is associated with the VIIRS Cloud mask alg.

I noted that ProCmnAdjFactory.cpp was taking "GROWCOL" as the desired "DistanceCalculation" method.
This is despite the fact that in PRO_CMN_ADJ_CFG.xml "DistanceCalculation" is set to "GEO". I assume
that "GROWCOL" results in the use of the VIIRS-MOD-GRC file(s). I do not use the VIIRS-MOD-GRC
files (which I think corresponds to setting "DistanceCalculation" to "GEO"), but I still make dummy
versions of VIIRS-MOD-GRC blob files in order to satisfy dependency requirements for the VCM alg.
So if ADL was still trying to use my VIIRS-MOD-GRC (which contain inappropriate values), I wouldn't
be surprised if ADL choked on them.

Are there any other places that ADL searches for the "DistanceCalculation" setting pertaining to
pixel adjacency? There doesn't seem to be a "GROWCOL"/"GEO" setting in any of the VCM config xml
files, so I understand that ADL is supposed to fall back to PRO_CMN_ADJ_CFG.xml. Is there another
way to force a "GEO" setting?

Cheers, Geoff
Geoff P. Cureton, PhD
Cooperative Institute for Meteorological Satellite Studies
University of Wisconsin-Madison
1225 W. Dayton St.
Madison WI 53706, USA
Phone: +1 608 890 0706
geoffc
 
Posts: 23
Joined: Mon Feb 14, 2011 3:02 pm
Location: Madison, WI

Re: PRO_CMN_ADJ_CFG.xml DistanceCalculation value not respec

Postby kbisanz » Fri Jan 24, 2014 6:37 pm

Try giving this thread a read: viewtopic.php?f=27&t=317&start=10

The specific post would be the one posted by bhenders at Fri May 31, 2013 4:58 pm

I believe you need to do the same edits of:
--Edit $ADL_HOME/cfg/ProEdrViirsActiveFires_CFG.xml and $ADL_HOME/cfg/ProEdrViirsCM_CFG.xml
--Edit $ADL_HOME/cfg/PRO_CMN_ADJ_CFG.xml
--Rebuild

I will poke around to see if a PCR was written and/or worked.
Kevin Bisanz
Raytheon Company
kbisanz
 
Posts: 280
Joined: Wed Jan 05, 2011 7:02 pm
Location: Omaha NE


Return to Runtime

Who is online

Users browsing this forum: No registered users and 1 guest