Project

General

Profile

Support #1263

Tidy CoCoALib test directory

Added by John Abbott about 5 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Tidying
Target version:
Start date:
26 Mar 2019
Due date:
% Done:

80%

Estimated time:
Spent time:

Description

I have done some cleaning and have noticed some files called test-*.C in the test directory which are not listed in the Makefile. We should either add them to the list in the Makefile, or remove them from the directory...

History

#1 Updated by John Abbott about 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

The files I have are:

 test-Dynamic1.C
 test-F5.C
 test-implicit1.C
 test-implicit2.C
 test-implicit3.C
 test-JBMill.C
 test-OpenMath2.C
 test-PBMill.C
 test-RingTwinFloat3.C
 test-TmpPartialMorseBetti.C

I guess that test-F5.C should just be eliminated, along with all the F5 code in CoCoALib?

#2 Updated by John Abbott almost 5 years ago

I have noticed that there some tests which run quickly (e.g. less than 0.01s on my computer), but the compilation time is considerably longer (e.g. around 0.7s on my computer).

It may make some sense to condense several tests into a single file in the hope that the compilation time for the single file is rather less than that for the several small files.

The current situation is:
  • make executables takes about 105s on my computer
  • make check (after compiling the executables) takes about 15s on my computer

That is: almost 90% of the time is for compilation and linking. I would hope that we can make compilation time about the same length as execution time... (am I too optimistic?)

#3 Updated by John Abbott almost 5 years ago

I have just checked that running all test-bugNNN executables takes about 0.03s on my computer. Since these files are "miscellaneous", I see no real objection against combining them into one larger test.

Compiling all these files took about 15s (roughly 1.5s per file)

#4 Updated by John Abbott over 4 years ago

I added a new "exbug" to one of the test-bugN.C files, and noticed that it was quite a nuisance having to add all the appropriate include directives. So, I suggest that if we do opt to combine several exbugs into a single file then we might as well simply include the combined header file for CoCoALib -- I think this is justifiable since the tests are likely to cover many different areas of CoCoALib.

The structure I used in my one experiment is the following:

#include "CoCoA/library.H

void exbug123()
{
  ...
}

void exbug456()
{
  ...
}

void program()
{
  GlobalManager CoCoAFoundations;
  exbug123();
  exbug456();
}

#5 Updated by John Abbott over 4 years ago

  • Related to Support #1311: THINGS TO DO IN GENOVA September 2019 added

#6 Updated by John Abbott over 4 years ago

Anna approves of merging the exbugs into a single file, and to including CoCoA/library.H.

Do this (soon!)

#7 Updated by John Abbott over 4 years ago

  • Assignee set to John Abbott
  • % Done changed from 10 to 20

#8 Updated by Anna Maria Bigatti over 4 years ago

  • Subject changed from Tidy test directory to Tidy CoCoALib test directory

#9 Updated by John Abbott over 4 years ago

  • % Done changed from 20 to 50

I have transferred test-bugN into test-bug1 for N=6,7,8,9. So far, so good.

#10 Updated by John Abbott over 4 years ago

  • % Done changed from 50 to 60

I have merged several tests in the series test-NumTheory and test-SparsePolyRing into fewer files.
I have preferred not to merge into one very big file, and hope that I have found a reasonable compromise.

I have checked in.

SPEED CHECK compilation of executables took 104s (real), 94s (user). I had hoped for a bigger difference (but maybe there are some new test files now?)

SPEED CHECK compilation of all test-bugNNN took about 4.7s (real), 4.2s (user). That is definitely better.

#11 Updated by John Abbott over 4 years ago

#12 Updated by John Abbott about 4 years ago

  • % Done changed from 60 to 70

I have merged test-bug5 into test-bug2 and test-bug4 into test-bug3.

SPEED CHECK compilation of all test-bugNNN took about 4.0s (real), 3.7s (user). A bit better.

#13 Updated by John Abbott about 4 years ago

  • Target version changed from CoCoALib-0.99700 to CoCoALib-0.99800

#14 Updated by John Abbott about 4 years ago

#15 Updated by John Abbott about 4 years ago

  • Related to deleted (Support #1311: THINGS TO DO IN GENOVA September 2019)

#16 Updated by John Abbott over 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 70 to 80

I have now merged all "exbugs" into a single file called test-exbugs.C (with corr expected output in test-exbugs.out).

SPEED CHECK: compilation took 108s real, 97s user (a bit slower... why?). All tests ran in just less than 15s.
SPEED CHECK compilation of test-exbugs.C took 2.0s (that is faster)

#17 Updated by John Abbott over 3 years ago

  • Target version changed from CoCoALib-0.99800 to CoCoALib-0.99850

#18 Updated by John Abbott about 1 year ago

  • Target version changed from CoCoALib-0.99850 to CoCoALib-0.99880

It would be nice to close this issue... I have decided to postpone it, since it likely requires some discussion.

I did notice that test-TmpPartialMorseBetti.C seems to compile and run fine. Should we activate it?

Also available in: Atom PDF