Skip to content
Snippets Groups Projects
Commit 61d0d90d authored by David Verelst's avatar David Verelst
Browse files

updated docs

parent 34a37645
No related branches found
No related tags found
No related merge requests found
Pipeline #
Configure Wine for HAWC2
------------------------
You will also need to configure wine and place the HAWC2 executables in a
directory that wine knows about. First, activate the correct wine environment by
typing in a shell in the Gorm's home directory (it can be activated with
ssh (Linux, Mac) or putty (MS Windows)):
```
g-000 $ WINEARCH=win32 WINEPREFIX=~/.wine32 wine test.exe
```
Optionally, you can also make an alias (a short format for a longer, more complex
command). In the ```.bashrc``` file in your home directory
(```/home/$USER/.bash_profile```), add at the bottom of the file:
```
alias wine32='WINEARCH=win32 WINEPREFIX=~/.wine32 wine'
```
Add a folder called ```bin``` to your wine system's PATH so we can copy all
the HAWC2 executables in here:
```
WINEDIRNAME=".wine32"
WINEARCH=win32 WINEPREFIX=~/$WINEDIRNAME wine regedit /E tmp.reg "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment"
sed -i 's/"PATH"="C:\\\\windows\\\\system32;C:\\\\windows"/"PATH"="C:\\\\windows\\\\system32;C:\\\\windows;C:\\\\bin"/g' tmp.reg
WINEARCH=win32 WINEPREFIX=~/$WINEDIRNAME wine regedit ./tmp.reg
rm ./tmp.reg
```
And now copy all the HAWC2 executables, DLL's (including the license manager)
to your wine directory. You can copy all the required executables, dll's and
the license manager are located at ```/home/MET/hawc2exe```. The following
command will do this copying:
```
g-000 $ cp /home/MET/hawc2exe/* /home/$USER/.wine32/drive_c/bin/
```
Notice that the HAWC2 executable names are ```hawc2-latest.exe```,
```hawc2-118.exe```, etc. By default the latest version will be used and the user
does not need to specify this. However, when you need to compare different version
you can easily do so by specifying which case should be run with which
executable. The file ```hawc2-latest.exe``` will always be the latest HAWC2
version at ```/home/MET/hawc2exe/```. When a new HAWC2 is released you can
simply copy all the files from there again to update.
...@@ -135,48 +135,40 @@ export PATH=$PATH:/home/MET/STABCON/repositories/toolbox/pbsutils/ ...@@ -135,48 +135,40 @@ export PATH=$PATH:/home/MET/STABCON/repositories/toolbox/pbsutils/
``` ```
(The corresponding open repository is on the DTU Wind Energy Gitlab server: (The corresponding open repository is on the DTU Wind Energy Gitlab server:
[pbsutils](https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox). Please [pbsutils](https://gitlab.windenergy.dtu.dk/toolbox/pbsutils). Please
considering reporting bugs and/or suggest improvements there. You're contributions considering reporting bugs and/or suggest improvements there. You're contributions
are much appreciated!) are much appreciated!)
If you have been using an old version of this how-to, you might be pointing If you have been using an old version of this how-to, you might be pointing
to an earlier version of these tools/utils and its reference should be removed to an earlier version of these tools/utils and any references containing
from your ```.bash_profile``` file: ```cluster-tools``` or ```prepost``` should be removed
from your ```.bash_profile``` file.
``` After modifying ```.bash_profile```, save and close it. Then, in the terminal,
export PATH=$PATH:/home/MET/STABCON/repositories/cluster-tools/ run the command:
```
After modifying ```.bash_profile```, save and close it. Then, in the terminal, run the command:
``` ```
g-000 $ source ~/.bash_profile g-000 $ source ~/.bash_profile
``` ```
In order for any changes made in ```.bash_profile``` to take effect, you need to either ```source``` it (as shown above), or log out and in again.
You will also need to configure wine and place the HAWC2 executables in a You will also need to configure wine and place the HAWC2 executables in your
directory that wine knows about. First, activate the correct wine environment by local wine directory, which by default is assumed to be ```~/.wine32```, and
typing in a shell in the Gorm's home directory (it can be activated with ```pbsutils``` contains and automatic configuration script you can run:
ssh (Linux, Mac) or putty (MS Windows)):
``` ```
g-000 $ WINEARCH=win32 WINEPREFIX=~/.wine32 wine test.exe g-000 $ ./config-wine-hawc2.sh
``` ```
Optionally, you can also make an alias (a short format for a longer, more complex If you need more information on what is going on, you can read a more detailed
command). In the ```.bashrc``` file in your home directory description [here]
(```/home/$USER/.bash_profile```), add at the bottom of the file: (https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/blob/master/docs/configure-wine.md).
```
alias wine32='WINEARCH=win32 WINEPREFIX=~/.wine32 wine'
```
And now copy all the HAWC2 executables, DLL's (including the license manager) All your HAWC2 executables and DLL's are now located at
to your wine directory. You can copy all the required executables, dll's and ```/home/$USER/.wine32/drive_c/bin```. When there is a new version of HAWC2, or
the license manager are located at ```/home/MET/hawc2exe```. The following when a new license manager is released, you can update your local wine directory
command will do this copying: as follows:
``` ```
g-000 $ cp /home/MET/hawc2exe/* /home/$USER/.wine32/drive_c/windows/system32 g-000 $ cp /home/MET/hawc2exe/* /home/$USER/.wine32/drive_c/bin/
``` ```
Notice that the HAWC2 executable names are ```hawc2-latest.exe```, Notice that the HAWC2 executable names are ```hawc2-latest.exe```,
...@@ -280,18 +272,13 @@ First activate the Anaconda Python environment by typing: ...@@ -280,18 +272,13 @@ First activate the Anaconda Python environment by typing:
# add the Anaconda Python environment paths to the system PATH # add the Anaconda Python environment paths to the system PATH
g-000 $ export PATH=/home/MET/STABCON/miniconda/bin:$PATH g-000 $ export PATH=/home/MET/STABCON/miniconda/bin:$PATH
# activate the custom python environment: # activate the custom python environment:
g-000 $ source activate anaconda g-000 $ source activate wetb_py3
# add the Pythone libraries to the PYTHONPATH
g-000 $ export PYTHONPATH=/home/MET/STABCON/repositories/prepost:$PYTHONPATH
g-000 $ export PYTHONPATH=/home/MET/STABCON/repositories/pythontoolbox/fatigue_tools:$PYTHONPATH
g-000 $ export PYTHONPATH=/home/MET/STABCON/repositories/pythontoolbox:$PYTHONPATH
g-000 $ export PYTHONPATH=/home/MET/STABCON/repositories/MMPE:$PYTHONPATH
``` ```
For example, launch the auto-generation of DLCs input files: For example, launch the auto-generation of DLCs input files:
``` ```
g-000 $ cd path/to/HAWC2/model # folder where the hawc2 model is located g-000 $ cd path/to/HAWC2/model # folder where the hawc2 model is located
g-000 $ python /home/MET/STABCON/repositories/prepost/dlctemplate.py --prep g-000 $ python dlctemplate.py --prep
``` ```
Or start an interactive IPython shell: Or start an interactive IPython shell:
...@@ -309,10 +296,12 @@ jammed. ...@@ -309,10 +296,12 @@ jammed.
Method C: Generating htc input files locally Method C: Generating htc input files locally
-------------------------------------------- --------------------------------------------
This approach gives you total freedom, but is also more difficult since you This approach gives you more flexibility and room for custimizations, but you
will have to have fully configured Python environment installed locally. will need to install a Python environment with all its dependencies locally.
Additionally, you need access to the cluster discs from your local workstation. Additionally, you need access to the cluster discs from your local workstation.
Method C is not documented yet.
The installation procedure for wetb is outlined in the [installation manual]
(https://gitlab.windenergy.dtu.dk/toolbox/WindEnergyToolbox/blob/master/docs/install-manual-detailed.md).
Optional configuration Optional configuration
...@@ -546,15 +535,16 @@ optional arguments: ...@@ -546,15 +535,16 @@ optional arguments:
--envelopeturbine calculate the load envelope for sensors on the turbine --envelopeturbine calculate the load envelope for sensors on the turbine
``` ```
The load envelopes are computed for sensors specified in the The load envelopes are computed for sensors specified in the
```dlctemplate.py``` file. The sensors are specified in a list of lists. The ```dlctemplate.py``` file. The sensors are specified in a list of lists. The
inner list contains the sensors at one location. The envelope is computed for inner list contains the sensors at one location. The envelope is computed for
the first two sensors of the inner list and the other sensors are used to the first two sensors of the inner list and the other sensors are used to
retrieve the remaining loads defining the load state occurring at the same retrieve the remaining loads defining the load state occurring at the same
instant. The outer list is used to specify sensors at different locations. instant. The outer list is used to specify sensors at different locations.
The default values for the blade envelopes are used to compute the Mx-My The default values for the blade envelopes are used to compute the Mx-My
envelopes and retrieve the Mz-Fx-Fy-Fz loads occuring at the same moment. envelopes and retrieve the Mz-Fx-Fy-Fz loads occuring at the same moment.
Debugging Debugging
--------- ---------
......
# Installation manual
## Anaconda or Miniconda
```
conda update --all
conda create -n wetb_py3 python=3.5
source activate wetb_py3
conda install setuptools_scm future h5py pytables pytest nose sphinx
conda install scipy pandas matplotlib cython xlrd sphinx
pip install pyscaffold pytest-cov
```
...@@ -29,7 +29,7 @@ python-pytables. ...@@ -29,7 +29,7 @@ python-pytables.
* Other tools you will need: * Other tools you will need:
> git gcc > git gcc gcc-fortran (gfortran)
## Mac ## Mac
...@@ -165,14 +165,15 @@ activate py27 ...@@ -165,14 +165,15 @@ activate py27
* Install the necessary Python dependencies using the conda package manager: * Install the necessary Python dependencies using the conda package manager:
``` ```
conda install scipy pandas matplotlib cython xlrd pytables sphinx nose setuptools_scm future h5py conda install setuptools_scm future h5py pytables pytest pytest-cov nose sphinx
conda install scipy pandas matplotlib cython xlrd sphinx
``` ```
* Not all packages are available in the conda repositories, but they can be * Not all packages are available in the conda repositories, but they can be
easily installed with pip: easily installed with pip:
``` ```
pip install pyscaffold pytest pytest-cov pip install pyscaffold pytest
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment