Comments (3)
Hi Bob,
GSL looks for the values of the environment variables GSL_RNG_TYPE and GSL_RNG_SEED in https://github.com/ampl/gsl/blob/master/rng/default.c. In case there were values set for these environment variables, it display the values when the dll is loaded:
ampl: option GSL_RNG_TYPE 'taus'; # use the "taus" generator
ampl: option GSL_RNG_SEED 123; # initialize the seed to 123
ampl: load amplgsl.dll;
GSL_RNG_TYPE=taus
GSL_RNG_SEED=123
On Linux, option GSL_RNG_TYPE 'taus';
and option GSL_RNG_SEED 123;
set the environment variable correctly. However, on Windows this does not happen, and the only workaround appears to be the one you suggested using set GSL_RNG_SEED
to set the environment variable manually before starting AMPL. The problem may be in the implementation of the function that sets the options.
Regarding the standard randseed
option, it does not appear to have any effect on GSL (even on Linux), and in the implementation I do not see anything that would set the environment variable GSL_RNG_SEED when randseed is set. Since that note refers to AMPL version 20120830, this behavior may have been meanwhile discarded, or at the time GSL loaded these values from some place other than environment variables.
from gsl.
Comment left at https://groups.google.com/d/msg/ampl/xWjhox8FfeQ/guOyWCIbBgAJ:
The gsl libraray has a function called gsl_rng_set which is not included in ampl/gsl. Probably including that function and related files (not sure about the dependency), and rebuild the gsl library can be a way to go.
from gsl.
Added functionality in e4454c1, see https://amplgsl.readthedocs.io/en/latest/amplgsl/rng.html.
from gsl.
Related Issues (20)
- v2.6 release? HOT 1
- GSL Versioning HOT 1
- Add version information for Extended Function Library HOT 1
- Add gsl_stats_ functions? HOT 1
- Msvc runtime errors HOT 2
- can not link
- Upstreaming patches for Windows build HOT 1
- Undefined Symbol Issue `cblas_dcopy` HOT 1
- Building failure under mingw810_64 HOT 2
- Assessment of the difficulty in porting CPU architecture for the GSL
- using the library in a memory contained space
- gsl_complex_exp not found
- Fix for CVE-2020-35357 is not present in master (and not in v2.7.0)
- Wrong hessian order in amplgsl_hypot3 HOT 1
- How to build without sudoer right? HOT 1
- potential bugs?
- How to customize the Cmakelist.txt and compile on windows with MinGW(+GCC)?
- Issue installing PDB files on Windows with static Debug configuration
- cmake issue at build stage
- How can I find the specific implementation code of functions such as gsl-Matrix-add? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gsl.