PRO_CMN_ADJ_CFG.xml DistanceCalculation value not respected?
Posted: 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...
I put in a bunch of breakpoints around the statments
at line 173 of ProCmnAdjMODTable.cpp, giving me
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...
which is associated with the Active Fires alg, and then...
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
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];
Code: Select all
getGranIndexValues(aRow1, granIndex1, granRow1);
getGranIndexValues(aRow2, granIndex2, granRow2);
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
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
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
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