
Hi all,
I just downloaded the latest devel version of sfepy for installation on an Intel Mac. I wanted to let you know that in order for sfepy to compile properly, I had to make the following changes:
In the top directory Makefile: add the following to OPTFLAGS -fno-strict-aliasing -fno-common -dynamic
In sfepy/fem/extmods/Makefile.inc and sfepy/terms/extmods/ Makefile.inc, replace occurences of '-shared' with $(SHARED), where I defined SHARED = -dynamiclib -undefined dynamic_lookup at the top of the Makefile.inc (there surely is a nicer way!)
I thought this might be useful to others.
Next, upon running the tests, I obtained:
[dpo@pod:sfepy-fe15c3e45e20]$ ./runTests.py --filter-more <<< directory: tests, test files: 23 +++ test_vector_matrix: ok +++ test_struct_add: ok +++ test_struct_i_add: ok +++ test_get_solution: ok +++ test_linear_terms: ok +++ test_input: ok +++ test_input: ok +++ test_input: ok nodes: 100% | #####################################################################| Time: 00:00:00 elements: 100% | ##################################################################| Time: 00:00:00 +++ test_input: ok +++ test_input: ok +++ test_input: ok +++ test_input: ok +++ test_input: ok +++ test_recursive_dict_hdf5: ok +++ test_sparse_matrix_hdf5: ok --- test_linear_rigid_body_bc: failed! --- test_linear_rigid_body_bc: failed! +++ test_solvers: ok nodes: 100% | #####################################################################| Time: 00:00:00 elements: 100% | ##################################################################| Time: 00:00:00 +++ test_read_meshes: ok +++ test_compare_same_meshes: ok +++ test_read_dimension: ok --- test_msm_laplace: failed! +++ test_msm_symbolic_diffusion: ok +++ test_msm_symbolic_laplace: ok +++ test_parse_equations: ok +++ test_parse_regions: ok +++ test_pbc: ok +++ test_pbc: ok +++ test_problem_creation: ok +++ test_consistency_d_dw: ok 23 test file(s) executed in 27.13 s, 3 failure(s) of 30 test(s)
How can I check what went wrong with the three failures? I see no log files in the 'output_tests' directory.
Moreover, I can't seem to do anything with the vtk files generated by the tests, neither with that generated with 'simply.py input/ poisson.py'. What am I missing? I have the latest Enthought Python Distribution and Enthought Tool Suite. Mayavi2 cannot seem to display the vtk scenes and neither can Paraview. Any idea what's wrong?
Note that in order for the tests to run, I had to bypass the Scipy distributed as part of ETS since it is outdated (!). I had a build of 0.7.0 lying around, with UMFPACK, and that seemed to work with sfepy.
Finally, yes I know, I really should read the manual. But I can't generate it! While pexpect is a breeze to install, lxml is a real pain on the Mac. Could anyone post the sfepy manual on the Wiki or on the newsgroup page?
Many thanks, Dominique

Hi Dominique,
thanks for trying sfepy!
Dominique wrote:
Hi all,
I just downloaded the latest devel version of sfepy for installation on an Intel Mac. I wanted to let you know that in order for sfepy to compile properly, I had to make the following changes:
In the top directory Makefile: add the following to OPTFLAGS -fno-strict-aliasing -fno-common -dynamic
In sfepy/fem/extmods/Makefile.inc and sfepy/terms/extmods/ Makefile.inc, replace occurences of '-shared' with $(SHARED), where I defined SHARED = -dynamiclib -undefined dynamic_lookup at the top of the Makefile.inc (there surely is a nicer way!)
I thought this might be useful to others.
Great! I will fix this so that there will be no need to fix the Makefile.inc files, and OPTFLAGS will be passed via config.py.
Next, upon running the tests, I obtained:
[dpo@pod:sfepy-fe15c3e45e20]$ ./runTests.py --filter-more <<< directory: tests, test files: 23 +++ test_vec tor_matrix: ok +++ test_struct_add: ok +++ test_struct_i_add: ok +++ test_get_solution: ok +++ test_linear_terms: ok +++ test_input: ok +++ test_input: ok +++ test_input: ok nodes: 100% | #####################################################################| Time: 00:00:00 elements: 100% | ##################################################################| Time: 00:00:00 +++ test_input: ok +++ test_input: ok +++ test_input: ok +++ test_input: ok +++ test_input: ok +++ test_recursive_dict_hdf5: ok +++ test_sparse_matrix_hdf5: ok --- test_linear_rigid_body_bc: failed! --- test_linear_rigid_body_bc: failed! +++ test_solvers: ok nodes: 100% | #####################################################################| Time: 00:00:00 elements: 100% | ##################################################################| Time: 00:00:00 +++ test_read_meshes: ok +++ test_compare_same_meshes: ok +++ test_read_dimension: ok --- test_msm_laplace: failed! +++ test_msm_symbolic_diffusion: ok +++ test_msm_symbolic_laplace: ok +++ test_parse_equations: ok +++ test_parse_regions: ok +++ test_pbc: ok +++ test_pbc: ok +++ test_problem_creation: ok +++ test_consistency_d_dw: ok 23 test file(s) executed in 27.13 s, 3 failure(s) of 30 test(s)
How can I check what went wrong with the three failures? I see no log files in the 'output_tests' directory.
try:
$ ./runTests.py --debug <failing test file>
for <failing test file> in tests/test_lcbc_3d.py, tests/ test_lcbc_2d.py, and test_msm_laplace.py Send the output here, please, so that we could help you.
for options, see
$ ./runTests.py --help
Moreover, I can't seem to do anything with the vtk files generated by the tests, neither with that generated with 'simply.py input/ poisson.py'. What am I missing? I have the latest Enthought Python Distribution and Enthought Tool Suite. Mayavi2 cannot seem to display the vtk scenes and neither can Paraview. Any idea what's wrong?
hmm, this is strange. Could you send me one of the vtk files?
Note that in order for the tests to run, I had to bypass the Scipy distributed as part of ETS since it is outdated (!). I had a build of 0.7.0 lying around, with UMFPACK, and that seemed to work with sfepy.
Thanks. I think Ondrej is the last officially released version of SciPy, right? What version is in ETS?
Finally, yes I know, I really should read the manual. But I can't generate it! While pexpect is a breeze to install, lxml is a real pain on the Mac. Could anyone post the sfepy manual on the Wiki or on the newsgroup page?
It is on our site: http://code.google.com/p/sfepy/wiki/Documentation
Check also http://ui505p06-mbs.ntc.zcu.cz/sfe/Documentation
Many thanks, Dominique

Note that in order for the tests to run, I had to bypass the Scipy distributed as part of ETS since it is outdated (!). I had a build of 0.7.0 lying around, with UMFPACK, and that seemed to work with sfepy.
Thanks. I think Ondrej is the last officially released version of SciPy, right? What version is in ETS?
Last long tested version that is known to work is 0.6.0 and that is the last official release as far as I know. I expect 0.7.0 to go out soon though.
Ondrej

On Aug 12, 11:05 am, "Ondrej Certik" <ond...@certik.cz> wrote:
Note that in order for the tests to run, I had to bypass the Scipy distributed as part of ETS since it is outdated (!). I had a build of 0.7.0 lying around, with UMFPACK, and that seemed to work with sfepy.
Thanks. I think Ondrej is the last officially released version of SciPy, right? What version is in ETS?
Last long tested version that is known to work is 0.6.0 and that is the last official release as far as I know. I expect 0.7.0 to go out soon though.
So, Dominique, 0.6.0 should work for you - ETS uses an even older version?
I have made the OPTFLAGS and SHARED configurable via site_cfg.py, see site_cfg_template.py. Could you try it, please? I have also updated the Documentation wiki page.
r.

On Aug 12, 6:03 am, Robert Cimrman <robert....@gmail.com> wrote:
On Aug 12, 11:05 am, "Ondrej Certik" <ond...@certik.cz> wrote:
Note that in order for the tests to run, I had to bypass the Scipy distributed as part of ETS since it is outdated (!). I had a build of 0.7.0 lying around, with UMFPACK, and that seemed to work with sfepy.
Thanks. I think Ondrej is the last officially released version of SciPy, right? What version is in ETS?
Last long tested version that is known to work is 0.6.0 and that is the last official release as far as I know. I expect 0.7.0 to go out soon though.
So, Dominique, 0.6.0 should work for you - ETS uses an even older version?
I have made the OPTFLAGS and SHARED configurable via site_cfg.py, see site_cfg_template.py. Could you try it, please? I have also updated the Documentation wiki page.
Thanks both for your quick replies! I downloaded the update and sfepy now builds smoothly on Leopard!
ETS seems to have SciPy 0.6.0 but the problem is that it wasn't built with UMFPACK bindings. I suppose that is a shortcoming of pre-packaged SciPy?!
Regargind the test failures, I get:
test instance prepared (1 test(s)) sfepy: updating materials... sfepy: coef sfepy: rhs sfepy: ...done in 0.00 s ... testing sincos ... sol: sin( 3.0 * x ) * cos( 4.0 * y ) ... rhs: -25.0 * 2.0 * sin( 3.0 * x ) * cos( 4.0 * y ) sfepy: matrix shape: (1002, 1002) sfepy: assembling matrix graph... sfepy: ...done in 0.01 s sfepy: matrix structural nonzeros: 6772 (6.74e-03% fill) sfepy: updating materials... sfepy: coef sfepy: rhs sfepy: ...done in 0.00 s sfepy: nls: iter: 0, residual: 1.128766e+01 (rel: 1.000000e+00) sfepy: rezidual: 0.00 [s] sfepy: solve: 0.01 [s] sfepy: matrix: 0.00 [s] sfepy: nls: iter: 1, residual: 1.706083e-14 (rel: 1.511458e-15) ... ||analytical t - numerical t||: 4.269767e-03 ... testing polysin ... sol: ((x - 0.5)**3) * sin( 5.0 * y ) ... rhs: 2.0 * (6.0 * (x - 0.5) * sin( 5.0 * y ) - 25.0 * ((x - 0.5)**3) * sin( 5.0 * y )) sfepy: updating materials... sfepy: coef sfepy: rhs sfepy: ...done in 0.00 s sfepy: nls: iter: 0, residual: 1.759097e+00 (rel: 1.000000e+00) sfepy: rezidual: 0.00 [s] sfepy: solve: 0.00 [s] sfepy: matrix: 0.01 [s] sfepy: nls: iter: 1, residual: 1.080712e-15 (rel: 6.143559e-16) ... ||analytical t - numerical t||: 2.457819e-04 ... testing poly ... sol: (x**2) + (y**2) ... rhs: [4.0 * 2.0] sfepy: updating materials... sfepy: coef sfepy: rhs sfepy: ...done in 0.00 s <type 'exceptions.TypeError'> Traceback (most recent call last): File "./runTests.py", line 222, in <module> main() File "./runTests.py", line 210, in main stats = run_test( test_filename, options ) File "./runTests.py", line 111, in run_test ok, n_fail, n_total = test.run( options.debug ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/base/ testing.py", line 38, in run ret = test_method() File "tests/test_msm_laplace.py", line 162, in test_msm_laplace vec = problem.solve() File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/fem/
[dpo@pod:sfepy-219a3594dbc8]$ ./runTests.py ./tests/ test_msm_laplace.py --debug <<< ./tests/test_msm_laplace.py sfepy: left over: ['ebc', '__builtins__', '__file__', 'solutions', '__name__', 'rhs', 'TestCommon', 'dim', 'pause', 'nm', 'val', 'solution', 'debug', 'output_name', '__doc__'] sfepy: reading mesh (database/phono/mesh_circ21.mesh)... sfepy: ...done in 0.05 s sfepy: setting up domain edges... sfepy: ...done in 0.01 s sfepy: creating regions... sfepy: leaf Right region__0 sfepy: leaf Omega region__1 sfepy: leaf Gamma region__2 sfepy: leaf Left region__3 sfepy: ...done in 0.03 s sfepy: equation "Temperature": sfepy: dw_laplace.i1.Omega( coef.val, s, t ) = - dw_volume_lvf.i1.Omega( rhs.val, s ) sfepy: describing geometries... sfepy: ...done in 0.00 s sfepy: setting up dof connectivities... sfepy: ...done in 0.00 s sfepy: using solvers: nls: newton ls: ls problemDef.py", line 500, in solve state = solvers.nls( state ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/solvers/nls.py", line 115, in __call__ vec_r, ret = evaluator.eval_residual( vec_x ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/fem/ evaluate.py", line 39, in eval_residual **self.data ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/fem/ evaluate.py", line 344, in eval_residuals chunk_size = chunk_size, **kwargs ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/fem/ evaluate.py", line 133, in assemble_vector **args ): File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/terms/ termsVolume.py", line 36, in __call__ mat = mat[...,nm.newaxis,nm.newaxis] TypeError: 'numpy.float64' object is unsubscriptable
The other failures are from linear_rigid_body_bc, which is in testsBasic.py:
[dpo@pod:sfepy-219a3594dbc8]$ ./runTests.py ./tests/testsBasic.py -- debug <<< ./tests/testsBasic.py sfepy: error: required missing: ['Test'] sfepy: left over: ['TestLCBC', '__builtins__', '__file__', '__doc__', 'TestInput', '__name__', 'TestCommon', 'op'] --- test instance creation failed Traceback (most recent call last): File "./runTests.py", line 222, in <module> main() File "./runTests.py", line 210, in main stats = run_test( test_filename, options ) File "./runTests.py", line 94, in run_test conf = ProblemConf.from_file( conf_name, required, _required + other ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/base/conf.py", line 157, in from_file other_missing = obj.validate( required = required, other = other ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/base/conf.py", line 220, in validate raise ValueError ValueError
The VTK files seem ok after all; it was just my incompetence. Paraview opens them and lets me navigate the data. It is with Mayavi2 that I have difficulties.
Sorry for being so thick about the manual, but in http://code.google.com/p/sfepy/source/browse/#svn/web/docs it seems that sfepy_manual.pdf and terms.pdf are the same document (only with different dates). Is that normal?
Thanks for the help! I'm looking forward to using SfePy! Dominique

On Aug 12, 2:15 pm, Dominique <dominiq...@gmail.com> wrote:
I have made the OPTFLAGS and SHARED configurable via site_cfg.py, see site_cfg_template.py. Could you try it, please? I have also updated the Documentation wiki page.
Thanks both for your quick replies! I downloaded the update and sfepy now builds smoothly on Leopard!
Good!
ETS seems to have SciPy 0.6.0 but the problem is that it wasn't built with UMFPACK bindings. I suppose that is a shortcoming of pre-packaged SciPy?!
Regargind the test failures, I get:
[dpo@pod:sfepy-219a3594dbc8]$ ./runTests.py ./tests/ test_msm_laplace.py --debug <<< ./tests/test_msm_laplace.py sfepy: left over: ['ebc', '__builtins__', '__file__', 'solutions', '__name__', 'rhs', 'TestCommon', 'dim', 'pause', 'nm', 'val', 'solution', 'debug', 'output_name', '__doc__'] sfepy: reading mesh (database/phono/mesh_circ21.mesh)... ... File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/terms/ termsVolume.py", line 36, in __call__ mat = mat[...,nm.newaxis,nm.newaxis] TypeError: 'numpy.float64' object is unsubscriptable
Try the following code:
In [1]: import numpy as nm
In [2]: a = nm.float64( 1 )
In [3]: a[...,nm.newaxis,nm.newaxis] Out[3]: array([[ 1.]])
In [4]: nm.__version__ Out[4]: '1.2.0.dev5629'
if it does not work for you then it seems the code relies on a newer version of numpy than you have.
The other failures are from linear_rigid_body_bc, which is in testsBasic.py:
[dpo@pod:sfepy-219a3594dbc8]$ ./runTests.py ./tests/testsBasic.py -- debug <<< ./tests/testsBasic.py sfepy: error: required missing: ['Test'] sfepy: left over: ['TestLCBC', '__builtins__', '__file__', '__doc__', 'TestInput', '__name__', 'TestCommon', 'op'] --- test instance creation failed Traceback (most recent call last): File "./runTests.py", line 222, in <module> main() File "./runTests.py", line 210, in main stats = run_test( test_filename, options ) File "./runTests.py", line 94, in run_test conf = ProblemConf.from_file( conf_name, required, _required + other ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/base/conf.py", line 157, in from_file other_missing = obj.validate( required = required, other = other ) File "/Users/dpo/local/src/sfepy-219a3594dbc8/sfepy/base/conf.py", line 220, in validate raise ValueError ValueError
Yes, the tests are implemented in testsBasic.py, but this file just holds some common functionality - you should use tests/test_lcbc_3d.py and tests/test_lcbc_2d.py, Anyway, I think the errors will disappear after you upgrade your numpy.
The VTK files seem ok after all; it was just my incompetence. Paraview opens them and lets me navigate the data. It is with Mayavi2 that I have difficulties.
Good. In Mayavi2 you probably need to use some filter first (e.g. Surface, do not know the exact name).
Sorry for being so thick about the manual, but inhttp://code.google.com/p/sfepy/source/browse/#svn/web/docsit seems that sfepy_manual.pdf and terms.pdf are the same document (only with different dates). Is that normal?
terms.py is obsolete, it was renamed to sfepy_manual.pdf. I shall delete it from the wiki.
Thanks for the help! I'm looking forward to using SfePy! Dominique
great!
r.

On Aug 12, 8:44 am, Robert Cimrman <robert....@gmail.com> wrote:
On Aug 12, 2:15 pm, Dominique <dominiq...@gmail.com> wrote:
Try the following code:
In [1]: import numpy as nm
In [2]: a = nm.float64( 1 )
In [3]: a[...,nm.newaxis,nm.newaxis] Out[3]: array([[ 1.]])
In [4]: nm.__version__ Out[4]: '1.2.0.dev5629'
if it does not work for you then it seems the code relies on a newer version of numpy than you have.
Indeed. The Numpy in ETS is quite outdated as well (1.0.4).
Yes, the tests are implemented in testsBasic.py, but this file just holds some common functionality - you should use tests/test_lcbc_3d.py and tests/test_lcbc_2d.py, Anyway, I think the errors will disappear after you upgrade your numpy.
I now upgraded to 1.2.0.dev5630 and all seems well. No failures.
Thanks! Dominique
participants (3)
-
Dominique
-
Ondrej Certik
-
Robert Cimrman