mailRe: Development of the relax-disp branch.


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Troels Emtekær Linnet on May 14, 2013 - 17:52:
I will close this thread, and report the test-suite result for 

winpython 32 bit, relax "C:\WinPython27\WinPython-32bit-2.7.4.1\relax>relax --test-suite > relax32_test-suite.txt"
winpython 64 bit, relax "C:\WinPython27\WinPython-64bit-2.7.4.1\relax>relax --test-suite > relax64_test-suite.txt"
winpython 64 bit, relax_disp "C:\WinPython27\WinPython-64bit-2.7.4.1\relax_disp>relax --test-suite > relaxdisp64_test-suite.txt"

I found that you only need to change the scons bug, if you compile 32 bit under 64 bit system.
If you have 64 bit compiler (Visual Studio Professional), you should not alter it.

I put my install notes here for reference:

-------- wiki markup ------------
= Download preparation =
First: Download these packages, do not unpack them yet.
# (.exe): wxPython: http://www.lfd.uci.edu/~gohlke/pythonlibs/#wxpython
# (.exe): scons: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scons
# (.zip): minfx: http://download.gna.org/minfx/
# (.zip): bmrblib: http://download.gna.org/bmrblib/

take amd64 versions if you have a computer with 64 bit.

= Install python and necessary packages =

I recommend to install a python distribution which is packed with several packages already.

== Winpython ==
You could consider winpython, which includes Ipython, numpy, scipy. matplotlib etc.:<br>
[https://code.google.com/p/winpython Homepage]

To fix a current DLL error in Winpython 64 bit, you need to install
[http://www.lfd.uci.edu/~gohlke/pythonlibs/ Microsoft Visual C++ 2008 Redistributable Package (x64)].
[http://www.microsoft.com/en-us/download/details.aspx?id=15336 Download here]

Run the downloaded winpython exe file, and extract for example to: '''C:\WinPython27'''.<br>
Open '''WinPython Control Panel''' in ex. '''C:\WinPython27\WinPython-64bit-2.7.4.1'''<br>
Drag the 4 above mentioned packakes, into the window, and install the packages.<br>
For a command window, use the '''WinPython Command Prompt''' found in '''C:\WinPython27\WinPython-64bit-2.7.4.1''', which fixes path issues for finding python.

= Install Visual Studio Express 2012 =
[http://msdn.microsoft.com/en-us/library/vstudio/hs24szh9.aspx See versions of VS 2012 here].<br>
For 64 bit compiling, you will need, '''Visual Studio Professional''', since it has: 64-bit x64 compiler.<br>
From http://www.microsoft.com/visualstudio/eng/downloads, download and install: [http://go.microsoft.com/?linkid=9810223 Visual Studio Professional 2012 90-day trial].<br>
Skip all extra packages install. After install, just exit any program, which opened after install.

== Bugfix scons for 32bit building - ONLY do this if you have winpython 32 bit. ==
Due to a bug, versions of scons '''<=2.3''' should alter a line in:<br>
'''C:\WinPython27\WinPython-32bit-2.7.4.1\python-2.7.4\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommonvc.py'''

Line '''364''': 
 if not req_target_platform and target_platform in ('amd64','x86_64'):
Should be:
 if target_platform in ('amd64','x86_64'):

= Install Subversion checkout of relax =
Install a subversion client. For example: http://tortoisesvn.net/

Right click in winpython folder: '''C:\WinPython27\WinPython-64bit-2.7.4.1''', and select '''SVN Checkout'''. Write the path:
 svn://svn.gna.org/svn/relax/trunk
 svn://svn.gna.org/svn/relax/branches/relax_disp/

= Build relax = 
Open the '''WinPython Command Prompt''' <br>
Navigate to the SVN checked out relax folder

 cd ..\relax
 scons
 (Scons will automatically find CL.exe, and setup compilation for 64 bit.)

== Modify relax.bat ==
Copy relax.bat to relaxgui.bat

Modify relax.bat:
 32x: %~dp0\..\python-2.7.4\python "%~dp0\relax.py" %*
 64x: %~dp0\..\python-2.7.4.amd64\python "%~dp0\relax.py" %*

Modify relaxgui.bat:
 32x: %~dp0\..\python-2.7.4\python "%~dp0\relax.py" -g %*
 64x: %~dp0\..\python-2.7.4.amd64\python "%~dp0\relax.py" -g %*

= Coding editor =
A lightweight editor, could be pyscripter. <br>
This helps with syntax high-lighting and includes the interpreter. <br>
Install from: https://code.google.com/p/pyscripter/

Then download source rpyc from: https://pypi.python.org/pypi/rpyc/3.2.3 <br>
Drag (.zip) into the winpython installer <br>
To let pyscripter find python, you need to register it in the windows registry. <br>
'''Advanced->Register distribution->Yes'''

Remember to check that indention is set to equal 4 spaces "    ", under Tools/Options/Editor Options <br>
Also set: Run/Python Engine/Remote (Tk)  (Matplotlib uses the Tk) <br>

Test that everything is working, for example by this script, and hit the green play button. <br>
<pre>
from pylab import *
a = array(range(10))
b = 10*a
plot(a,b)
show()
</pre>

-------- HTML markup, converted at: http://www.ffnn.nl/pages/projects/wiki-text-to-html.php  ------------
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Wiki Text to HTML sample</title>
<script>window["_GOOG_TRANS_EXT_VER"] = "1";</script></head>
<body>
<h1>Download preparation</h1>
<p>
First: Download these packages, do not unpack them yet.
</p>
<p>
# (.exe): wxPython: http://www.lfd.uci.edu/~gohlke/pythonlibs/#wxpython
</p>
<p>
# (.exe): scons: http://www.lfd.uci.edu/~gohlke/pythonlibs/#scons
</p>
<p>
# (.zip): minfx: http://download.gna.org/minfx/
</p>
<p>
# (.zip): bmrblib: http://download.gna.org/bmrblib/
</p>
<p>
take amd64 versions if you have a computer with 64 bit.
</p>
<h1>Install python and necessary packages</h1>
<p>
I recommend to install a python distribution which is packed with several packages already.
</p>
<h2>Winpython</h2>
<p>
You could consider winpython, which includes Ipython, numpy, scipy. matplotlib etc.:&lt;br&gt;
</p>
<p>
[https://code.google.com/p/winpython Homepage]
</p>
<p>
To fix a current DLL error in Winpython 64 bit, you need to install
</p>
<p>
[http://www.lfd.uci.edu/~gohlke/pythonlibs/ Microsoft Visual C++ 2008 Redistributable Package (x64)].
</p>
<p>
[http://www.microsoft.com/en-us/download/details.aspx?id=15336 Download here]
</p>
<p>
Run the downloaded winpython exe file, and extract for example to: <b>C:\WinPython27</b>.&lt;br&gt;
</p>
<p>
Open <b>WinPython Control Panel</b> in ex. <b>C:\WinPython27\WinPython-64bit-2.7.4.1</b>&lt;br&gt;
</p>
<p>
Drag the 4 above mentioned packakes, into the window, and install the packages.&lt;br&gt;
</p>
<p>
For a command window, use the <b>WinPython Command Prompt</b> found in <b>C:\WinPython27\WinPython-64bit-2.7.4.1</b>, which fixes path issues for finding python.
</p>
<h1>Install Visual Studio Express 2012</h1>
<p>
[http://msdn.microsoft.com/en-us/library/vstudio/hs24szh9.aspx See versions of VS 2012 here].&lt;br&gt;
</p>
<p>
For 64 bit compiling, you will need, <b>Visual Studio Professional</b>, since it has: 64-bit x64 compiler.&lt;br&gt;
</p>
<p>
From http://www.microsoft.com/visualstudio/eng/downloads, download and install: [http://go.microsoft.com/?linkid=9810223 Visual Studio Professional 2012 90-day trial].&lt;br&gt;
</p>
<p>
Skip all extra packages install. After install, just exit any program, which opened after install.
</p>
<h2>Bugfix scons for 32bit building - ONLY do this if you have winpython 32 bit.</h2>
<p>
Due to a bug, versions of scons <b>&lt;=2.3</b> should alter a line in:&lt;br&gt;
</p>
<p>
<b>C:\WinPython27\WinPython-32bit-2.7.4.1\python-2.7.4\Lib\site-packages\scons-2.3.0\SCons\Tool\MSCommonvc.py</b>
</p>
<p>
Line <b>364</b>:
</p>
 if not req_target_platform and target_platform in ('amd64','x86_64'):
<p>
Should be:
</p>
 if target_platform in ('amd64','x86_64'):
<h1>Install Subversion checkout of relax</h1>
<p>
Install a subversion client. For example: http://tortoisesvn.net/
</p>
<p>
Right click in winpython folder: <b>C:\WinPython27\WinPython-64bit-2.7.4.1</b>, and select <b>SVN Checkout</b>. Write the path:
</p>
 svn://svn.gna.org/svn/relax/trunk
 svn://svn.gna.org/svn/relax/branches/relax_disp/
<h1>Build relax</h1>
<p>
Open the <b>WinPython Command Prompt</b> &lt;br&gt;
</p>
<p>
Navigate to the SVN checked out relax folder
</p>
 cd ..\relax
 scons
 (Scons will automatically find CL.exe, and setup compilation for 64 bit.)
<h2>Modify relax.bat</h2>
<p>
Copy relax.bat to relaxgui.bat
</p>
<p>
Modify relax.bat:
</p>
 32x: %~dp0\..\python-2.7.4\python "%~dp0\relax.py" %*
 64x: %~dp0\..\python-2.7.4.amd64\python "%~dp0\relax.py" %*
<p>
Modify relaxgui.bat:
</p>
 32x: %~dp0\..\python-2.7.4\python "%~dp0\relax.py" -g %*
 64x: %~dp0\..\python-2.7.4.amd64\python "%~dp0\relax.py" -g %*
<h1>Coding editor</h1>
<p>
A lightweight editor, could be pyscripter. &lt;br&gt;
</p>
<p>
This helps with syntax high-lighting and includes the interpreter. &lt;br&gt;
</p>
<p>
Install from: https://code.google.com/p/pyscripter/
</p>
<p>
Then download source rpyc from: https://pypi.python.org/pypi/rpyc/3.2.3 &lt;br&gt;
</p>
<p>
Drag (.zip) into the winpython installer &lt;br&gt;
</p>
<p>
To let pyscripter find python, you need to register it in the windows registry. &lt;br&gt;
</p>
<p>
<b>Advanced-&gt;Register distribution-&gt;Yes</b>
</p>
<p>
Remember to check that indention is set to equal 4 spaces "    ", under Tools/Options/Editor Options &lt;br&gt;
</p>
<p>
Also set: Run/Python Engine/Remote (Tk)  (Matplotlib uses the Tk) &lt;br&gt;
</p>
<p>
Test that everything is working, for example by this script, and hit the green play button. &lt;br&gt;
</p>
<p>
&lt;pre&gt;
</p>
<p>
from pylab import *
</p>
<p>
a = array(range(10))
</p>
<p>
b = 10*a
</p>
<p>
plot(a,b)
</p>
<p>
show()
</p>
<p>
&lt;/pre&gt;
</p>
</body></html>



Troels Emtekær Linnet


2013/5/14 Edward d'Auvergne <edward@xxxxxxxxxxxxx>
Hi,

You got it!  The problem was the 64 vs. 32-bit mismatch.  When I
compile the MS Windows distribution package
(http://www.nmr-relax.com/download.html#MS_Windows) on 32-bit Windows
2000 with MSVS 2005 and 32-bit Python 2.7, the modules there are
32-bit.  This 32-bit module should run fine on 64-bit MS Windows
machines.  I also have a vm with 64-bit Win7 with MSVS 2010 and 64-bit
Python 2.7 where I can compile 64-bit relax modules.  Using stock MSVS
with the stock Python from http://python.org/, this compilation issue
is not encountered.

A good test would be to now check out the relax trunk and to run the
full test suite.  The trunk is kept in a state whereby the test suite
always passes (well, I try anyway).  You can run the full test suite
with:

$ relax --test-suite

For the relax trunk, this should pass.  Note that the test suite is
incredibly extensive - it can take up to 30 minutes to 1 hour to
complete on a relatively modern computer.  You will need to install
the minfx (https://gna.org/projects/minfx/) and bmrblib
(http://gna.org/projects/bmrblib/) Python modules.  These are included
within the relax distribution packages, but for the source code
repository you will need to install them as regular Python packages.
You will also need scipy and wxPython.  A second good test would be to
launch the relax GUI with:

$ relax --gui

If you do this for the relax_disp branch, you can test if you can
start a relaxation dispersion analysis.  For the relax trunk, you
could also try running the test suite again from within the GUI via
the menu system.

You may have noticed that I have updated the MS Windows development
platform webpage (http://www.nmr-relax.com/windows_devel.html) as we
have been battling this problem.  It should now be more up to date.  I
was wondering if you had HTML coding skills?  The HTML code for the
relax website is quite basic.  I was thinking that we could create a
new section for that page titled "1. Python" and then shift the
numbers of all the others down.  Then "1.1 Official Python" would
describe the installation of the stock Python for http://python.org/,
and all the 1.1.x subsections could describe the setup and
installation of the Python modules required (minfx -
https://gna.org/projects/minfx/, bmrblib -
http://gna.org/projects/bmrblib/, numpy, scipy, and wxPython).
Section "1.2 WinPython" could then describe that setup and how to
install the modules.  Section "1.3 EPD" may no longer be necessary.
We could also add a new section "2.4.4" or "3.4.4" after the
renumbering for the 64-bit vs. 32-bit compilation issue with
WinPython.  I have also modified section 4 to be about different code
editors rather than just Vim.  So your editor of choice could also be
described there, including the settings required for coding for relax.
 Most of the text from your relax.txt file (see the end of
http://thread.gmane.org/gmane.science.nmr.relax.devel/3835/focus=3854)
could be incorporated into this webpage, just modified for WinPython
rather than EPD.  For other relax users in the future, it would be
great to have this information permanently added to
http://www.nmr-relax.com/windows_devel.html.  If you would like to
help incorporate the details of your relax.txt file into this webpage,
you can check out the entire relax website with the command:
Just be wary that, because SVN minimally keeps 2 copies of each file,
the entire website when checked out currently takes 1.6 Gb of disk
space.  This includes 1.5 Gb of API documentation
(http://www.nmr-relax.com/api/).

Cheers,

Edward




On 13 May 2013 19:54, Troels Emtekær Linnet <tlinnet@xxxxxxxxx> wrote:
> I succeded with the 32 bit ! :-)
>
> --------------------------------
>
> C:\WinPython27\packages_32bit\relax_disp>scons
> scons: Reading SConscript files ...
> scons: done reading SConscript files.
> scons: Building targets ...
>
>
> ###########################
> # Compiling the C modules #
> ###########################
>
>
> Building the relaxation curve fitting module
> 'target_functions\\relax_fit.pyd'
>
> cl /Fotarget_functions\c_chi2.obj /c target_functions\c_chi2.c /nologo
> /I"C:\Win
> Python27\WinPython-32bit-2.7.4.1\python-2.7.4\include"
> c_chi2.c
> cl /Fotarget_functions\exponential.obj /c target_functions\exponential.c
> /nologo
>  /I"C:\WinPython27\WinPython-32bit-2.7.4.1\python-2.7.4\include"
> exponential.c
> cl /Fotarget_functions\relax_fit.obj /c target_functions\relax_fit.c /nologo
> /I"
> C:\WinPython27\WinPython-32bit-2.7.4.1\python-2.7.4\include"
> relax_fit.c
> c:\winpython27\packages_32bit\relax_disp\target_functions\relax_fit.c(137) :
> war
> ning C4700: uninitialized local variable 'params' used
> link /nologo /dll /out:target_functions\relax_fit.pyd
> /implib:target_functions\r
> elax_fit.lib
> /LIBPATH:C:\WinPython27\WinPython-32bit-2.7.4.1\python-2.7.4\libs t
> arget_functions\c_chi2.obj target_functions\exponential.obj
> target_functions\rel
> ax_fit.obj
>    Creating library target_functions\relax_fit.lib and object
> target_functions\r
> elax_fit.exp
> scons: done building targets.
>
> C:\WinPython27\packages_32bit\relax_disp>relax
>
>
>
>                        relax repository checkout r19681
>                 svn://svn.gna.org/svn/relax/branches/relax_disp
>
>                     Molecular dynamics by NMR data analysis
>
>                    Copyright (C) 2001-2006 Edward d'Auvergne
>               Copyright (C) 2006-2013 the relax development team
>
> This is free software which you are welcome to modify and redistribute under
> the conditions of the GNU General Public License (GPL).  This program,
> including all modules, is licensed under the GPL and comes with absolutely
> no
> warranty.  For details type 'GPL' within the relax prompt.
>
> Assistance in using the relax prompt and scripting interface can be accessed
> by
> typing 'help' within the prompt.
>
> Processor fabric:  Uni-processor.
>
> relax>
>
>
> 2013/5/13 Troels Emtekær Linnet <tlinnet@xxxxxxxxx>
>>
>> Hi Edward.
>>
>> Let's then do it with the winpython.
>> http://code.google.com/p/winpython/
>>
>> It's free for all, and you can setup a "local" version of python.
>> I even like this distribution better than epd, since it is more "free".
>> (It just came to my attention, some days ago)
>> And you have the spyder gui packed in, ready for coding scientific in
>> windows.
>>
>> I downloaded the 64 bit.
>> I opened the Winpython control panel, in the extracted folder. See info
>> here: http://code.google.com/p/winpython/wiki/WPPM
>> Downloaded and "Dragged" in minfx (as tar.gz), into the control panel to
>> install.
>> Downloaded scons 64 bit from Gohlke:
>> http://www.lfd.uci.edu/~gohlke/pythonlibs/
>> Also dragged the .exe file into control panel to install.
>> Opened the short cut to windows command (fixes path issues), and tested
>> the call to scons. (where scons).
>> Fixed the scons bug thing in the python file.
>> After confirming it was using the right scons, I navigated to the
>> relax-disp folder.
>> Did a scons clean_all, and then scons
>>
>> Same issues last night.
>>
>> I will try the 32 bit version, a little later today.
>>
>> Best
>> Troels
>>
>> Troels Emtekær Linnet
>>
>>
>> 2013/5/13 Edward d'Auvergne <edward@xxxxxxxxxxxxx>
>>>
>>> Oh, one slight problem with EPD - I don't have a university email and
>>> do not work at a university.  The Canopy Express version which is free
>>> does not support 64-bit.  I might have a problem replicating this!  Do
>>> you use 64-bit Windows 7 with the 64-bit EPD?
>>>
>>> Regards,
>>>
>>> Edward
>>>
>>>
>>>
>>> On 13 May 2013 15:06, Edward d'Auvergne <edward@xxxxxxxxxxxxx> wrote:
>>> > Hi,
>>> >
>>> > Sorry I didn't see the attached file.  It's better to copy and paste
>>> > such text directly in an email, or attach it to one of the relax
>>> > trackers (support request, bug tracker, or task tracker).  For example
>>> > for relaxation dispersion there is the task at
>>> > https://gna.org/task/?6401.  In some cases it is better to create a
>>> > support request for just that specific file.  Attaching files to
>>> > messages sent to mailing lists is not a good idea as the number of
>>> > copies of that attachment will be massively amplified and sent out to
>>> > all people on the mailing list.  It is a strain on the open source
>>> > infrastructure of Gna! and on the infrastructure of the mailing list
>>> > archivers:
>>> >
>>> > https://mail.gna.org/public/relax-devel/2013-05/msg00021.html
>>> > http://thread.gmane.org/gmane.science.nmr.relax.devel/3835/focus=3854
>>> > http://www.mail-archive.com/relax-devel@xxxxxxx/msg03785.html
>>> > http://marc.info/?l=relax-devel&m=136844948831132&w=2
>>> >
>>> > I'll install EPD and see if I can reproduce the issue.  To do that I
>>> > need to install exactly the same software and software versions.
>>> >
>>> > Cheers,
>>> >
>>> > Edward
>>> >
>>> >
>>> >
>>> > On 13 May 2013 14:50, Troels Emtekær Linnet <tlinnet@xxxxxxxxx> wrote:
>>> >> Hi Edward.
>>> >>
>>> >> I have the EPD dist. installed. (Not the Canopy)
>>> >> (The detailed install instructions, I have specified in the attached
>>> >> text
>>> >> file.)
>>> >>
>>> >> I also tried with the winpython dist. yesterday, with the same result.
>>> >>
>>> >> I am about to try out the win32 distribution of these.
>>> >>
>>> >> Best
>>> >> Troels
>>> >>
>>> >> Troels Emtekær Linnet
>>> >>
>>> >>
>>> >> 2013/5/13 Edward d'Auvergne <edward@xxxxxxxxxxxxx>
>>> >>>
>>> >>> Hi Troels,
>>> >>>
>>> >>> I'm looking at replicating your setup in a virtual machine, but there
>>> >>> is one piece of information missing.  Did you use Anaconda
>>> >>> (http://continuum.io) or Enthought Python Distribution (EPD,
>>> >>> https://www.enthought.com/canopy-express/) in combination with
>>> >>> IPython?  This might be where the problem lies, one of these might
>>> >>> not
>>> >>> be compatible with compiling the C modules or may require settings to
>>> >>> be changes to allow it to run with the MSVS compilers.
>>> >>>
>>> >>> Cheers,
>>> >>>
>>> >>> Edward
>>> >>>
>>> >>>
>>> >>>
>>> >>>
>>> >>> On 12 May 2013 21:21, Edward d'Auvergne <edward@xxxxxxxxxxxxx> wrote:
>>> >>> > Hi,
>>> >>> >
>>> >>> > Maybe I could try to set up MSVS 2012 tomorrow in a virtual machine
>>> >>> > with
>>> >>> > 64-bit Win7 and see if I can reproduce the problem.  It is clear
>>> >>> > that
>>> >>> > the
>>> >>> > relax sconstruct script is pointing to all the correct locations.
>>> >>> > If
>>> >>> > you
>>> >>> > type out the compiler commands by hand, they should just work.
>>> >>> > Therefore
>>> >>> > the problem is very unlikely to be with relax itself, but rather
>>> >>> > with
>>> >>> > the
>>> >>> > Microsoft 2012 C++ toolchain and/or its interaction with IPython.
>>> >>> > I'm
>>> >>> > wondering if it is a 64 vs. 32-bit mismatch issue.  Do you have a
>>> >>> > 64-bit
>>> >>> > Windows install?  Is the compiler toolchain (MSVS) 64-bit?  Is the
>>> >>> > Python
>>> >>> > version bundled with IPython 64-bit?  I really hope the issue is
>>> >>> > not
>>> >>> > because
>>> >>> > IPython is incompatible with MSVS!  I think we are narrowing the
>>> >>> > problem
>>> >>> > down a bit and we should get to the bottom of it soon.  For me
>>> >>> > replicating
>>> >>> > the issue, could you list the exact version and bit number of the
>>> >>> > operating
>>> >>> > system, MSVS, and IPython.
>>> >>> >
>>> >>> > Cheers,
>>> >>> >
>>> >>> > Edward
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> >
>>> >>> > On Sunday, 12 May 2013, Troels Emtekær Linnet wrote:
>>> >>> >>
>>> >>> >> Hi Edward.
>>> >>> >>
>>> >>> >> I have a the file
>>> >>> >> python27.lib
>>> >>> >> in C:\Python27\libs.
>>> >>> >>
>>> >>> >> I still don't have a clue whats wrong.
>>> >>> >> Could it be something with Visual C++ 2005 Express Edition?
>>> >>> >>
>>> >>> >> I am not sure the installation went correct, since when I do
>>> >>> >> Windows Start button->Microsoft Windows SDK v7.1->Visual Studio
>>> >>> >> Registration->Windows SDK Configuration Tool
>>> >>> >> Change "Installed Windows SDK Versions:" from v7.1 to 8.0
>>> >>> >> I get an error:
>>> >>> >> "Your system does not have Visual Studio 2005 or  Visual Studio
>>> >>> >> 2008
>>> >>> >> installed"
>>> >>> >>
>>> >>> >> Best
>>> >>> >>
>>> >>> >> Troels Emtekær Linnet
>>> >>> >>
>>> >>> >>
>>> >>> >> 2013/5/11 Edward d'Auvergne <edward@xxxxxxxxxxxxx>
>>> >>> >>
>>> >>> >> Hi,
>>> >>> >>
>>> >>> >> We should be able to get to the bottom of the problem and make
>>> >>> >> this
>>> >>> >> run.  But setting up the development platform on MS Windows of the
>>> >>> >> MSVS compiler and Python is always painful.  Because of this I set
>>> >>> >> up
>>> >>> >> a virtual machine image of Windows 2000 with MSVS 2005 many years
>>> >>> >> ago
>>> >>> >> and have been using this to build the Windows pre-compiled relax
>>> >>> >> distributions (http://www.nmr-relax.com/download.html#MS_Windows)
>>> >>> >> ever
>>> >>> >> since.  I have updated Python to version 2.7 on this vm, but the
>>> >>> >> compiler setup works and I don't want to have to set up another
>>> >>> >> environment.
>>> >>> >>
>>> >>> >> From the error messages, it is clear that this 2012 version of the
>>> >>> >> Microsoft compiler catches more problems in the code.  The
>>> >>> >> warning:
>>> >>> >>
>>> >>> >> c:\python27\github\relax_disp\target_functions\relax_fit.c(137) :
>>> >>> >> warning C4700: uninitialized local variable 'params' used
>>> >>> >>
>>> >>> >> may be an issue.  I think this is harmless, but you could try to
>>> >>> >> comment out line 137 of that file (the call to the exponential()
>>> >>> >> function) and see if that makes a difference.  This is inside the
>>> >>> >> dfunc() function which is both non-functional and not used.  This
>>> >>> >> is
>>> >>> >> supposed to return the gradient of the exponential curve but is
>>> >>> >> not
>>> >>> >> implemented yet as simplex optimisation, which does not require
>>> >>> >> the
>>> >>> >> gradient or Hessian, was sufficient for finding the solution for
>>> >>> >> this
>>> >>> >> 2 parameter problem.
>>> >>> >>
>>> >>> >> From these new messages, it is clear that the Python.h file is
>>> >>> >> being
>>> >>> >> found.  The include /I"C:\Python27\Scripts\..\include" is
>>> >>> >> interesting
>>> >>> >> as this implies that sys.prefix as seen by scons is set to
>>> >>> >> "C:\Python27\Scripts\..".  Although strange, this may not be an
>>> >>> >> issue.
>>> >>> >>  But when you run Python, you see sys.prefix as "C:\Python27".
>>> >>> >> Hmmmm.....
>>> >>> >>
>>> >>> >> Maybe the problem is not that Python.h cannot be found, but that
>>> >>> >> the
>>> >>> >> python32.lib file cannot be found.  Can you see this file in your
>>> >>> >> C:\Python27\libs\ directory?  You can see that this is used in the
>>> >>> >> linking command:
>>> >>> >>
>>> >>> >> link /nologo /dll /out:target_functions\relax_fit.pyd
>>> >>> >> /implib:target_functions\relax_fit.lib /LIBPATH:C:\Python27\libs
>>> >>> >> target_functions\c_chi2.obj target_functions\exponential.obj
>>> >>> >> target_functions\relax_fit.obj
>>> >>> >>
>>> >>> >> On Windows, there should be a python32.lib file in the LIBPATH.
>>> >>> >>
>>> >>> >> Regards,
>>> >>> >>
>>> >>> >> Edward
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >>
>>> >>> >> On 11 May 2013 12:41, Troels Emtekær Linnet <tlinnet@xxxxxxxxx>
>>> >>> >> wrote:
>>> >>> >> > Hi Edward.
>>> >>> >> >
>>> >>> >> > Sigh.
>>> >>> >> >
>>> >>> >> > I have looked around for
>>> >>> >> > "error LNK2019: unresolved external symbol"
>>> >>> >> > and it seems that many experience the problem.
>>> >>> >> >
>>> >>> >> > But there don't seem to be an universal explanation/bug fix.
>>> >>> >> > And if I find a thing I would like to try, I really don't know
>>> >>> >> > where
>>> >>> >> > to
>>> >>> >> > start. ? :-)
>>> >>> >> >
>>> >>> >> > - "In Visual-Studio most linkage problems are related to forget
>>> >>> >> > adding
>>> >>> >> > .cpp
>>> >>> >> > files."
>>> >>> >> > - Url 2,  Url3, Url4, Url5, Url6
>>> >>> >> >
>>> >>> >> > In the last Url, there is this solution:
>>> >>> >> > ---
>>> >>> >> > in the Project properties, set the Platform Toolset to VS2008
>>> >>> >> > (v90)
>>> >>> >> > and
>>> >>> >> > the
>>> >>> >> > correct directories depending on your installation (ie : include
>>> >>> >> > =>
>>> >>> >> > C:\Program Files (x86)\Windows
>>> >>> >> > Kits\8.0\Include\shared;C:\Program
>>> >>> >> > Files
>>> >>> >> > (x86)\Windows Kits\8.0\Include\um;$(IncludePath) and Libraries
>>> >>> >> > =>
>>> >>> >> > C:\Program
>>> >>> >> > Files (x86)\Windows Kits\8.0\Lib\win8\um\x64;$(LibraryPath)).
>>> >>> >> > Don't
>>> >>> >> > forget
>>> >>> >> > to set the .lib in Link entries.
>>> >>> >> > ---
>>> >>> >> >
>>> >>> >> > After installation of Visual Studio 2012, I do have the folder:
>>> >>> >> > C:\Program Files (x86)\Windows Kits\8.0
>>> >>> >> >
>>> >>> >> > I have  attached a text file, how I have installed until now.
>>> >>> >> >
>>> >>> >> > I hope we can break this "annoying behaviour?"
>>> >>> >> > Where should I look, if .ccp files is added ??
>>> >>> >> >
>>> >>> >> > Best
>>> >>> >> > Troels
>>> >>> >> > ------------------------
>>> >>> >> >
>>> >>> >> > C:\Python27\github\relax_disp>scons clean_all
>>> >>> >> > scons: Reading SConscript files ...
>>> >>> >> > scons: done reading SConscript files.
>>> >>> >> > scons: Building targets ...
>>> >>> >> > clean_manual_files(["manual_clean"], [])
>>> >>> >> >
>>> >>> >> > ##########################################
>>> >>> >> > # Cleaning up the temporary manual files #
>>> >>> >> > ##########################################
>>> >>> >> >
>>> >>> >> >
>>> >>> >> >
>>> >>> >> >
>>> >>> >> >
>>> >>
>>> >>
>>
>>
>


Related Messages


Powered by MHonArc, Updated Tue May 14 20:40:13 2013