Skip to content

Commit

Permalink
Fix erroneous errors messages in parallel for unsorted tables
Browse files Browse the repository at this point in the history
Utilisation d'un table principale Root non triee
Bug de diagnostique des erreurs

Bug en parallel uniquement.
Bug reproduit en paralle simule

Le message d'erreur en parallele (3 coeurs) reference un mauvais non de cle:
- error : Key position sample extractor ./distinct_user_id.txt : Record 2365 : unsorted key [xAPid5D9Lsq8UFw+W5E=...] inferior to preceding key [urLoLv3I8hkuF5NTF1U=...] found 2232 lines before
- l'index de record est erronne: 2365 au lieu de 2366
- la valeur du la cle est erronnes [xAPid5D9Lsq8UFw+W5E=...] au lieu de [0howoxSt70H06DU1YUrza5jcxAPid5D9Lsq8UFw+W5E=]

Jeu de test dans LearningTest\TestKhiops\BugsMultiTables\BugUnsortedRootTable

Impacts:
- KWKeyPositionSampleExtractorTask::SlaveProcess: correction du numero de ligne
- KWKey::GetObjectLabel: correction pour prendre le debut de la cle plutot que sa fin
  • Loading branch information
marcboulle committed Dec 15, 2023
1 parent f36995b commit 55b783e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Learning/KWDataUtils/KWKey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ALString KWKey::GetObjectLabel() const
if (svFields.GetAt(i).GetLength() <= nFieldMaxLength)
sFieldLabel = svFields.GetAt(i);
else
sFieldLabel = svFields.GetAt(i).Right(nFieldMaxLength) + "...";
sFieldLabel = svFields.GetAt(i).Left(nFieldMaxLength) + "...";

// Ajout du libelle du champ de cle
sLabel += sFieldLabel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ boolean KWKeyPositionSampleExtractorTask::SlaveProcess()
LongintToReadableString(recordKeyPosition->GetLineIndex() -
previousRecordKeyPosition->GetLineIndex()) +
" lines before",
nCumulatedLineNumber + inputFile.GetCurrentLineIndex() - 1);
nCumulatedLineNumber + inputFile.GetCurrentLineIndex());
delete recordKeyPosition;
bOk = false;
break;
Expand Down
6 changes: 3 additions & 3 deletions src/Learning/MODL/MODL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ int main(int argc, char** argv)
Global::ActivateSignalErrorManagement();

// Choix du repertoire de lancement pour le debugage sous Windows (a commenter apres fin du debug)
SetWindowsDebugDir("Standard", "IrisLight");
// SetWindowsDebugDir("Standard", "IrisLight");
// SetWindowsDebugDir("Standard", "Iris2D");
// SetWindowsDebugDir("TextVariables", "BuildNonInterpretableNames");
SetWindowsDebugDir("BugsMultiTables", "BugUnsortedRootTable");

// Parametrage des logs memoires depuis les variables d'environnement, pris en compte dans KWLearningProject
// KhiopsMemStatsLogFileName, KhiopsMemStatsLogFrequency, KhiopsMemStatsLogToCollect
Expand All @@ -58,7 +58,7 @@ int main(int argc, char** argv)

// Simulation du mode parallele pour le debuggage
// PLParallelTask::SetParallelSimulated(true);
// PLParallelTask::SetSimulatedSlaveNumber(2);
// PLParallelTask::SetSimulatedSlaveNumber(3);
// PLParallelTask::SetTracerResources(1);
// PLParallelTask::SetTracerProtocolActive(true);
// PLParallelTask::SetTracerMPIActive(true);
Expand Down

0 comments on commit 55b783e

Please sign in to comment.