First a nit: The docs say "The project ‘add-test-lib’ should be selected 
and built first, after which the solution as a whole (i.e. the first line 
shown above) can be selected to build all the tests."  For clarity, I 
believe that should be "The project ‘add-test-lib’ (i.e. the first line 
shown above) should be selected and built first, after which the solution 
as a whole can be selected to build all the tests."

So, now that I have the tests running correctly, I'm moving on to the next 
step in the docs: Performance optimization.  (yes, when pressed, some of us 
actually read those things)

I'm using Visual Studio 2015, so the part about "make tuneup" doesn't seem 
to apply to me.  However poking around, I do see a mpir-tune.sln and that 
sounds promising.  However this produces tune.exe, not the "tuneup" 
described by the docs.  Boldly ignoring this discrepancy, I ran tune.exe.  
The output initially appeared to be correct:

Parameters for vc_gmp_mparam.h
> Using: Windows Performance Counter
> speed_precision 1000, speed_unittime 4.28e-07 secs, CPU freq 2394.86 MHz
> DEFAULT_MAX_SIZE 1000, fft_max_size 50000
>
> /* Generated by tuneup.c, 2017-03-30, system compiler */
>
> #define MUL_KARATSUBA_THRESHOLD          16
> #define MUL_TOOM3_THRESHOLD             107
> #define MUL_TOOM4_THRESHOLD             181
> #define MUL_TOOM8H_THRESHOLD            292
>
> #define SQR_BASECASE_THRESHOLD            0  /* always (native) */
> #define SQR_KARATSUBA_THRESHOLD          26
> #define SQR_TOOM3_THRESHOLD             107
> #define SQR_TOOM4_THRESHOLD             264
> #define SQR_TOOM8_THRESHOLD             286
>
> #define DIVREM_1_NORM_THRESHOLD       MP_SIZE_T_MAX  /* never */
> #define DIVREM_1_UNNORM_THRESHOLD     MP_SIZE_T_MAX  /* never */
> #define MOD_1_NORM_THRESHOLD              0  /* always */
> #define MOD_1_UNNORM_THRESHOLD            0  /* always */
> #define USE_PREINV_DIVREM_1               1  /* native */
> #define USE_PREINV_MOD_1                  1
> #define DIVEXACT_1_THRESHOLD              0  /* always (native) */
> #define MODEXACT_1_ODD_THRESHOLD          0  /* always (native) */
> #define MOD_1_1_THRESHOLD               795
> #define MOD_1_2_THRESHOLD               882
> #define MOD_1_3_THRESHOLD               882
>

But then I got:

#define DIVREM_HENSEL_QR_1_THRESHOLD  Fatal error: too many (41) failed 
> measurements (0.0)
>

And the program crashed.  Speculating about some type of timing error, I 
ran the program again.  Same crash in the same place.  Argh.

Referring back to the docs, I saw that "tuneup" (or "tune" as us VS people 
prefer to call it) takes a command line switch.  Experimenting, I used "-f 
1".  This allowed the program to proceed past this point, only to 
experience another crash after:

#define GCDEXT_DC_THRESHOLD 386
> Fatal error: too many (41) failed measurements (0.0)
>

Not quite sure what to make of all this.  Is there a trick here?

And preemptively, I've got to ask where I'm supposed to put this output 
once I get it.  The header refers to "vc_gmp_mparam.h", but I don't see 
such a file.  There's a gmp-mparam.h that seems to match.  However, there's 
a bunch of files by that name.  Most appear to be defaults for various 
platforms, and a few are outputs from builds.  Which one am I modifying?  I 
don't want to make a change only to have the next rebuild silently write 
over it.

The library is running and seems to be producing correct output.  But 
obviously I want to make sure it's running at its best.

Thanks

PS I saw a program generated by mpir-tune.sln named speed.exe.  I tried 
running it, but was overwhelmed by the options.  Are there some good 
settings to use to see if "tune" is actually making things better?

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to