From 22953c5926ed8d877a6bce51dbc53f2d01425e17 Mon Sep 17 00:00:00 2001
From: dave <dave@dtu.dk>
Date: Mon, 1 Aug 2016 18:52:14 +0200
Subject: [PATCH] prepost.Simulations: browse to correct path for hard-linking
 turbs, take3

---
 wetb/prepost/Simulations.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py
index b6bbd15c..99fa1b1d 100755
--- a/wetb/prepost/Simulations.py
+++ b/wetb/prepost/Simulations.py
@@ -1205,8 +1205,8 @@ def create_chunks_htc_pbs(cases, sort_by_values=['[Windspeed]'], ppn=20,
         pbs += 'pwd\n'
         pbs += 'echo "hard-linking all turb files into CPU dirs"\n'
         for k in range(ppn):
-            rpl = (os.path.join(sim_id, turb_dir_base), k)
-            pbs += 'find %s -iname *.bin -exec ln {} %s/{}\\;\n' % rpl
+            rpl = (os.path.relpath(os.path.join(sim_id, turb_dir_base)), k)
+            pbs += 'find %s -iname *.bin -exec ln {} %s/{} \\;\n' % rpl
 
         # =====================================================================
         # finally we can run find+xargs!!!
-- 
GitLab