summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGard Spreemann <gard.spreemann@epfl.ch>2019-05-12 16:54:58 +0200
committerGard Spreemann <gard.spreemann@epfl.ch>2019-05-12 16:54:58 +0200
commit5637afd21e38fe7262f548711fcf1a1e62c2dbb4 (patch)
tree757eb608291133df0d56d9369ed2ffa382b1a410
parent7d9fc408481ff9a165d5a324ea2580fe396b44b2 (diff)
Only check for --dimension when using DIPHA files.
-rw-r--r--geom_matching/wasserstein/mpi/main.cpp4
1 files 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))