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
128 stars 51 forks source link

Inconsistent Polarizability Results on Different Machines Using "scuff-static" #247

Open aidin151 opened 1 month ago

aidin151 commented 1 month ago

Description: I am using scuff-static from the SCUFF-EM package to calculate the polarizability of a given geometry. However, I am experiencing discrepancies in the .pol file outputs generated on two different machines, despite identical SCUFF-EM installations, geometry files, and computational setups. The calculated polarizability values differ significantly between the two machines. So, I’m seeking guidance on whether the differences in polarizability results could be due to hardware-specific floating-point behavior or optimization settings. Any suggestions for further debugging steps would be appreciated.

 System Information:

 Steps Taken:

  1. Polarizability Calculation Setup:    - Used identical geometry files (.scuffgeo) and mesh files (.msh) on both machines.    - Executed scuff-static with identical parameters to calculate polarizability and generate .pol files.

  2. Identical SCUFF-EM Installations:    - Verified that both machines have the same scuff-static binary (MD5 checksum matches).    - Checked the linked libraries with ldd and confirmed they are the same on both machines.

  3. Floating-Point Precision:    - Tried forcing both single and double precision using the -ffloat-store flag, but the discrepancies persisted.

  4. Parallelization:    - Disabled OpenMP and rebuilt SCUFF-EM on both machines, but the issue remained.

  5. HDF5:    - Built SCUFF-EM without HDF5 support (--without-hdf5) on both machines due to missing hdf5.h.   

  6. Processor Differences:    - Suspect hardware-specific floating-point behavior or CPU optimizations could be influencing the results, as the two machines have different processors.

 Polarizability Output Example:
 -Old Computer (.pol file):

1 1.890611e+05 -1.725563e+03 -1.659733e+03 -3.674112e+03 7.411941e+04 5.667919e+03 2.177547e+03 7.735191e+03 5.733074e+04

-New Computer (.pol file):

   1 2.037505e+05 -9.477865e+03 1.499895e+03 -3.625262e+03 7.411565e+04 5.433866e+03 2.154151e+03 7.835898e+03 5.710962e+04