HomerReid / scuff-em

A comprehensive and full-featured computational physics suite for boundary-element analysis of electromagnetic scattering, fluctuation-induced phenomena (Casimir forces and radiative heat transfer), nanophotonics, RF device engineering, electrostatics, and more. Includes a core library with C++ and python APIs as well as many command-line applications.
http://www.homerreid.com/scuff-em
GNU General Public License v2.0
126 stars 50 forks source link

Errors running some example files #92

Closed pablodn closed 8 years ago

pablodn commented 8 years ago

Hello Homer, I've installed your code on the two machines I use (a macbook laptop and an Ubuntu machine). The installation went well on both but I'm getting some errors when running some examples.

First, running the SolidSphere example, the program works well and without any error, but the pft file is not generated anywhere.

Then, since I am a python user, I tried to run the SphericalShell python script and got the following error: Traceback (most recent call last): File "PythonScript", line 4, in import scuff; File "/home/pablo/Applications/scuff-em/lib/python2.7/site-packages/scuff.py", line 34, in _scuff = swig_import_helper() File "/home/pablo/Applications/scuff-em/lib/python2.7/site-packages/scuff.py", line 30, in swig_import_helper _mod = imp.load_module('_scuff', fp, pathname, description) ImportError: /home/pablo/Applications/scuff-em/lib/python2.7/site-packages/_scuff.so: undefined symbol: _ZN5scuff9PlaneGridC1EiiPKdddNS_18CartesianDirectionE

¿Maybe an error of swig? I'm not really sure. Thanks in advance! Pablo.

HomerReid commented 8 years ago

Thanks for the bug report. I fixed both of these today. Bugfixed versions in 8f7dda5e30e32b12820d6ae775e4f5c2c739d82b. Please give it a try and close the issue if satisfied, or post any further difficulties below.

pablodn commented 8 years ago

Thanks for your reply. The fixes are working but only if I change the files you have modified in the version I have previously cloned, so now I think I have the code running well. If I try a fresh installation I get the following error during the compilation:

tInvert.cc:74:70: error: invalid application of 'sizeof' to incomplete type 'main(int, char*)::random_data' RDs[nt]=(struct random_data )mallocEC(sizeof(struct random_data)); ^ tInvert.cc:75:46: error: 'initstate_r' was not declared in this scope initstate_r(Seed,State,StateSize,RDs[nt]); ^ tInvert.cc:91:30: error: 'random_r' was not declared in this scope random_r(RDs[nt], &ri);

HomerReid commented 8 years ago

Whoops, sorry about that and thanks for the bug report. I switched over to using the modern glibc random-number generator in tInvert without realizing that it's a non-standard C++ feature. In this case the solution is easy--I just removed tInvert from the list of executable programs that are built by default, since this is just a little standalone unit-test code that has nothing to do with the rest of SCUFF-EM. I have checked this fix into 71e833ba73ca24add88bb2e191fccf65c186b49f. Please check and close the issue if satisfied, or keep it alive if problems remain.

pablodn commented 8 years ago

Thanks for your reply and sorry for the delay in answering. I have it working correctly now so I will close the issue.Thanks again!