Hi Erik,
The problem is that the script provided by OpenFOAM that should be
sourced may depend on the environment in which it is sourced...
In other words, a user may (potentially) define environment variables
that change what the script does, making it a dynamic thing that can not
be encapsulated in a module (or at least, can not be automated easily).
You're right that without the changes to the environment being done via
a source script makes them hard to reverse in the same session, but is
that a big problem in practice?
regards,
Kenneth
On 05/07/16 09:51, Erik Smeets wrote:
Hi,
After installing OpenFOAM with EasyBuild I see that the the modulefile created
does not set all OpenFOAM environment variables, but instead the bashrc or
cshrc file from OpenFOAM itself needs to be sources. Could someone explain why
this approach is chosen instead of including the environment variables directly
in the modulefile? The main objection with the chosen approach is that when the
modulefile is now unloaded, the set environment variables are not unset.
Thanks in advance.
Kind regards,
Erik Smeets
-- The information contained in this communication and any attachments is
confidential and may be privileged, and is for the sole use of the intended
recipient(s). Any unauthorized review, use, disclosure or distribution is
prohibited. Unless explicitly stated otherwise in the body of this
communication or the attachment thereto (if any), the information is provided
on an AS-IS basis without any express or implied warranties or liabilities. To
the extent you are relying on this information, you are doing so at your own
risk. If you are not the intended recipient, please notify the sender
immediately by replying to this message and destroy all copies of this message
and any attachments. The sender nor the company/group of companies he or she
represents shall be liable for the proper and complete transmission of the
information contained in this communication, or for any delay in its receipt.