[Swift-user] Swift stopping because of problematic foreach iteration
Guilherme Gall
gmgall at lncc.br
Thu Feb 6 11:58:48 CST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Em 06-02-2014 14:36, Luiz Gadelha escreveu:
> Hi Guilherme,
>
> It seems to be an openmodeller problem, it's returning exit status
> 0 even when it reports an error. Swift must be interpreting that
> the execution was successful but then it reports an error because
> it's not able to find the files that should have been generated by
> a successful om_console execution. It seems also that in addition
> to the presence points we are giving as input, the Maxent model
> requires some absence points as well, it should fail anyway since
> it doesn't have enough information.
>
> $ /usr/bin/time -f exit_status:%x om_console request_Abarema\
> brachystachya.txt [Info] openModeller version 1.4.0 [Error] Cannot
> create model without any presence or absence point. [Info]
> Exception occurred: Cannot create model without any presence or
> absence point.
>
> exit_status:0
>
> Regards,
>
> Luiz
Hi Luiz,
At first I thought that the problem would be the exit status too. To
be sure I created a wrapper script that ends with exit status 0 in
case of success and with a exit status 1 in case of error.
Follows the script:
- ------------------------------------------------------------------------
#!/bin/bash
if om_console "$1" 2>&1 | grep -q '\[Error\]'; then
exit 1
else
exit 0
fi
- ------------------------------------------------------------------------
I tested the wrapper and it worked fine: 0 in case of success and 1 in
case of failure. Then I swapped the direct call for om_console by my
wrapper script in the Swift script.
But the problem persists. Swift stops with the same "File not found"
error when one iteration doesn't generate the output files.
Regards,
- --
Guilherme Gall
CSR/LNCC
GPG Public Key ID: A65ED0D5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJS881YAAoJEG9WBlOmXtDVuYMH/0h8ddUytwJuQE4LfyVknGHA
g+CMFoUaV8JyZiW1BqLB0xI7DgD2OqcNtBNNUPkvp2N68Wy66SzNzlK0c/lO5edj
QDGdy5sctG3mvLffg9eIyKw3IMZJgDZQHhuDHw8+7D8dB4TVnbTRD8AVMXIWDL/4
9MzKbx0YCFeE6MsWgiOrduGLPk5qpFneatwjg2Z+GKYSJEFRNRNPN64kBP6eKPfN
nYYgXHqIdApIwPbKSIgZQbJpSUhelp9ebqFNrRH69rfyow6qXIexs67GIeDofhVu
uFJmpQXwL68S4YSPljw7J0ZmC/B1v2djDDn6OpdogT4W+AYzVwyOqw/V+uIwJLQ=
=kkDn
-----END PGP SIGNATURE-----
More information about the Swift-user
mailing list