Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
software:gurobi:caviness [2020-04-16 18:51] – [MPI Python Environment] anita | software:gurobi:caviness [2021-03-12 14:04] – anita | ||
---|---|---|---|
Line 131: | Line 131: | ||
The below steps are based on copying a template job script and modifying '' | The below steps are based on copying a template job script and modifying '' | ||
- | <note tip>It is a good idea to periodically check in ''/ | + | <note tip>It is a good idea to periodically check in ''/ |
To start, use VALET to load Gurobi and Anaconda. Once those two packages are loaded, the Gurobi Anaconda environment will need to be activated. After the Gurobi Anaconda environment is activated, then the python script that uses Gurobi can be called and ran. After the python script has completed, then the Gurobi Anaconda environment will be need to be deactivated. | To start, use VALET to load Gurobi and Anaconda. Once those two packages are loaded, the Gurobi Anaconda environment will need to be activated. After the Gurobi Anaconda environment is activated, then the python script that uses Gurobi can be called and ran. After the python script has completed, then the Gurobi Anaconda environment will be need to be deactivated. | ||
Line 152: | Line 152: | ||
source activate ~${USER}/ | source activate ~${USER}/ | ||
- | python | + | python3 |
source deactivate | source deactivate | ||
Line 171: | Line 171: | ||
source activate ~${USER}/ | source activate ~${USER}/ | ||
- | python | + | python3 |
source deactivate | source deactivate | ||
Line 248: | Line 248: | ||
</ | </ | ||
- | Now rollback all the packages in VALET which also deactivates your environment too and returns | + | Now rollback all the packages in VALET which also deactivates your environment too and then return |
<code bash> | <code bash> | ||
Line 256: | Line 256: | ||
</ | </ | ||
- | Now, create a VALET package to handle the environment setup/ | + | Now, create a VALET package to handle the environment setup/ |
<code bash> | <code bash> | ||
Line 278: | Line 278: | ||
</ | </ | ||
- | Thereafter, here is a simple test using VALET to load the environment and test we have the correct version of python3: | + | <note important> |
+ | |||
+ | Check if the '' | ||
<code bash> | <code bash> | ||
- | [(it_css: | + | [(it_css: |
+ | .valet: directory | ||
+ | </ | ||
+ | |||
+ | and in this case the directory does not exist, so create it: | ||
+ | |||
+ | <code bash> | ||
+ | [(it_css: | ||
+ | .valet: cannot open (No such file or directory) | ||
+ | [(it_css: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Thereafter, here is a simple test using VALET to load the environment, | ||
+ | |||
+ | <code bash> | ||
+ | [(it_css: | ||
Adding dependency `libfabric/ | Adding dependency `libfabric/ | ||
Adding dependency `openmpi/ | Adding dependency `openmpi/ | ||
Line 287: | Line 305: | ||
Adding dependency `gurobi/ | Adding dependency `gurobi/ | ||
Adding package `gurobi-env/ | Adding package `gurobi-env/ | ||
- | |||
(/ | (/ | ||
/ | / | ||
+ | (/ | ||
+ | Python 3.7.7 (default, Mar 26 2020, 15:48:22) | ||
+ | [GCC 7.3.0] :: Anaconda, Inc. on linux | ||
+ | Type " | ||
+ | >>> | ||
+ | >>> | ||
+ | >>> | ||
+ | (/ | ||
+ | [(it_css: | ||
</ | </ | ||
Line 298: | Line 324: | ||
<note tip>It is a good idea to periodically check in ''/ | <note tip>It is a good idea to periodically check in ''/ | ||
- | The '' | + | The '' |