Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two tests fail after installation #66

Open
fperrone2 opened this issue Feb 13, 2015 · 15 comments
Open

Two tests fail after installation #66

fperrone2 opened this issue Feb 13, 2015 · 15 comments
Assignees
Labels

Comments

@fperrone2
Copy link

No description provided.

@fperrone2
Copy link
Author

I have installed OpenMDAO correctly. After activating OpenMDAO e being in Fusedwind folder, I did the following:

C:\fusedwind> python setup.py install
C:\fusedwind> plugin install

I then tried to run the tests one by one. The all succeed, except for

test_loadcaseIO.py
test_plant_flow_asym.py

Do you have a clue why?

@fzahle
Copy link
Member

fzahle commented Feb 13, 2015

Hi fperrone2,
First of all you don't need to run both python setup.py install and plugin install. The latter essentially does what the first one does except it installs the code as a so-called develop egg so you can edit the source from where you checked out the code. To be sure that all is OK, best thing is probably to remove the fusedwind egg from <python install dir>/Lib/site-packages/fusedwind* and then rerun plugin install.

That said, I don't think the above should give rise to the errors you're getting. Are you running the develop branch or the 0.1.0 of FUSED-Wind? Also, FUSED-Wind currently only supports OpenMDAO v0.10.3.2, so please make sure you're not on either their dev branch or v0.12.0.

@fzahle fzahle added the support label Feb 13, 2015
@fperrone2
Copy link
Author

Well, I am using OpenMDAO v0.10.3.2 and FUSED-Wind v0.1.0.
I also have a second question: could you please indicate all the Python packages required to correctly run FUSED-Wind? The list given on the webpage is definitively not complete, since in the very eary stages also other tests failed because of missing Python packages (like ipdb for example).

@fzahle
Copy link
Member

fzahle commented Feb 13, 2015

the ipdb import shouldn't have been there, now removed. Which other packages did you need to install that wasn't listed as dependencies?

Could you please paste in the output of the error you're getting when running the tests?

@fperrone2
Copy link
Author

If I remember right, I also needed ipython (which is not on the list) and one onether package, whose name I cannot currently recall.
You said ipdb is "now" removed: you mean from the new dev version? Anyway I'm giving another try to the installation. I will report whether it went through or not.

@fperrone2
Copy link
Author

So, after re-installing, test_loadcaseIO.py runs through (after commenting out "import ipdb"); however I still have issues with test_plant_flow_asym. The report is the following:

(openmdao-0.10.3.2) C:\Users\PerroneF\Desktop\fusedwind-0.1.0\src\fusedwind\test

python test_plant_flow_asym.py
:0: FutureWarning: IPython widgets are experimental and may change in the future
.

EE.E.E

ERROR: test_configure (main.test_AEPMultipleWindRoses)

Traceback (most recent call last):
File "test_plant_flow_asym.py", line 59, in test_configure
aep = AEPMultipleWindRoses()
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 209, in init
super(FUSEDAssembly, self).init()
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\assembly.py", line 175, in init
set_as_top(self, first_only=True)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\assembly.py", line 71, in set_as_top
cont.cpath_updated()
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\component.py", line 378, in cpath_updated
self.configure()
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\plant_flow\asym.
py", line 236, in configure
self.add('case_gen', MultipleWindRosesCaseGenerator())
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 228, in add
obj = self._add(name, obj, replace=True)
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 272, in _add
return super(FUSEDAssembly, self).add(name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\component.py", line 598, in add
super(Component, self).add(name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\container.py", line 592, in add
setattr(self, name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\datatypes\instance.py", line 90, in validate
self._iface_error(obj, name, self.klass.name)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\datatypes\instance.py", line 114, in _iface_error
(name, iface_name), TypeError)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\container.py", line 1451, in raise_exception
raise exception_class(full_msg)
TypeError: : case_gen must provide interface 'IGenericWindRoseCaseGenerator'

ERROR: test_execute (main.test_AEPMultipleWindRoses)

Traceback (most recent call last):
File "test_plant_flow_asym.py", line 64, in test_execute
cG.add('wf', MyTestWindFarm())
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 228, in add
obj = self._add(name, obj, replace=True)
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 272, in _add
return super(FUSEDAssembly, self).add(name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\component.py", line 598, in add
super(Component, self).add(name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\container.py", line 592, in add
setattr(self, name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\datatypes\instance.py", line 90, in validate
self._iface_error(obj, name, self.klass.name)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\datatypes\instance.py", line 114, in _iface_error
(name, iface_name), TypeError)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\container.py", line 1451, in raise_exception
raise exception_class(full_msg)
TypeError: : wf must provide interface 'IGenericWindFarm'

ERROR: test_configure (main.test_AEPSingleWindRose)

Traceback (most recent call last):
File "test_plant_flow_asym.py", line 23, in test_configure
aep.configure()
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\plant_flow\asym.
py", line 193, in configure
self.add('case_gen', SingleWindRoseCaseGenerator())
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 228, in add
obj = self._add(name, obj, replace=True)
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 272, in _add
return super(FUSEDAssembly, self).add(name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\component.py", line 598, in add
super(Component, self).add(name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\container.py", line 592, in add
setattr(self, name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\datatypes\instance.py", line 90, in validate
self._iface_error(obj, name, self.klass.name)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\datatypes\instance.py", line 114, in _iface_error
(name, iface_name), TypeError)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\container.py", line 1451, in raise_exception
raise exception_class(full_msg)
TypeError: : case_gen must provide interface 'IGenericWindRoseCaseGenerator'

ERROR: test_run (main.test_AEPSingleWindRose)

Traceback (most recent call last):
File "test_plant_flow_asym.py", line 28, in test_run
aep.add('wf', TestWindFarm())
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 228, in add
obj = self._add(name, obj, replace=True)
File "c:\users\perronef\desktop\fusedwind-0.1.0\src\fusedwind\interface.py", l
ine 272, in _add
return super(FUSEDAssembly, self).add(name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\component.py", line 598, in add
super(Component, self).add(name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\container.py", line 592, in add
setattr(self, name, obj)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\datatypes\instance.py", line 90, in validate
self._iface_error(obj, name, self.klass.name)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\datatypes\instance.py", line 114, in _iface_error
(name, iface_name), TypeError)
File "C:\OpenMDAO\openmdao-0.10.3.2\lib\site-packages\openmdao.main-0.10.3.2-p
y2.7.egg\openmdao\main\container.py", line 1451, in raise_exception
raise exception_class(full_msg)
TypeError: : wf must provide interface 'IGenericWindFarm'


Ran 6 tests in 0.047s

FAILED (errors=4)

Are you able to easily detect where the issue is? I thank you for the support.

@fzahle
Copy link
Member

fzahle commented Feb 13, 2015

I'll assign this to @piredtu since its his code you're having issues with.

@fperrone2
Copy link
Author

As far as I see, the problem is related to 'IGenericWindRoseCaseGenerator' and 'IGenericWindFarm' interfaces.

@fzahle
Copy link
Member

fzahle commented Feb 13, 2015

weird, I can't reproduce the error on Mac, but in Windows I can. @piredtu, something goes wrong with this InterfaceSlot you use in your code:

https://github.com/FUSED-Wind/fusedwind/blob/develop/src/fusedwind/plant_flow/asym.py#L171

@fperrone2
Copy link
Author

Yep, I forgot saying that I do work on a Windows machine.

rethore added a commit that referenced this issue Feb 13, 2015
@rethore
Copy link
Member

rethore commented Feb 13, 2015

Hi @fperrone2 ,
Thanks for reporting this. It's indeed only an issue under Windows. @fzahle and I mostly develop under mac, so this bug went under our radar.
I have commented out some of the worst offender. The test should hopefully pass now. This is a temporary fix, so I'm not closing this issue yet. I'm going in vacation next week, so nothing new will happen before I'm back.

@fperrone2
Copy link
Author

So now I should just download again FUSED-Wind from the github repository, install and run the tests again?

@rethore
Copy link
Member

rethore commented Feb 13, 2015

If you do a git pull in the fusedwind directory, that should download the newest commits. After that, you should be able to run the tests directly. I don't have to reinstall all the time, but I'm not 100% sure this will work for you as you are using a different setup that I do. If it doesn't work, try to re-install fused wind again (setup.py install...)

@fperrone2
Copy link
Author

I just checked the tests again and, as hoped, they all succeeded.
The last question I have so far is: since now all the tests worked out, am I in the position of running the tutorials without major efforts?
However, for the future, I'd like knowing if this mini Windows-bug will be successfully solved.

@rethore
Copy link
Member

rethore commented Feb 13, 2015

Yes, the tutorials should be functional now.
We do plan to support windows, linux and mac. So the bug will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants