From 5637afd21e38fe7262f548711fcf1a1e62c2dbb4 Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Sun, 12 May 2019 16:54:58 +0200 Subject: Only check for --dimension when using DIPHA files. --- geom_matching/wasserstein/mpi/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geom_matching/wasserstein/mpi/main.cpp b/geom_matching/wasserstein/mpi/main.cpp index 707cd38..72c9ec5 100644 --- a/geom_matching/wasserstein/mpi/main.cpp +++ b/geom_matching/wasserstein/mpi/main.cpp @@ -218,8 +218,8 @@ int main(int argc, char ** argv) // Argument validation. if (list_1_file_name == std::string("") || list_2_file_name == std::string("")) arg_fail(invocation, world_rank, "Need input file lists."); - if (dim < 0) - arg_fail(invocation, world_rank, "Dimension must be non-negative."); + if (in_type == file_type_dipha && dim < 0) + arg_fail(invocation, world_rank, "Dimension must be supplied non-negative for DIPHA input files."); if (params.wasserstein_power < 1 || !std::isfinite(params.wasserstein_power)) arg_fail(invocation, world_rank, "Outer norm power must be in the interval [1, ∞)."); if (params.internal_p < 1 || std::isnan(params.internal_p)) -- cgit v1.2.3