Skip to content
Snippets Groups Projects
Commit 24d985f8 authored by Jennifer Rinker's avatar Jennifer Rinker
Browse files

modified setup and installation

parent fd338d84
No related branches found
No related tags found
1 merge request!94Handle disabled mpi
.. _examples:
===========================
Examples
===========================
Eventually we would like to have several TOPFARM examples here to demonstrate
how you can use the code.
......@@ -9,19 +9,8 @@ Welcome to TOPFARM, the wind-farm optimizer
:caption: User Guide
:maxdepth: 2
user_guide/overview
user_guide/installation
user_guide/faqs
.. toctree::
:caption: Developer Guide
:maxdepth: 2
dev_guide/quick_guide
dev_guide/dev_workflow
dev_guide/test_docs
dev_guide/docker_settings
dev_guide/bookkeeping
installation
examples
......
.. _installation:
===========================
Installation
===========================
There are three ways to use TOPFARM:
1. **Lightweight demo**
(`jump to install <file:///C:/Users/rink/Documents/git/topfarm/TopFarm2/docs/build/html/user_guide/installation.html#lightweight-demo>`__)
A small, light version of TOPFARM that is the easiest to install but is not
appropriate for large problems. It utilizes a Docker image that comes with
TOPFARM pre-installed in the image.
2. **Normal installation**
(`jump to install <file:///C:/Users/rink/Documents/git/topfarm/TopFarm2/docs/build/html/user_guide/installation.html#normal-installation>`__)
The standard version for non-developers running larger problems. The
installation is done using Anaconda and requires a correctly configured
gfortran compiler.
3. **Developer installation**
(`jump to install <file:///C:/Users/rink/Documents/git/topfarm/TopFarm2/docs/build/html/user_guide/installation.html#developer-installation>`__)
For people that want to implement new functionalities or fix bugs. It
follows a similar installation procedure as the normal installation, except
that the files from both TOPFARM and its dependent libraries are installed
locally using the editable flag in pip.
1. Lightweight Demo
-------------------
The first installation option is a lightweight demo option that can run simple
calculations but comes with a cost of small memory. This is a good option for
a quick installation and demonstration.
**Please note** this docker image does not exist yet.
Windows 7
^^^^^^^^^
1. Install `Docker Toolbox <https://docs.docker.com/toolbox/toolbox_install_windows/>`_.
2. Pull the docker image from docker hub
3. Activate a bash
4. Run the mini-example
2. Normal Installation
----------------------
This option will install TOPFARM using Anaconda. If you have a Windows
machine, then you must first ensure that your machine is configured to work
with Anaconda and a gfortran compiler (see instructions
`here <file:///C:/Users/rink/Documents/git/topfarm/TopFarm2/docs/build/html/user_guide/installation.html#configuring-windows-for-full-installation>`__).
Windows 7
^^^^^^^^^
1. Make sure your machine is correctly configured for a full installation (see below)
2. Open your Anaconda prompt.
3. Change to the location where you want the TOPFARM files to be stored
::
cd <path to folder>
4. Use git to clone the TOPFARM code
::
git clone https://gitlab.windenergy.dtu.dk/TOPFARM/TopFarm2.git
5. Change the prompt location to the new ``TopFarm2`` folder
::
cd TopFarm2
6. Install TOPFARM and its dependencies using the ``install_topfarm.bat``
file.
::
install_topfarm.bat
7. Run the mini-example
3. Developer Installation
-------------------------
This option will install an editable version of TOPFARM using Anaconda. If you
have a Windows machine, then you must first ensure that your machine is
configured to work with Anaconda and a gfortran compiler (see instructions
`here <file:///C:/Users/rink/Documents/git/topfarm/TopFarm2/docs/build/html/user_guide/installation.html#configuring-windows-for-full-installation>`__).
These instructions are more terse because we expect developers to be slightly
more knowledgeable about tools such as ``git``, ``pip``, etc.
Windows 7
^^^^^^^^^
1. Make sure your machine is correctly configured for a full installation
(see below)
2. Create an environment for TOPFARM and activate it
3. Clone TOPFARM to your computer
4. Clone and install (using pip) the WindIO and FUSED-Wake libraries (URLs can
be found in the ``install_topfarm.bat`` file)
::
cd <path to local library>
pip install -e .
5. Change back to your TOPFARM directory and install it with the editable flag
enabled
::
cd <path to TOPFARM files>
pip install -e .
6. Run the mini-example
Configuring Windows for Full Installation
-----------------------------------------
In order for TOPFARM to work on a Windows machine, that machine should be
configured to have Anaconda with a correctly linked gfortran compiler.
The first step is to install `Anaconda <https://www.anaconda.com/download/>`_
for Python 3.6.
The second (and more complicated) step is to install a gfortran compiler
and configure it to work with Anaconda.
Windows 7
^^^^^^^^^
There are two options: an Intel Fortran compiler or the open-source MinGW-64.
* Install Intel Fortran compiler and activate it by entering the following
command into a command prompt:
::
"C:\\Program Files (x86)\\Intel\\Composer XE\\bin\\ifortvars.bat" intel64
* MinGW (instructions derived from `here <https://www.scivision.co/f2py-running-fortran-code-in-python-on-windows/>`__)
1. Install MinGW-w64 from `Source Forge <https://sourceforge.net/projects/mingw-w64/>`_
with the following options:
* Architecture: ``x86_64``
* Threads: ``posix``
* Exception: ``seh``
* Build revision: ``0``
* Destination folder: ``c:\mingw``
2. Add MinGW bin folder (``C:\mingw\mingw64\bin``) to your path variable
3. Verify you can use gcc by typing ``gcc`` into a new Anaconda prompt and
checking that there is a fatal error of ``no input files``
4. If you do not have a file called ``distutils.cfg`` in one of the following
locations, create it:
1. ``c:\Anaconda\Lib\distutils\distutils.cfg`` **or**
2. ``<user_folder>\AppData\Local\Continuum\Miniconda3\Lib\distutils\distutils.cfg``
5. Add text to the config file or modify the existing file to have the
following contents:
::
[build]
compiler=mingw32
.. _installation:
===========================
Installation
===========================
How you install TOPFARM on your system.
Windows
-------
Isn't that fantastic that you can create an almighty tree that fast?
We might as well make some Almighty mountains today as well, what the heck.
Fluff it up a little and hypnotize it.
We're not trying to teach you a thing to copy.
We're just here to teach you a technique, then let you loose into the world.
Mac/Linux
---------
I think there's an artist hidden in the bottom of every single one of us.
This is the fun part.
This is your world.
Little trees and bushes grow however makes them happy.
Trees cover up a multitude of sins.
We'll paint one happy little tree right here.
pip install -e %~dp0
\ No newline at end of file
@ECHO OFF
ECHO Installing TOPFARM...
REM Create an environment for TOPFARM
conda create -n pyTopfarm python=3.6 --yes
REM Activate the environment
call activate pyTopfarm
REM Install WindIO and DTU's fork of FUSED-Wake
pip install git+https://github.com/FUSED-Wind/windIO.git
pip install git+https://gitlab.windenergy.dtu.dk/TOPFARM/FUSED-Wake.git
REM Install TOPFARM
pip install .
REM Switch back to the default environment
call activate base
\ No newline at end of file
@ECHO OFF
ECHO Reversing the Topfarm installation...
REM Delete topfarm environment
conda remove --name pyTopfarm --all --yes
\ No newline at end of file
......@@ -10,18 +10,19 @@ setup(name='topfarm',
version='2.0',
description='Topfarm - Wind farm optimization using OpenMDAO',
url='https://gitlab.windenergy.dtu.dk/TOPFARM/topfarm2',
author='MMPE, PIRE, MIKF, RINK',
author_email='mmpe@dtu.dk, pire@dtu.dk, mikf@dtu.dk, rink@dtu.dk',
license='GNU GPL',
author='DTU Wind Energy',
author_email='dave@dtu.dk',
license='MIT',
packages=['topfarm'
],
install_requires=[
'openmdao',
'pytest',
'pytest-cov',
'matplotlib'
],
install_requires=[
'matplotlib', # for plotting
'numpy', # for numerical calculations
'openmdao', # for optimization
'pytest', # for testing
'pytest-cov', # for calculating coverage
'scipy', # constraints
'sphinx', # generating documentation
'sphinx_rtd_theme' # docs theme
],
# files= ['plotting.py',
# 'topfarm.py',
# ],
zip_safe=True)
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