diff --git a/wetb/prepost/Simulations.py b/wetb/prepost/Simulations.py index e12a6aa069fdcab864570269b677e166c740ed86..a60e9b286b71e729a4e24443853342d5834034f9 100755 --- a/wetb/prepost/Simulations.py +++ b/wetb/prepost/Simulations.py @@ -1942,7 +1942,12 @@ class PBS(object): self.wine = 'time WINEARCH=win32 WINEPREFIX=~/.wine32 wine' else: raise UserWarning('server support only for jess or gorm') - self.winefix = 'WINEARCH=win32 WINEPREFIX=~/.wine32 winefix\n' + + # determine at runtime if winefix has to be ran + self.winefix = ' _HOSTNAME_=`hostname`\n' + self.winefix += ' if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then \n' + self.winefix += ' WINEARCH=win32 WINEPREFIX=~/.wine32 winefix\n' + self.winefix += ' fi\n' # the output channels comes with a price tag. Each time step # will have a penelty depending on the number of output channels @@ -2228,7 +2233,7 @@ class PBS(object): self.pbs += " cp -R $PBS_O_WORKDIR/%s ./%s \n" % (fname, fgen) # only apply the wine fix in PBS mode - self.pbs += ' ' + self.winefix + self.pbs += self.winefix # TODO: activate python env, calculate post-processing # self.pbs += 'echo `python -c "import wetb; print(wetb.__version__)"`\n' diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p index ad37d08eda8af66d8d9039f92b23411e9adafae0..27dde9c45eef7778dddad7e0b162ccc32fc2d0f4 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p +++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp10_s100.p @@ -37,7 +37,10 @@ if [ -z ${LAUNCH_PBS_MODE+x} ] ; then mkdir -p turb/ cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp10_s100.htc ./htc/dlc01_demos/ cp -R $PBS_O_WORKDIR/../turb/turb_s100_10ms*.bin turb/ - WINEARCH=win32 WINEPREFIX=~/.wine32 winefix + _HOSTNAME_=`hostname` + if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then + WINEARCH=win32 WINEPREFIX=~/.wine32 winefix + fi # ------------------------------------------------------------ else # with find+xargs we first browse to CPU folder diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp11_s101.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp11_s101.p index d4675f07d0ad5d8011fac3c5c19201705054ac8e..4d0df37617d5bf8093c7572c7ace7102da7b125c 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp11_s101.p +++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp11_s101.p @@ -37,7 +37,10 @@ if [ -z ${LAUNCH_PBS_MODE+x} ] ; then mkdir -p turb/ cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp11_s101.htc ./htc/dlc01_demos/ cp -R $PBS_O_WORKDIR/../turb/turb_s101_11ms*.bin turb/ - WINEARCH=win32 WINEPREFIX=~/.wine32 winefix + _HOSTNAME_=`hostname` + if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then + WINEARCH=win32 WINEPREFIX=~/.wine32 winefix + fi # ------------------------------------------------------------ else # with find+xargs we first browse to CPU folder diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p index 8570f9cb95946522ea0f34bdfe4d445b701202e7..fdb203d5a0361e9da54c23ee3cddc1acaca6bd52 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p +++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp8_noturb.p @@ -37,7 +37,10 @@ if [ -z ${LAUNCH_PBS_MODE+x} ] ; then mkdir -p turb/ cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp8_noturb.htc ./htc/dlc01_demos/ cp -R $PBS_O_WORKDIR/../turb/none*.bin turb/ - WINEARCH=win32 WINEPREFIX=~/.wine32 winefix + _HOSTNAME_=`hostname` + if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then + WINEARCH=win32 WINEPREFIX=~/.wine32 winefix + fi # ------------------------------------------------------------ else # with find+xargs we first browse to CPU folder diff --git a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p index 8b7dc11bda27c4205e9eb084657ab876200fb122..84d71cd6d5066ef8a8f131e6c0e5a33f7120b6c5 100644 --- a/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p +++ b/wetb/prepost/tests/data/demo_dlc/ref/pbs_in/dlc01_demos/dlc01_steady_wsp9_noturb.p @@ -37,7 +37,10 @@ if [ -z ${LAUNCH_PBS_MODE+x} ] ; then mkdir -p turb/ cp -R $PBS_O_WORKDIR/htc/dlc01_demos/dlc01_steady_wsp9_noturb.htc ./htc/dlc01_demos/ cp -R $PBS_O_WORKDIR/../turb/none*.bin turb/ - WINEARCH=win32 WINEPREFIX=~/.wine32 winefix + _HOSTNAME_=`hostname` + if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then + WINEARCH=win32 WINEPREFIX=~/.wine32 winefix + fi # ------------------------------------------------------------ else # with find+xargs we first browse to CPU folder