Opened 8 years ago

Last modified 8 years ago

#469 new enhancement

Improve default directory locations

Reported by: Ian Hinder Owned by: Erik Schnetter
Priority: minor Milestone:
Component: SimFactory Version:
Keywords: Cc:


It is usually desirable to set the user's source base directory to be in their home directory. On many systems, this can be inferred from the user name; e.g. /home/@USER@. However, on systems with very large numbers of users, the home directory is sometimes not predictable in this way. For example, /home1/00915/@USER@ (this is on LoneStar), where the numbers are different for different users. This also happens on Kraken (see ticket #382). Having to specify these details manually for each machine that you want to use is an extra step in configuring SimFactory which we would like to avoid.

Option 1: Provide a @HOME@ definition which is determined automatically from the user's home directory.

This would be possible, but it only solves the problem for the home directory. On some systems (again, LoneStar and Kraken), the home directory might not be large enough to use as a source base directory, and instead you might want to use the "work" directory instead (this is the current simfactory setting for LoneStar). This directory also suffers from the same unpredictable numbering problems. As the home directory is available in the HOME environment variable, the work directory is available in the WORK environment variable.

Option 2: Provide a general method for accessing environment variables and storing them in definitions. For example, you could write @ENV(HOME)@ or @ENV(WORK)@. This requires the environment to have been correctly set up (for remote operation, this requires a login shell, but I think we have that already). In fact it looks like there is preliminary code in, but it is incomplete and is not called from anywhere.

I would favour option 2. Thoughts?

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by Erik Schnetter

In some places one can write $HOME or $WORK in the directories; since these strings are usually passed to a shell, they will be expanded. I used to use this in some places -- I don't know whether this use is still there.

I favour option 2 as well. This seems to be a reasonable solution to a long-standing problem.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Erik Schnetter.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from Erik Schnetter to the specified user.
Next status will be 'confirmed'.
The owner will be changed from Erik Schnetter to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.