File: external_software_test.m2

package info (click to toggle)
macaulay2 1.24.11%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 171,648 kB
  • sloc: cpp: 107,850; ansic: 16,307; javascript: 4,188; makefile: 3,947; lisp: 682; yacc: 604; sh: 476; xml: 177; perl: 114; lex: 65; python: 33
file content (34 lines) | stat: -rw-r--r-- 1,407 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
-- this is a test that is NOT run by the package
-- but SHOULD BE RUN before a release

setRandomSeed 0
NAG = needsPackage "NumericalAlgebraicGeometry"
NAGtrace 1;
------------------------------------------------------
-- COMPARISON OF  -- M2 to PHCpack/Bertini/hom4ps2 --
load (NAG#"auxiliary files"|"benchmarks.m2");
I = katsuraBench 8; -- PHCpack may lose solutions	    	
I = stewartGough40real();  -- 137 sec from M2engine (multiprecision = double precision) 
                           -- 62 sec for PHCpack (double precision) 
			   -- 2120 sec for Bertini (multiprecision)
I = example2(); -- Bertini does not discard solutions at infinity

elapsedTime Mdouble = pointSet solveSystem (I_*,Software=>M2engine,Precision=>DoublePrecision);
elapsedTime Mfast = pointSet solveSystem (I_*,Software=>M2engine,Precision=>DoublePrecision,PostProcess=>false);
elapsedTime M = pointSet solveSystem (I_*,Software=>M2engine,Precision=>infinity); -- should be the same
elapsedTime P = pointSet solveSystem (I_*,Software=>PHCPACK);
elapsedTime B = pointSet solveSystem (I_*,Software=>BERTINI);
-- H = pointSet solveSystem (I_*,Software=>HOM4PS2); 

-- check if P, B, and H are approx. same 
assert (M == B)
assert (M == P)
-- assert (M == H)

-----------------------------------------------------
-- OTHER TESTS
load "NumericalAlgebraicGeometry/Bertini/Bertini.test.m2"

end
restart
load "external_software_test.m2"