wafo-project / pywafo

Wave Analysis for Fatigue and Oceanography
http://www.maths.lth.se/matstat/wafo/
Other
94 stars 42 forks source link

Hmcdev #17

Closed eelcovv closed 8 years ago

eelcovv commented 8 years ago

Hi I fixed a bug in the source for plot_wave (in object.py) line 2215 subplot(nsub, 1, ix) - > subplot(nsub, 1, ix+1)

Also I have updated the tutorials chapter 1 t/m 5 because they would not all run.

I thought to share my update.

Thanks Eelco

davidovitch commented 8 years ago

@eelcovv thanks a lot for your contribution, much appreciated! There are some big changes that we should get into master first (from the pipinstall branch, see issue #14). Then we'll bring these one in.

davidovitch commented 8 years ago

@eelcovv I am in the process of further improving the new layout of the package, and the installation procedure. Although wafo now also compiles all the extensions via setuptools (so it becomes pip installable), I did brake some other parts. I think it will still be nice to get your fixes to the tutorial in here. The general layout of the files/documentation should not change any more, so there is nothing stopping us from merging your improvements into the master.

eelcovv commented 8 years ago

Hi David,

I think the most important change is the bug fix related to plot_wave. This function did not work and should be fixed.

The updates in the tutorial are less important. I replaced the from matplotlib.pylab import * into import matplotlib.pyplot as plt (the former is discouraged). And added some try/except statement around critical parts which are crashing.

Anyway, I can not see my pull request anymore. Should I submit it again ? Hopefully the bug fix can be carried out in my next release. I would be good if pywafo can be installed with pip. Actually, I already installed it before via conda install. Is this repository version also supported by you

Regards Eelco

2016-02-01 19:07 GMT+01:00 David Verelst notifications@github.com:

@eelcovv https://github.com/eelcovv I am in the process of further improving the new layout of the package, and the installation procedure. Although wafo now also compiles all the extensions via setuptools (so it becomes pip installable), I did brake some other parts. I think it will still be nice to get your fixes to the tutorial in here. The general layout of the files/documentation should not change any more.

— Reply to this email directly or view it on GitHub https://github.com/wafo-project/pywafo/pull/17#issuecomment-178102765.

davidovitch commented 8 years ago

Hi Eelco @eelcovv

I think you closed the PR and deleted the branch that holds the PR. From my perspective it would be ideal if you would apply this PR on top of the latest master. You might need to resolve some merge conflicts in that process due to files being moved, but I am not sure. Let me know if that's too much, so I put it on my to-do list.

The anaconda packages have been provide by @ocefpaf

ocefpaf commented 8 years ago

Hi @eelcovv and @davidovitch,

Just to let you know I will be moving the pywafo conda package to a community channel called conda-forge. (See https://github.com/conda-forge for more info.)

I guess that is a better home for the package. I will update it with the latest release at soon #14 is sorted out.

davidovitch commented 8 years ago

@ocefpaf sounds like a really nice initiative, thanks! I know the progress is slow, but I am not giving up on #14 just yet :-)

eelcovv commented 8 years ago

Hi David

I have merged my branch into the master. I am not able to compile the code yet. I have anaconda 2.4.1 as a python distribution and I am getting an errror as attached to the text file

Is there something wrong with my python installation or is this the bug you were working on?

Regards Eelco

2016-02-06 12:14 GMT+01:00 David Verelst notifications@github.com:

Hi Eelco @eelcovv https://github.com/eelcovv

I think you closed the PR and deleted the branch that holds the PR. From my perspective it would be ideal if you would apply this PR on top of the latest master. You might need to resolve some merge conflicts in that process due to files being moved, but I am not sure. Let me know if that's too much, so I put it on my to-do list.

The anaconda packages have been provide by @ocefpaf https://github.com/ocefpaf

— Reply to this email directly or view it on GitHub https://github.com/wafo-project/pywafo/pull/17#issuecomment-180738778.

running bdist_wheel running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler options running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options running build_src build_src building library "_mvnprdmod" sources building library "_cov2mod" sources building library "_rindmod" sources building extension "wafo.c_library" sources f2py options: [] adding 'build\src.win-amd64-2.7\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7' to include_dirs. building extension "wafo.mvn" sources f2py options: [] adding 'build\src.win-amd64-2.7\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7' to include_dirs. adding 'build\src.win-amd64-2.7\wafo\source\mvn\mvn-f2pywrappers.f' to sources. building extension "wafo.mvnprdmod" sources f2py options: [] adding 'build\src.win-amd64-2.7\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7' to include_dirs. building extension "wafo.cov2mod" sources f2py options: [] adding 'build\src.win-amd64-2.7\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7' to include_dirs. building extension "wafo.rindmod" sources f2py options: [] adding 'build\src.win-amd64-2.7\fortranobject.c' to sources. adding 'build\src.win-amd64-2.7' to include_dirs. build_src: building npy-pkg config files running build_py running build_clib Looking for python27.dll customize Mingw32CCompiler customize Mingw32CCompiler using build_clib customize GnuFCompiler Could not locate executable g77 Could not locate executable f77 customize IntelVisualFCompiler Could not locate executable ifort Could not locate executable ifl customize AbsoftFCompiler Could not locate executable f90 customize CompaqVisualFCompiler Could not locate executable DF customize IntelItaniumVisualFCompiler Could not locate executable efl customize Gnu95FCompiler Found executable C:\Apps\Anaconda\Anaconda2\Scripts\gfortran.bat Found executable C:\Apps\Anaconda\Anaconda2\Scripts\gfortran.bat customize Gnu95FCompiler customize Gnu95FCompiler using build_clib running build_ext Looking for python27.dll customize Mingw32CCompiler customize Mingw32CCompiler using build_ext customize GnuFCompiler customize IntelVisualFCompiler customize AbsoftFCompiler customize CompaqVisualFCompiler customize IntelItaniumVisualFCompiler customize Gnu95FCompiler customize Gnu95FCompiler customize Gnu95FCompiler using build_ext building 'wafo.mvnprdmod' extension compiling C sources C compiler: gcc -march=x86-64 -mtune=generic -DMS_WIN64 -O2 -msse2 -Wall -Wstrict-prototypes

compile options: '-DNPY_MINGW_USE_CUSTOM_MSVCR -DMSVCRT_VERSION__=0x0900 -Ibuild\src.win-amd64-2.7 -IC:\Apps\Anaconda\Anaconda2\lib\site-packages\numpy\core\include -IC:\Apps\Anaconda\Anaconda2\include -IC:\Apps\Anaconda\Anaconda2\PC -c' gcc -march=x86-64 -mtune=generic -DMS_WIN64 -O2 -msse2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -DMSVCRT_VERSION=0x0900 -Ibuild\src.win-amd64-2.7 -IC:\Apps\Anaconda\Anaconda2\lib\site-packages\numpy\core\include -IC:\Apps\Anaconda\Anaconda2\include -IC:\Apps\Anaconda\Anaconda2\PC -c build\src.win-amd64-2.7\wafo\mvnprdmodmodule.c -o build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\wafo\mvnprdmodmodule.o Found executable C:\Apps\Anaconda\Anaconda2\Scripts\gcc.bat gcc -march=x86-64 -mtune=generic -DMS_WIN64 -O2 -msse2 -Wall -Wstrict-prototypes -DNPY_MINGW_USE_CUSTOM_MSVCR -D__MSVCRT_VERSION=0x0900 -Ibuild\src.win-amd64-2.7 -IC:\Apps\Anaconda\Anaconda2\lib\site-packages\numpy\core\include -IC:\Apps\Anaconda\Anaconda2\include -IC:\Apps\Anaconda\Anaconda2\PC -c build\src.win-amd64-2.7\fortranobject.c -o build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\fortranobject.o compiling Fortran sources Fortran f77 compiler: C:\Apps\Anaconda\Anaconda2\Scripts\gfortran.bat -Wall -g -ffixed-form -fno-second-underscore -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2 Fortran f90 compiler: C:\Apps\Anaconda\Anaconda2\Scripts\gfortran.bat -Wall -g -fno-second-underscore -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2 Fortran fix compiler: C:\Apps\Anaconda\Anaconda2\Scripts\gfortran.bat -Wall -g -ffixed-form -fno-second-underscore -Wall -g -fno-second-underscore -O2 -march=x86-64 -DMS_WIN64 -mtune=generic -msse2 compile options: '-Ibuild\src.win-amd64-2.7 -IC:\Apps\Anaconda\Anaconda2\lib\site-packages\numpy\core\include -IC:\Apps\Anaconda\Anaconda2\include -IC:\Apps\Anaconda\Anaconda2\PC -c' gfortran.bat:f77: wafo\source\mreg\cov2mmpdfreg_intfc.f C:\Apps\Anaconda\Anaconda2\Scripts\gfortran.bat -Wall -g -Wall -g -shared -Wl,-gc-sections -Wl,-s build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\wafo\mvnprdmodmodule.o build\temp.win-amd64-2.7\Release\build\src.win-amd64-2.7\fortranobject.o build\temp.win-amd64-2.7\Release\wafo\source\mreg\cov2mmpdfreg_intfc.o -Lc:\apps\anaconda\anaconda2\mingw\lib\gcc\x86_64-w64-mingw32\4.7.0 -LC:\Apps\Anaconda\Anaconda2\libs -LC:\Apps\Anaconda\Anaconda2\PCbuild\amd64 -LC:\Apps\Anaconda\Anaconda2\PC\VS9.0\amd64 -Lbuild\temp.win-amd64-2.7 -l_mvnprdmod -lpython27 -lgfortran -o build\lib.win-amd64-2.7\wafo\mvnprdmod.pyd build\temp.win-amd64-2.7\Release\wafo\source\mreg\cov2mmpdfregintfc.o: In function `initinteg': C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:39: undefined reference to__rintmod_MOD_c' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:34: undefined reference toepsmod_MOD_eps' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:35: undefined reference to`epsmod_MOD_epss' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:32: undefined reference to __infcmod_MOD_iac' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:36: undefined reference toepsmod_MOD_eps0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:37: undefined reference to `rintmod_MOD_c' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:33: undefined reference to__infcmod_MOD_isq' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:39: undefined reference tomregmod_MOD_fi' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:39: undefined reference to`mregmod_MOD_fi' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:39: undefined reference to __rintmod_MOD_fc' build\temp.win-amd64-2.7\Release\wafo\source\mreg\cov2mmpdfreg_intfc.o: In functioncov2mmpdfreg_': C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:122: undefined reference to __intfcmod_MOD_initlevels' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:139: undefined reference tointfcmod_MOD_transf' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:145: undefined reference to `intfcmod_MOD_transf' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:153: undefined reference to__intfcmod_MOD_covg' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:157: undefined reference toepsmod_MOD_eps' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:354: undefined reference to`checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:354: undefined reference to __checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:356: undefined reference tocheckmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:356: undefined reference to `checkmod_MOD_iii01' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:357: undefined reference to__checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:357: undefined reference tocheckmod_MOD_iii11' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:358: undefined reference to`checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:358: undefined reference to __checkmod_MOD_iii21' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:359: undefined reference tocheckmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:359: undefined reference to `checkmod_MOD_iii31' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:360: undefined reference to__checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:360: undefined reference tocheckmod_MOD_iii41' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:361: undefined reference to`checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:361: undefined reference to __checkmod_MOD_iii51' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:362: undefined reference tocheckmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:362: undefined reference to `checkmod_MOD_iii61' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:363: undefined reference to__checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:363: undefined reference tocheckmod_MOD_iii71' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:364: undefined reference to`checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:364: undefined reference to __checkmod_MOD_iii81' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:365: undefined reference tocheckmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:365: undefined reference to `checkmod_MOD_iii91' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:366: undefined reference to__checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:366: undefined reference tocheckmod_MOD_iii101' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:367: undefined reference to`checkmod_MOD_iii0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:230: undefined reference to __epsmod_MOD_eps' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:287: undefined reference toepsmod_MOD_eps0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:292: undefined reference to `epsmod_MOD_eps0' C:\Data\Eelco\Python Scripts\Thirdparty\pywafo_org\pywafo/wafo/source/mreg/cov2mmpdfreg_intfc.f:300: undefined reference to`__mregmod_MOD_mreg' collect2.exe: error: ld returned 1 exit status

davidovitch commented 8 years ago

Yes, it think it could be related. I am not sure when I will be able to resolve this issue though...maybe somewhere in March...

eelcovv commented 8 years ago

Dear David,

I am mailing you directly as I am not sure were to put this question

I have developed Fatigue code which needs the rainflow algorithm to calculate the damage. Initialy I just the

tp = turning_points.cycle_pair()

to get the cycle pairs, but I noticed that this give me the min/max cycles

Now I am using

sig_cycles = turning_points.cycle_astm()

Which give the correct rainflow cycles.

The problem is: I need to compile the c_library in order to use cycle_astm. This is not a problem under Linux (it works), however, eventually the code must run under a win-64 machine.

If I install pywafo using the conda repository I get a message the c_library can not be loaded as it is a win-32 binary, whereas I am sure I have downloaded the win-64

So anaconda does not seem to work

What is left that I compile the c_library myself. I get a problem

I have both downloaded the CL MS visual++ compiler for python27 and the mingw

If I manually try to compile the c_functions.c with mingw according to the text Install gfortran and run the following to build the module on windows:

     *   f2py c_library.pyf c_functions.c -c --fcompiler=gnu95

--compiler=mingw32 -lmsvcr71

I get the message that the python27.dll is not recognised. Just running

python setup.py build

gives the same message.

Do you have any advice on how to compile the pywafo tool box (especially c_functions) under windows ?

Hopefully you can help me as I am stuck here

Thanks

Eelco

2016-02-08 14:03 GMT+01:00 David Verelst notifications@github.com:

Yes, it think it could be related. I am not sure when I will be able to resolve this issue though...maybe somewhere in March...

— Reply to this email directly or view it on GitHub https://github.com/wafo-project/pywafo/pull/17#issuecomment-181356830.

davidovitch commented 8 years ago

@eelcovv lets continue this discussion in #26