View Issue Details

IDProjectCategoryView StatusLast Update
0003047ThirdPartyPatchpublic2018-08-21 18:56
Reporterhandrake0724 Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Platformx86_64OSLinuxOS VersionArch
Product Versiondev 
Summary0003047: Request for enabling thirdparty libraries information can be set through environment variables
DescriptionIn HPC, developing and running apps come in handy through environment variables like Lmod.
OpenFOAM depends on environment variables to determine its behavior for installing and operating. So, I introduced Lmod for using OpenFOAM.

Most of the behavior are possible to control with environment variables.
Thirdparty libraries like CGAL, boost, scotch, metis are depening on the script in OpenFOAM-<x>/etc/config.sh and it should be modified when version other than the default library version is desired.

IMO, it would be nice to have OpenFOAM look up environment variables for thirdparty library version before setting values.

This behavior can be made with parameter expansion of shell script and a patch is attached. Using the patch and the attached Lmod script which needs some modification to work with the patch can control all of the OpenFOAM.
TagsNo tags attached.

Activities

handrake0724

2018-08-18 01:57

viewer  

patch.tar.gz (3,066 bytes)

henry

2018-08-20 10:28

manager   ~0009976

We used this approach in the past but found it confusing, difficult to maintain and very difficult to change between versions without complex environment variable unsetting scripts. Instead we implemented a more straight forward approach of allowing the files which set environment variables to be overridden e.g.:

_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config.sh/CGAL

so you can put a local version of the CGAL in any of the locations foamEtcFile searches, type

foamEtcFile -list

and you will get the list of directories.

henry

2018-08-21 18:56

manager   ~0009983

The current foamEtcFile approach is more general.

Issue History

Date Modified Username Field Change
2018-08-18 01:57 handrake0724 New Issue
2018-08-18 01:57 handrake0724 File Added: patch.tar.gz
2018-08-20 10:28 henry Note Added: 0009976
2018-08-21 18:56 henry Assigned To => henry
2018-08-21 18:56 henry Status new => closed
2018-08-21 18:56 henry Resolution open => no change required
2018-08-21 18:56 henry Note Added: 0009983