Author: bugman Date: Thu Aug 15 11:55:06 2013 New Revision: 20597 URL: http://svn.gna.org/viewcvs/relax?rev=20597&view=rev Log: Merged revisions 20590-20596 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r20590 | bugman | 2013-08-14 16:48:43 +0200 (Wed, 14 Aug 2013) | 8 lines Reverted r20587 and r20588 as these were rubbish! The command used was: svn merge -rHEAD:r20586 . There are gcc verses pdf Modelfree4 binary results for version 4.20. ........ r20591 | bugman | 2013-08-14 18:19:38 +0200 (Wed, 14 Aug 2013) | 6 lines Proper fix for the Palmer.test_palmer_omp for the different Modelfree4 binaries. The gcc and pdf binaries are now properly detected and the slightly different results are now correctly checked for. ........ r20592 | bugman | 2013-08-14 18:53:13 +0200 (Wed, 14 Aug 2013) | 3 lines Updated the Mac Framework setup document to help with scipy compilation problems. ........ r20593 | bugman | 2013-08-14 18:54:19 +0200 (Wed, 14 Aug 2013) | 5 lines Improved the Python seeking and module version print out script for symlinks. This should now be much more capable of finding all Python versions on a system. ........ r20594 | bugman | 2013-08-14 19:52:39 +0200 (Wed, 14 Aug 2013) | 8 lines Added support for the Mac OS X Modelfree4 binary results to the Palmer.* system tests. The Mac OS X Modelfree 4.20 binary produces different results than the Linux binaries, mainly due to a compilation problem. In the Linux binaries, the results are written out to 4 decimal places. In the Mac binaries, the results are instead written out to 4 significant figures. Therefore the number of decimal places are much less than the Linux results. ........ r20595 | bugman | 2013-08-14 19:55:57 +0200 (Wed, 14 Aug 2013) | 5 lines Fix for the Palmer.test_palmer system test for older Python versions. This is a problem introduced in the previous commit (r20594). ........ r20596 | bugman | 2013-08-15 09:10:12 +0200 (Thu, 15 Aug 2013) | 24 lines Syntax error fix for one of the unused scripts in the relax test suite shared data directories. This problem was encountered by Jack Howarth <howarth att bromo dott med dott uc dott edu> and communicated in a private message. The issue was found by fink. This script is never used and will never be used again - it is only there for reference. How a syntax error was introduced is a mystery. For reference, the full message is: """ While preparing fink packaging for the new relax 3.0.0 release, I noticed an error in the python scripts. When installing relax-py27-3.0.0, I get the following error as the the frame_order_pseudo_ellipse.py python script is compiled. What is the correct syntax for that particular call to pymol.command? Setting up relax-py27 (3.0.0-1) ... Compiling /sw/lib/relax-py27/test_suite/shared_data/frame_order/cam/pseudo_ellipse_free_rotor/frame_order_pseudo_ellipse.py ... File "/sw/lib/relax-py27/test_suite/shared_data/frame_order/cam/pseudo_ellipse_free_rotor/frame_order_pseudo_ellipse.py", line 154 pymol.command('show spheres'_pseudo_ellipse) ^ SyntaxError: invalid syntax Thanks in advance for any clarification. """ ........ Modified: branches/peak_intensities/ (props changed) branches/peak_intensities/devel_scripts/python_seek.py branches/peak_intensities/docs/Mac_framework_build_3way branches/peak_intensities/test_suite/shared_data/frame_order/cam/pseudo_ellipse_free_rotor/frame_order_pseudo_ellipse.py branches/peak_intensities/test_suite/system_tests/palmer.py Propchange: branches/peak_intensities/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Aug 15 11:55:06 2013 @@ -1,1 +1,1 @@ -/trunk:1-20588 +/trunk:1-20596 Modified: branches/peak_intensities/devel_scripts/python_seek.py URL: http://svn.gna.org/viewcvs/relax/branches/peak_intensities/devel_scripts/python_seek.py?rev=20597&r1=20596&r2=20597&view=diff ============================================================================== --- branches/peak_intensities/devel_scripts/python_seek.py (original) +++ branches/peak_intensities/devel_scripts/python_seek.py Thu Aug 15 11:55:06 2013 @@ -5,8 +5,8 @@ # Python module imports. -from os import X_OK, access, system -from os.path import isfile, islink +from os import X_OK, access, readlink, system +from os.path import abspath, dirname, isabs, isfile, islink, join from subprocess import PIPE, Popen import sys @@ -96,6 +96,17 @@ # The file name. file = line[:-1] + # Recursively follow and expand links. + while 1: + if islink(file): + orig = readlink(file) + if not isabs(orig): + orig = join(dirname(file), orig) + file = orig + continue + else: + break + # Check if the path is a file. if not isfile(file): continue @@ -104,12 +115,12 @@ if not access(file, X_OK): continue - # Check if the path is a link. - if islink(file): - continue - - # Add the file. - binaries.append(file) + # Convert to an absolute path. + file = abspath(file) + + # Add the file, avoiding duplicates. + if file not in binaries: + binaries.append(file) # Return the file list. return binaries Modified: branches/peak_intensities/docs/Mac_framework_build_3way URL: http://svn.gna.org/viewcvs/relax/branches/peak_intensities/docs/Mac_framework_build_3way?rev=20597&r1=20596&r2=20597&view=diff ============================================================================== --- branches/peak_intensities/docs/Mac_framework_build_3way (original) +++ branches/peak_intensities/docs/Mac_framework_build_3way Thu Aug 15 11:55:06 2013 @@ -34,7 +34,12 @@ $ PATH=/usr/local/bin/:$PATH C_INCLUDE_PATH=/sw/include/suitesparse/ ~/bin/python2.7 setup.py install -The PATH option is needed if gfortran is located in both /usr/local/bin/ and /sw/bin/. The C_INCLUDE_PATH may be needed if the suitesparse header files cannot be found. +The PATH option is needed if gfortran is located in both /usr/local/bin/ and /sw/bin/. The C_INCLUDE_PATH may be needed if the suitesparse header files cannot be found. If you still encounter swig problems finding the umfpack_*.h files, then manually type: + +$ swig -I/sw/include/suitesparse/ -python -o build/src.macosx-10.5-fat3-2.7/scipy/sparse/linalg/dsolve/umfpack/_umfpack_wrap.c -outdir build/src.macosx-10.5-fat3-2.7/scipy/sparse/linalg/dsolve/umfpack scipy/sparse/linalg/dsolve/umfpack/umfpack.i +$ PATH=/usr/local/bin/:$PATH C_INCLUDE_PATH=/sw/include/suitesparse/ ~/bin/python2.7 setup.py install + +The swig command will build the Scipy part requining the umfpack_*.h files, and then the python command will continue happily. Modified: branches/peak_intensities/test_suite/shared_data/frame_order/cam/pseudo_ellipse_free_rotor/frame_order_pseudo_ellipse.py URL: http://svn.gna.org/viewcvs/relax/branches/peak_intensities/test_suite/shared_data/frame_order/cam/pseudo_ellipse_free_rotor/frame_order_pseudo_ellipse.py?rev=20597&r1=20596&r2=20597&view=diff ============================================================================== --- branches/peak_intensities/test_suite/shared_data/frame_order/cam/pseudo_ellipse_free_rotor/frame_order_pseudo_ellipse.py (original) +++ branches/peak_intensities/test_suite/shared_data/frame_order/cam/pseudo_ellipse_free_rotor/frame_order_pseudo_ellipse.py Thu Aug 15 11:55:06 2013 @@ -151,7 +151,7 @@ # PyMOL. pymol.view() - pymol.command('show spheres'_pseudo_ellipse) + pymol.command('show spheres') pymol.cone_pdb('cone_pseudo_ellipse.pdb') Modified: branches/peak_intensities/test_suite/system_tests/palmer.py URL: http://svn.gna.org/viewcvs/relax/branches/peak_intensities/test_suite/system_tests/palmer.py?rev=20597&r1=20596&r2=20597&view=diff ============================================================================== --- branches/peak_intensities/test_suite/system_tests/palmer.py (original) +++ branches/peak_intensities/test_suite/system_tests/palmer.py Thu Aug 15 11:55:06 2013 @@ -74,14 +74,32 @@ # Execute the script. self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'palmer.py') + # Determine if the Gnu gcc or Portland C compiler version is being used. + spin = return_spin(':0@N', pipe='m2') + if spin.te == 1.951*1e-12: + binary = 'linux-i386-gcc' # Linux Gnu gcc modelfree4 version. + else: + binary = 'linux-i386-pgf' # Linux Portland C compiler modelfree4 version. + spin = return_spin(':-2@N', pipe='m1') + if spin.chi2 == 36.62: + binary = 'mac-i386' # Mac OS X intel binary. + if not binary: + raise RelaxError("The Modelfree4 binary cannot be identified, therefore the parameters cannot be meaningfully checked.") + print("\nDetected the '%s' Modelfree4 binary." % binary) + # Checks for model m1, m2, and m3 mfout file reading. models = ['m1', 'm2', 'm3'] params = [['s2'], ['s2', 'te'], ['s2', 'rex']] spin_names = [':-2@N', ':-1@N', ':0@N'] s2 = [[0.869, 0.732, None], [0.869, 0.730, None], [0.715, 0.643, None]] - te = [[None, None, None], [0.0, 1.952, None], [None, None, None]] + if binary == 'linux-i386-gcc': + te = [[None, None, None], [0.0, 1.951, None], [None, None, None]] + else: + te = [[None, None, None], [0.0, 1.952, None], [None, None, None]] rex = [[None, None, None], [None, None, None], [4.308, 4.278, None]] chi2 = [[36.6223, 20.3954, None], [36.6223, 20.3299, None], [1.9763, 0.6307, None]] + if binary == 'mac-i386': + chi2 = [[36.62, 20.40, None], [36.62, 20.33, None], [1.976, 0.6307, None]] for model_index in range(3): print("Model " + repr(models[model_index])) for spin_index in range(3): @@ -118,6 +136,8 @@ te = [None, None] rex = [0.005, 0.404] chi2 = [1.7966, 0.7389] + if binary == 'mac-i386': + chi2 = [1.796, 0.7392] for spin_index in range(3): # Get the spin. spin = return_spin(spin_names[spin_index], pipe='aic') @@ -135,19 +155,26 @@ # Checks. self.assertEqual(spin.model, models[spin_index]) self.assertEqual(spin.params, params[spin_index]) - self.assertEqual(spin.s2, s2[spin_index]) + self.assertAlmostEqual(spin.s2, s2[spin_index]) self.assertEqual(spin.s2f, None) self.assertEqual(spin.s2s, None) - self.assertEqual(spin.te, te[spin_index]) + if te[spin_index]: + self.assertAlmostEqual(spin.te, te[spin_index]) + else: + self.assertEqual(spin.te, None) self.assertEqual(spin.tf, None) self.assertEqual(spin.ts, None) - self.assertEqual(spin.rex, rex[spin_index]) + self.assertAlmostEqual(spin.rex, rex[spin_index]) self.assertEqual(spin.chi2, chi2[spin_index]) # Final global values. final_pipe = pipes.get_pipe('aic') - self.assertEqual(final_pipe.chi2, 2.5356) - self.assertEqual(final_pipe.diff_tensor.tm, 12.045) + if binary == 'mac-i386': + self.assertAlmostEqual(final_pipe.chi2, 2.5355) + self.assertAlmostEqual(final_pipe.diff_tensor.tm, 12.051) + else: + self.assertAlmostEqual(final_pipe.chi2, 2.5356) + self.assertAlmostEqual(final_pipe.diff_tensor.tm, 12.045) def test_palmer_omp(self): @@ -166,6 +193,20 @@ spin = return_spin(':9@N', pipe='m2') if spin.s2 == 0.855: raise RelaxError("You are using an old, buggy Modelfree4 version! You must upgrade to version 4.20 or later.") + + # Determine the Modelfree4 binary type used. + spin = return_spin(':9@N', pipe='aic') + binary = None + if spin.te * 1e12 == 52.195: + binary = 'linux-i386-gcc' # Linux Gnu gcc modelfree4 version. + elif spin.te * 1e12 == 52.197: + binary = 'linux-i386-pgf' # Linux Portland C compiler modelfree4 version. + spin = return_spin(':9@N', pipe='m1') + if spin.chi2 == 143.7: + binary = 'mac-i386' # Mac OS X intel binary. + if not binary: + raise RelaxError("The Modelfree4 binary cannot be identified, therefore the parameters cannot be meaningfully checked.") + print("\nDetected the '%s' Modelfree4 binary." % binary) # Model m1, m2, and m3 mfout file data. models = ['m1', 'm2', 'm3'] @@ -173,8 +214,12 @@ spin_names = [':9@N', ':10@N', ':11@N'] s2 = [[0.822, 0.799, 0.823], [0.788, 0.777, 0.812], [0.822, 0.799, 0.823]] te = [[None, None, None], [61.506, 36.087, 20.039], [None, None, None]] + if binary == 'mac-i386': + te = [[None, None, None], [61.504, 36.087, 20.039], [None, None, None]] rex = [[None, None, None], [None, None, None], [0.0, 0.0, 0.0]] chi2 = [[143.6773, 105.1767, 61.6684], [40.9055, 57.1562, 48.4927], [143.6773, 105.1767, 61.6684]] + if binary == 'mac-i386': + chi2 = [[143.7, 105.2, 61.67], [40.91, 57.16, 48.49], [143.7, 105.2, 61.67]] # Checks for model m1, m2, and m3 mfout file reading. for model_index in range(3): @@ -184,20 +229,20 @@ # Get the spin. spin = return_spin(spin_names[spin_index], pipe=models[model_index]) + print spin # Conversions. - if te[model_index][spin_index]: - te[model_index][spin_index] = te[model_index][spin_index] * 1e-12 if rex[model_index][spin_index]: rex[model_index][spin_index] = rex[model_index][spin_index] / (2.0 * pi * cdp.spectrometer_frq[cdp.ri_ids[0]])**2 # Checks. self.assertEqual(spin.model, models[model_index]) self.assertEqual(spin.params, params[model_index]) - self.assertEqual(spin.s2, s2[model_index][spin_index]) + self.assertAlmostEqual(spin.s2, s2[model_index][spin_index]) self.assertEqual(spin.s2f, None) self.assertEqual(spin.s2s, None) - self.assertEqual(spin.te, te[model_index][spin_index]) + if te[model_index][spin_index]: + self.assertAlmostEqual(spin.te * 1e12, te[model_index][spin_index]) self.assertEqual(spin.tf, None) self.assertEqual(spin.ts, None) self.assertEqual(spin.rex, rex[model_index][spin_index]) @@ -207,34 +252,49 @@ models = ['m2', 'm2', 'm2'] params = [['s2', 'te'], ['s2', 'te'], ['s2', 'te']] s2 = [0.755, 0.761, 0.787] - te = [52.197, 29.361, 12.677] + if binary == 'linux-i386-gcc': + te = [52.195, 29.356, 12.678] + elif binary == 'linux-i386-pgf': + te = [52.197, 29.361, 12.677] + elif binary == 'mac-i386': + te = [52.197, 29.357, 12.676] chi2 = [7.254, 8.0437, 0.5327] + if binary == 'mac-i386': + chi2 = [7.254, 8.044, 0.5327] # Checks for the final mfout file reading. for spin_index in range(3): # Get the spin. spin = return_spin(spin_names[spin_index], pipe='aic') - # Conversions. - if te[spin_index]: - te[spin_index] = te[spin_index] * 1e-12 - # Checks. self.assertEqual(spin.model, models[spin_index]) self.assertEqual(spin.params, params[spin_index]) - self.assertEqual(spin.s2, s2[spin_index]) + self.assertAlmostEqual(spin.s2, s2[spin_index]) self.assertEqual(spin.s2f, None) self.assertEqual(spin.s2s, None) - self.assertAlmostEqual(spin.te, te[spin_index]) + if te[spin_index]: + self.assertAlmostEqual(spin.te * 1e12, te[spin_index]) self.assertEqual(spin.tf, None) self.assertEqual(spin.ts, None) self.assertEqual(spin.rex, None) - self.assertEqual(spin.chi2, chi2[spin_index]) + self.assertAlmostEqual(spin.chi2, chi2[spin_index]) # Final global values. final_pipe = pipes.get_pipe('aic') self.assertEqual(final_pipe.chi2, 15.8304) - self.assertEqual(final_pipe.diff_tensor.tm, 8.443) - self.assertEqual(final_pipe.diff_tensor.Dratio, 1.053) - self.assertAlmostEqual(final_pipe.diff_tensor.theta, (68.592 / 360.0) * 2.0 * pi) - self.assertAlmostEqual(final_pipe.diff_tensor.phi, (73.756 / 360.0) * 2.0 * pi) + if binary == 'linux-i386-gcc': + self.assertAlmostEqual(final_pipe.diff_tensor.tm, 8.443) + self.assertAlmostEqual(final_pipe.diff_tensor.Dratio, 1.053) + self.assertAlmostEqual(final_pipe.diff_tensor.theta * 360 / 2.0 / pi, 68.592) + self.assertAlmostEqual(final_pipe.diff_tensor.phi * 360 / 2.0 / pi, 73.756) + elif binary == 'linux-i386-pgf': + self.assertAlmostEqual(final_pipe.diff_tensor.tm, 8.443) + self.assertAlmostEqual(final_pipe.diff_tensor.Dratio, 1.053) + self.assertAlmostEqual(final_pipe.diff_tensor.theta * 360 / 2.0 / pi, 68.864) + self.assertAlmostEqual(final_pipe.diff_tensor.phi * 360 / 2.0 / pi, 73.913) + elif binary == 'mac-i386': + self.assertAlmostEqual(final_pipe.diff_tensor.tm, 8.459) + self.assertAlmostEqual(final_pipe.diff_tensor.Dratio, 1.049) + self.assertAlmostEqual(final_pipe.diff_tensor.theta * 360 / 2.0 / pi, 64.611) + self.assertAlmostEqual(final_pipe.diff_tensor.phi * 360 / 2.0 / pi, 79.281)