From 2f198d64a8830ee3e014b2b382bacc611092ec4d Mon Sep 17 00:00:00 2001 From: Antoine Merle <Antoine.Merle@epfl.ch> Date: Thu, 23 Jun 2016 09:17:12 +0000 Subject: [PATCH] * Set tcv as default machine. * Retrieve hostname with unix('hostname -a'), environment variable are too unreliable git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@6019 d63d8f72-b253-0410-a779-e742ad2e26cf --- crpptbx/gdat.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crpptbx/gdat.m b/crpptbx/gdat.m index 7566bbe4..2896af79 100644 --- a/crpptbx/gdat.m +++ b/crpptbx/gdat.m @@ -78,11 +78,12 @@ if nargin>2 end fusion_machine_defaultname=getenv('FUSION_MACHINE_DEFAULTNAME'); -default_machine = ''; +default_machine = 'tcv'; if ~isempty(fusion_machine_defaultname) default_machine = lower(fusion_machine_defaultname); else - hostname=getenv('HOSTNAME'); + [s,hostname]=unix('hostname -a'); + if s || isempty(hostname), hostname=getenv('HOSTNAME');end if ~isempty(regexpi(hostname,'epfl')) default_machine = 'tcv'; elseif ~isempty(regexpi(hostname,'rzg.mpg')) -- GitLab