Skip to content

Commit e45bf53

Browse files
major fix
1 parent 34b86f3 commit e45bf53

File tree

2 files changed

+40
-97
lines changed

2 files changed

+40
-97
lines changed

Readme.md

Lines changed: 39 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -10,115 +10,57 @@ ReusableFunctions
1010
Automated storage and retrieval of results for Julia functions calls.
1111
ReusableFunctions is a module of [MADS](http://madsjulia.github.io/Mads.jl).
1212

13-
MADS
14-
====
15-
16-
[MADS](http://madsjulia.github.io/Mads.jl) (Model Analysis & Decision Support) is an integrated open-source high-performance computational (HPC) framework in [Julia](http://julialang.org).
17-
MADS can execute a wide range of data- and model-based analyses:
18-
19-
* Sensitivity Analysis
20-
* Parameter Estimation
21-
* Model Inversion and Calibration
22-
* Uncertainty Quantification
23-
* Model Selection and Model Averaging
24-
* Model Reduction and Surrogate Modeling
25-
* Machine Learning and Blind Source Separation
26-
* Decision Analysis and Support
27-
28-
MADS has been tested to perform HPC simulations on a wide-range multi-processor clusters and parallel environments (Moab, Slurm, etc.).
29-
MADS utilizes adaptive rules and techniques which allows the analyses to be performed with a minimum user input.
30-
The code provides a series of alternative algorithms to execute each type of data- and model-based analyses.
31-
32-
Documentation
33-
=============
34-
35-
All the available MADS modules and functions are described at [madsjulia.github.io](http://madsjulia.github.io/Mads.jl)
36-
3713
Installation
38-
============
39-
40-
```julia
41-
Pkg.add("Mads")
42-
```
43-
44-
Installation behind a firewall
45-
------------------------------
46-
47-
Julia uses git for the package management.
48-
To install Julia packages behind a firewall, add the following lines in the `.gitconfig` file in your home directory:
49-
50-
```git
51-
[url "https://"]
52-
insteadOf = git://
53-
```
54-
55-
or execute:
56-
57-
```bash
58-
git config --global url."https://".insteadOf git://
59-
```
60-
61-
Set proxies:
62-
63-
```bash
64-
export ftp_proxy=http://proxyout.<your_site>:8080
65-
export rsync_proxy=http://proxyout.<your_site>:8080
66-
export http_proxy=http://proxyout.<your_site>:8080
67-
export https_proxy=http://proxyout.<your_site>:8080
68-
export no_proxy=.<your_site>
69-
```
70-
71-
For example, if you are doing this at LANL, you will need to execute the
72-
following lines in your bash command-line environment:
73-
74-
```bash
75-
export ftp_proxy=http://proxyout.lanl.gov:8080
76-
export rsync_proxy=http://proxyout.lanl.gov:8080
77-
export http_proxy=http://proxyout.lanl.gov:8080
78-
export https_proxy=http://proxyout.lanl.gov:8080
79-
export no_proxy=.lanl.gov
80-
```
81-
82-
MADS examples
83-
=============
84-
85-
In Julia REPL, do the following commands:
14+
-------------
8615

8716
```julia
88-
import Mads
17+
import Pkg; Pkg.add("ReusableFunctions")
8918
```
9019

91-
To explore getting-started instructions, execute:
20+
Example
21+
---------
9222

93-
```julia
94-
Mads.help()
9523
```
96-
97-
There are various examples located in the `examples` directory of the `Mads` repository.
98-
99-
For example, execute
100-
101-
```julia
102-
include(Mads.madsdir * "/../examples/contamination/contamination.jl")
24+
import ReusableFunctions
25+
function f(x)
26+
@info("function f is executed!")
27+
sleep(1)
28+
return x
29+
end
30+
f_reuse = ReusableFunctions.maker3function(f);
31+
32+
julia> f(1) # normal function call
33+
[ Info: function f is executed!
34+
1
35+
36+
# function call using ReusableFunctions function
37+
# the first time f_reuse() is called the original function f() is called
38+
julia> f_reuse(1)
39+
[ Info: function f is executed!
40+
1
41+
42+
# function call using ReusableFunctions function
43+
# the second time f_reuse() is called he original function f() is NOT called
44+
# the already stored output from the first call is reported
45+
julia> f_reuse(1)
46+
1
10347
```
10448

105-
to perform various example analyses related to groundwater contaminant transport, or execute
106-
107-
```julia
108-
include(Mads.madsdir * "/../examples/bigdt/bigdt.jl")
109-
```
49+
Documentation
50+
-------------
11051

111-
to perform Bayesian Information Gap Decision Theory (BIG-DT) analysis.
52+
ReusableFunctions functions are documented at [https://madsjulia.github.io/Mads.jl/Modules/ReusableFunctions](https://madsjulia.github.io/Mads.jl/Modules/ReusableFunctions)
11253

113-
Developers
114-
==========
54+
Projects using ReusableFunctions
55+
-----------------
11556

116-
* [Velimir (monty) Vesselinov](http://www.lanl.gov/orgs/ees/staff/monty) [(publications)](http://scholar.google.com/citations?user=sIFHVvwAAAAJ)
117-
* [Daniel O'Malley](http://www.lanl.gov/expertise/profiles/view/daniel-o'malley) [(publications)](http://scholar.google.com/citations?user=rPzCVjEAAAAJ)
118-
* [see also](https://github.com/madsjulia/ReusableFunctions.jl/graphs/contributors)
57+
* [MADS](https://github.com/madsjulia)
58+
* [TensorDecompositions](https://github.com/TensorDecompositions)
11959

12060
Publications, Presentations, Projects
121-
=====================================
61+
--------------------------
12262

123-
* [mads.lanl.gov/](http://mads.lanl.gov/)
124-
* [ees.lanl.gov/monty](http://ees.lanl.gov/monty)
63+
* [mads.gitlab.io](http://mads.gitlab.io)
64+
* [TensorDecompositions](https://tensordecompositions.github.io)
65+
* [monty.gitlab.io](http://monty.gitlab.io)
66+
* [ees.lanl.gov/monty](https://www.lanl.gov/orgs/ees/staff/monty)

src/ReusableFunctions.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ function maker3function(f::Function, dirname::String, paramkeys::Vector, resultk
232232
end
233233
return r3f
234234
end
235+
export maker3function
235236

236237
function checkfunctionkeywords(f::Function, keyword::Symbol)
237238
m = methods(f)

0 commit comments

Comments
 (0)