changeset 5:eea73e1f65cb draft

planemo upload for repository https://github.com/muon-spectroscopy-computational-project/muon-galaxy-tools/main/pm_uep_opt commit 8e96fbcca17150ece3ee6bf15bf0969bd014a5ca
author muon-spectroscopy-computational-project
date Wed, 26 Jul 2023 17:23:11 +0000
parents ec5f6b22417c
children da177c1ec3b4
files pm_uep_opt.xml run.sh
diffstat 2 files changed, 11 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/pm_uep_opt.xml	Tue Jul 18 13:27:15 2023 +0000
+++ b/pm_uep_opt.xml	Wed Jul 26 17:23:11 2023 +0000
@@ -2,7 +2,7 @@
     <description>run UEP optimisation</description>
     <macros>
         <!-- version of this tool wrapper (integer) -->
-        <token name="@WRAPPER_VERSION@">0</token>
+        <token name="@WRAPPER_VERSION@">1</token>
         <import>muon_macros.xml</import>
     </macros>
     <creator>
@@ -171,7 +171,7 @@
                 </assert_contents>
             </output>
         </test>
-        <!-- Expect total failure for badly formatted den_fmt -->
+        <!-- Expect failure for badly formatted den_fmt -->
         <test expect_failure="true">
             <param name="testing" value="true"/>
             <param name="structure" value="Si.cell" ftype="cell"/>
@@ -179,7 +179,6 @@
             <param name="charge_density" value="Sifail.den_fmt" ftype="den_fmt"/>
             <assert_stderr>
                 <has_text text="Error:  FMT file has no header"/>
-                <has_text text="ERROR: All optimisations failed"/>
             </assert_stderr>
         </test>
         <!-- check that file_tree filter works -->
--- a/run.sh	Tue Jul 18 13:27:15 2023 +0000
+++ b/run.sh	Wed Jul 26 17:23:11 2023 +0000
@@ -2,33 +2,14 @@
 
 set -o errexit
 
-run(){
-    if ! out=$(pm-uep-opt $1); then 
-        echo 1>&2 "$out"; exit 1
+for x in $1/*/*/*.yaml 
+do 
+    
+    if ! out=$(pm-uep-opt $x)
+    then 
+    echo 1>&2 "$out"; exit 1
     else
-        echo "$out"
+    echo "$out"
     fi
-}
-
-pids=()
-for x in $1/*/*/*.yaml; do 
-    run $x & pids+=($!)
-done
-
-declare -i failed=0
-for pid in ${pids[@]}; do
-    if ! wait $pid; then
-        failed+=1
-    fi
-done
-
-if [ $failed -eq ${#pids[@]} ]; then
-    >&2 echo "ERROR: All optimisations failed"
-    exit 1
-elif [ $failed -eq 0 ]; then
-    echo "All optimisations succeeded"
-    exit 0
-else
-    echo "WARNING: $failed optimisation(s) failed"
-    exit 0
-fi
+done || exit
+#pm-uep-opt 
\ No newline at end of file