Skip to content

Allow EGSnrc applications to run from any directory #1212

@ftessier

Description

@ftessier

Problem Description

EGSnrc currently requires input files for an application to reside inside the application's directory in $EGS_HOME. This is also where output files are written. This constraint makes managing multiple projects cumbersome, as the directory becomes cluttered with input and output files from unrelated projects over time.

Proposed Solution

Enable EGSnrc applications to run from any directory, allowing simulation input and output to be isolated in their own project-specific directories. The application directory in $EGS_HOME would still be used for source files, and users could continue to run applications there as before. However, it should also be possible to run applications from any other location. This would match the expected behaviour of all other commands entered in the terminal.

Ideally, this enhancement would go a step further and also allow compilation of any EGSnrc application code anywhere. This change would essentially make $EGS_HOME obsolete for regular usage, allowing EGSnrc to function more like a standard software library toolkit.

Alternatives Considered

Long-time users of EGSnrc often develop workarounds, such as:

  • Moving input and output files to a project directory after completion.
  • Using symbolic links to manage files across project directories.
  • Cloning and configuring a new EGSnrc instance for each project.

While these methods work, they are cumbersome and error-prone.

Steps to Implement

  • Identify all dependencies on the application directory path for input and output in EGSnrc.
  • Update every instance to use the current directory (./) for input and output.

Feedback on this proposal is welcome, especially regarding potential issues or improvements for implementation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions