Opened 5 weeks ago

Last modified 5 weeks ago

#1138 new enhancement

refactor environment variables

Reported by: pkienzle Owned by:
Priority: minor Milestone: SasView 4.3.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing


The environment variables are now displayed by the sascomp command (ticket 608 branch) as:

    -DSAS_MODELPATH=~/.sasmodels/custom_models sets path to custom models
    -DSAS_WEIGHTS_PATH=~/.sasview/weights sets path to custom distributions
    -DSAS_OPENCL=vendor:device|none sets the target OpenCL device
    -DXDG_CACHE_HOME=~/.cache sets the pyopencl cache root (linux only)
    -DSAS_COMPILER=tinycc|msvc|mingw|unix sets the DLL compiler
    -DSAS_OPENMP=0 set to 1 to turn on OpenMP for the DLLs
    -DSAS_DLL_PATH=~/.sasmodels/compiled_models sets the DLL cache

These should appear somewehere in the sasview manual.

Perhaps we should make SAS_WEIGHTS_PATH default to ~/.sasmodels/weights to be consistent with SAS_MODELPATH and SAS_DLL_PATH, and redirect it in sasview like we do for SAS_MODELPATH.

We should redirect SAS_DLL_PATH to the ~/.sasview directory as well, otherwise we end up with .sasview and .sasmodels in our home directory.

Renaming SAS_MODELPATH to SAS_MODEL_PATH would add further consistency.

Document any other environment variables used in sasview or sasmodels.

The XDG_CACHE_HOME variable is used by pyopencl, and is defined in the appdirs package. Consider using this package for sasview/sasmodels as well since we already depend on it through pyopencl.

Change History (1)

comment:1 Changed 5 weeks ago by smk78

/sasview/docs/sphinx-docs/source/user/environment.rst created

Linked into manual from Working with SasView

Note: See TracTickets for help on using tickets.