Numerical Recipes Forum  

Go Back   Numerical Recipes Forum > Numerical Recipes Official Announcements > Official Bug Reports (NR3, the Third Edition)

Reply
 
Thread Tools Display Modes
  #1  
Old 11-28-2008, 11:30 AM
Bill Press Bill Press is offline
Numerical Recipes Author
 
Join Date: Dec 2001
Posts: 208
Version 3.02 released: list of all code changes

Code version 3.02 is now the current release. A list of all code changes (bug fixes and other) from previous versions 3.00 and 3.01 can be found at http://nr.com/NR_C301_C302_compare.htm .

Downloads from the NR store already include these changes. CDROMs purchased from Amazon.com and other sources should also include these changes soon. (Unfortunately, we have no control over the inventories of these vendors.)
Reply With Quote
  #2  
Old 06-02-2010, 10:32 AM
Bill Press Bill Press is offline
Numerical Recipes Author
 
Join Date: Dec 2001
Posts: 208
Patch file for upgrading code v3.00 to v3.02

A number of users have requested an automatic way of making all the upgrade changes in a code directory. Unfortunately, there is no perfect way to do this across all operating systems. However, if you have access to a Linux-style "patch" utility program, the following may work, or may work with some tweaks:

1. Download the patch file http://nr.com/upgrade/Code300to302.patch to an empty working directory named "code".
2. Copy your existing source code files into that same working directory. These should be the files (alphabetically) adapt.h through zrhqr.h.
3. At a command prompt in the working directory, do the command
Code:
patch -p1 < Code300to302.patch
4. You should see informational messages indicating successful patching of the various files.
5. Delete the patch file from the directory, and copy the remaining contents to your desired location.

Troubleshooting: If you get messages indicating that patch can't find the files to patch, you can try varying the -p level, or try editing the patch file itself to change the directory prefixes "code/" and "code302/" to something appropriate for your machine. If you find a trick that other users might be able to use, please post it on this thread.

Good luck!
Reply With Quote
  #3  
Old 06-07-2010, 11:16 AM
drDot drDot is offline
Registered User
 
Join Date: Jun 2010
Posts: 1
Thank you for the patch, after some tweaking I got it to work successfully. My experiences, just in case this helps somebody:

At first, patch -p1 < <patchfile> produced error messages like
--
patching file cholesky.h
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED -- saving rejects to file cholesky.h.rej
(Stripping trailing CRs from patch.)
--

The solution was to change the line endings for both the patch file _and_ all code files to Unix line endings (LF).
Since all the original files seemed to consistently have DOS linefeeds (CR+LF), I had assumed it should be ok, but for some reason it did not work that way.
By the way, using patch with the option --binary (as found in some user forums) showed no success.

Thanks again for the help,

Bernhard
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:10 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.