PetaVision / OpenPV

PetaVision is a C++ library for designing and deploying large-scale neurally-inspired computational models.
http://petavision.github.io
Eclipse Public License 1.0
40 stars 13 forks source link

compareparams.cpp in tools directory #264

Closed peteschultz closed 5 years ago

peteschultz commented 5 years ago

The compareParamsFiles() function and the related functions it calls have been moved from DryRunFlagTest to the utils directory. The functions have also been rewritten to return PV_SUCCESS/PV_FAILURE instead of failing on the first discrepancy. They output error messages (but not fatal errors) when they encounter a difference in params.

A new executable in the tools directory, whose source file is tools/compareparams.cpp, makes use of the compareParamsFile() function to print out descriptions of the differences between two params files specified on the command line.

DryRunFlagTest has been adapted to use the new behavior of compareParamsFiles().

Finally, a CMakeLists.txt file has been added to the tools directory, and the main CMakeLists.txt file now adds the tools directory.

When building from the base build directory, executables readpvpfile and compareparams are compiled into the build/tools directory.

garkenyon commented 5 years ago

please add a description of how to compare two params files

peteschultz commented 5 years ago

cd to the build directory and run make

This should create a tools directory and an executable tools/compareparams.

Run the command tools/compareparams paramsfile1.params paramsfile2.params.

Any differences between the params files will be reported as error messages.