[ET Trac] [Einstein Toolkit] #759: No helpful error messages if soucebasedir points to a non Cactus sources directory

Einstein Toolkit trac-noreply at einsteintoolkit.org
Tue Feb 28 03:49:58 CST 2012

#759: No helpful  error messages if soucebasedir points to a non  Cactus sources
  Reporter:  alibeck     |       Owner:  eschnett
      Type:  defect      |      Status:  new     
  Priority:  major       |   Milestone:          
 Component:  SimFactory  |     Version:          
Resolution:              |    Keywords:          

Comment (by alibeck):

 The primary problem occurs in def GetDirSuffix. This function checks,
 whether any given path name for sourcebasedir matches the directory where
 simfactory was invoked from. For instance, if you call simfactory from
 "/home/user/programs/Cactus", and your sourcebasedir path name is
 "/home/user/programs" or even only "/home/user/" GetDirSuffix will not
 fail, and return the part of the path name of the directory from which one
 has called simfactory, which is not represented by the given
 sourcebasedir. In the examples above this would be "Cactus" or

 The calling function of GetDirSuffix is "create" in simrestart. After
 calling GetDirsuffix it constructs the sourcebasedir by calling

   sourcedir = simlib.BuildPath(localsourcebasedir, dirsuffix)

 In the examples above then the sourcedir would be
 "/home/user/programs/Cactus", because the dirsuffix is either
 "programs/Cactus" or only "Cactus". The function simlib.BuildPath is
 containing the call

  return os.sep.join(args)

 which is giving the final error message, if one of the args is of type

 This is what is happening. The problem can be fixed easily by adding in
 GetDirSuffix or in create a helping error message and exit simfactory,
 here we have all the control of the given path names. However, and here I
 want to have a discussion, we should decide in front of this fix whether
 it is really necessary to give the sourcebasedir as a part of the
 directory where the simfactory call has been entered. What about separate
 pathes for simfactory and cactus sources? Another point I want to make
 here: does it really make sense to give "/home" as sourcebasedir, and then
 simfactory does its job? I feel no. From my point of view a sourcebasedir
 should be the directory which contains the cactus sources (or a directory
 called Cactus). If only "/home" is sufficient, why do we need a
 sourcebasedir for that? This will work on quite a lot of UNIX and Linux

Ticket URL: <https://trac.einsteintoolkit.org/ticket/759#comment:1>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit

More information about the Trac mailing list