This is an archive of the discontinued LLVM Phabricator instance.

[test-suite] Adding miniXyce Benchmark
Needs ReviewPublic

Authored by homerdin on Aug 15 2017, 7:37 AM.

Details

Summary
Description:

At this time, miniXyce is a simple linear circuit simulator with a
basic parser that performs transient analysis on any circuit with
resistors (R), inductors (L), capacitors (C), and voltage/current
sources. The parser incorporated into this version of miniXyce is a
single pass parser, where the netlist is expected to be flat
(no hierarchy via subcircuits is allowed). Simulating the system of
DAEs generates a nonsymmetric linear problem, which is solved using
un-preconditioned GMRES. The time integration method used in miniXyce
is backward Euler with a constant time-step. The simulator outputs
all the solution variables at each time step in a 'prn' file.

Links:

Web: https://mantevo.org/packages/
Github: https://github.com/Mantevo/miniXyce

When run on Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz:
compile_time: 76.0057 
exec_time: 0.0132 
Maximum resident set size (kbytes): 6272

Diff Detail

Event Timeline

homerdin created this revision.Aug 15 2017, 7:37 AM
MatzeB edited edge metadata.Aug 15 2017, 2:16 PM
  • Integration looks good to me.
  • Maybe put the information from the patch description into a README file in the benchmark directory?
  • On my macOS x86_64 system it compiles warning free but fails to verify:
$ diff -u /Users/mbraun/dev/test-suite/build/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniXyce/Output/miniXyce.test.out /Users/mbraun/dev/test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniXyce/miniXyce.reference_output
--- /Users/mbraun/dev/test-suite/build/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniXyce/Output/miniXyce.test.out	2017-08-15 14:10:36.000000000 -0700
+++ /Users/mbraun/dev/test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniXyce/miniXyce.reference_output	2017-08-15 14:09:10.000000000 -0700
@@ -32,5 +32,5 @@
   GMRES_tolerance: 1e-06
   GMRES_subspace_dim: 10
   GMRES_average_iters: 5
-  GMRES_average_res: 5.65781e-16
+  GMRES_average_res: 5.79223e-16
 exit 0
LICENSE.TXT
87

misindentend (tabs vs spaces?)

This also seems to produce intermediate files:

  • Doing I/O in a compiler benchmark is generally a bad smell: We want to benchmark the CPU not the I/O subsystem. It may be fine if the I/O part doesn't dominate the runtime and is simple enough, but if there is an easy way around it that would be nice.
  • If you create new files, I'd suggest to accept a full pathname on the commandline and specifying a path using ${CMAKE_CURRENT_BINARY_DIRECTORY} placing files in the source directory can lead to race conditions if multiple builds (in different build directories) use the same sourcecode checkout. We also generally shouldn't assume the source checkout to be writable for benchmarks.
homerdin updated this revision to Diff 111397.Aug 16 2017, 12:09 PM

I included the README file and address the indentation in LICENSE.txt. I macro'd out the production of the output file, it is meant to be used for analysis and should not be created within the test-suite. We are still looking into the GMRES_average_res issue.

  • On my macOS x86_64 system it compiles warning free but fails to verify:
$ diff -u /Users/mbraun/dev/test-suite/build/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniXyce/Output/miniXyce.test.out /Users/mbraun/dev/test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniXyce/miniXyce.reference_output
--- /Users/mbraun/dev/test-suite/build/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniXyce/Output/miniXyce.test.out	2017-08-15 14:10:36.000000000 -0700
+++ /Users/mbraun/dev/test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C++/miniXyce/miniXyce.reference_output	2017-08-15 14:09:10.000000000 -0700
@@ -32,5 +32,5 @@
   GMRES_tolerance: 1e-06
   GMRES_subspace_dim: 10
   GMRES_average_iters: 5
-  GMRES_average_res: 5.65781e-16
+  GMRES_average_res: 5.79223e-16
 exit 0

Was able to reproduce this issue on my mac. We figured out that the issue in from the use of the sin function.

mX_source.cpp:51:  return (offset + amplitude * sin(2*pi*freq*t + phase));
mX_source.cpp:67:  return (offset + amplitude * sin(2*pi*carrier_freq*t + modulation_index*sin(2*pi*signal_freq*t)));

I rebuilt the application linking to the JuliaLang openlibm on both machines and am now getting GMRES_average_res: 5.73829e-16 on both machines.
Still looking into how to approach this issue for the test-suite.

Thanks,
Brian