Project

General

Profile

Feature #711

External Libs: print credits?

Added by John Abbott almost 9 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
External Libs
Start date:
18 May 2015
Due date:
% Done:

100%

Estimated time:
4.40 h
Spent time:

Description

At the Normaliz workshop I noticed that two other pieces of software printed out "credits" when external libraries were used. Should CoCoA do something similar?


Related issues

Related to CoCoA-5 - Feature #185: Banner for CoCoA-5Closed2012-06-11

Related to CoCoA-5 - Design #943: Managing creditsIn Progress2016-10-12

Related to CoCoALib - Feature #1050: ExternalLibs: function for getting infoClosed2017-04-24

Related to CoCoA-5 - Bug #1046: CoCoA-5 no longer lists the external libs presentClosed2017-04-13

Related to CoCoA-5 - Support #677: Credits to CoCoA-5 contributorsNew2015-04-02

History

#1 Updated by John Abbott almost 9 years ago

One piece of software printed out a message every time a Normaliz function was called: this produced thousands of messages -- too many I think.

Another piece of software printed out a "detailed" message the first time a foreign function was called, but not for any subsequent calls. This does mean that the output of a top-level function call may depend on what functions have been called earlier in the session. Of course, these informative messages are somehow different from the standard output -- the standard output is the same, but there may be some "incidental" output.

Personally I do not much like the idea of printing out "incidental" messages in the middle of a computation.

#2 Updated by John Abbott almost 9 years ago

I propose printing out a message about external libraries at the same time as the banner is printed out -- and the message should be suppressed if the banner is suppressed.

I would like a very short message such as:

CoCoA with external libs: NORMALIZ, FROBBY

Perhaps there could be a second line explaining how to find out more about the external libs. Presumably it can just say to look up the extlib name in the on-line manual.

NOTE should there also be a "credit" for GMP?

#3 Updated by Anna Maria Bigatti almost 9 years ago

  • Status changed from New to In Progress
  • Assignee set to Anna Maria Bigatti

Done in init.cpkg5.... but that's not good: it does not see the "--no-preamble" flag :-(
undoing it.

#4 Updated by John Abbott almost 9 years ago

We would like authors to cite CoCoA when they use in the their research. Presumably then they should also cite any external libs which were used. But how can they know whether an external lib was used?

One possibility would be to have counters (one for each external lib) which increment every time CoCoALib calls a function from an external lib. Then you can check the counters before your computation, and again afterwards; those counters which changed indicate which external libs were used (and "how much" they were used).

Is it is a sane idea to create such (global) counters? Implementation might be messy (especially in a threadsafe manner).

#5 Updated by Anna Maria Bigatti almost 9 years ago

Anna Maria Bigatti wrote:

Done in init.cpkg5.... but that's not good: it does not see the "--no-preamble" flag :-(
undoing it.

not elegant but done in Banner.C

#6 Updated by John Abbott almost 9 years ago

  • % Done changed from 0 to 50

I think that Banner.C is a reasonable place to put it. I have cleaned up the code slightly; it now also prints out the external libs even in the GUI :-)

PS shouldn't Banner.C be called banner.C?

UPDATE now I see that all the other C5 files follow the convention that the name starts with a capital.

#7 Updated by John Abbott almost 9 years ago

I spoke to Christof about the idea of recording when ext libs are actually used (e.g. see my suggestion of counters in note 4).

Christof thinks that a boolean for each ext lib is more useful than a counter. The counter would simply count how many calls, and could not easily distinguish between a simple call to set a flag, and a complex call to compute a Hilbert basis...

It would be helpful to have a command for resetting all the flags; so the expected use would be:
  • reset all flags;
  • perform your computation;
  • check the flags to see which ext libs were used.

These flags should exist in CoCoALib too; I suppose a std::map is probably the most appropriate structure.

#8 Updated by John Abbott almost 9 years ago

Now I'm less sure about using a std::map since it might be difficult and/or costly to make it threadsafe.

Probably a global vector<int> is a better solution. I would like that simultaneous setting of several flags in the vector produces the correct output: i.e. at the end all of the flags are set. If an int is write-atomic then this should work out OK. Perhaps vector<double> is safer?

Or maybe separate global flags can be used for each ext lib? But how can this be done in a simple/automatic/scalable/safe manner?

I also want to be able to reset all flags for ext libs (without knowing precisely which ones are actually present).

#9 Updated by John Abbott almost 9 years ago

If we do implement some scheme for recognising use of external libraries, probably we should also do something similar for contributed packages -- that way, those who do contribute to CoCoA could get some recognition. Then if we do it for contributed packages, what about contributed parts of CoCoALib?

Mmm, tricky. :-/

#10 Updated by John Abbott about 8 years ago

  • Target version changed from CoCoA-5.1.3/4 Jan 2016 to CoCoA-5.2.0 spring 2017

The last comment said "Mmmm, tricky!" -- that's good enough reason to postpone! ;-)

#11 Updated by Anna Maria Bigatti over 7 years ago

#12 Updated by Anna Maria Bigatti over 7 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 50 to 90

list of linked libraries is printed what cocoa starts.
For the refinements I opened issue #943.
Feedback on this? Close?

#13 Updated by John Abbott almost 7 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100
  • Estimated time changed from 2.00 h to 4.40 h

I think it is best to skip the fancy idea suggested in comment 7, at least for the time being.

Closing after 7 months in feedback.

#14 Updated by John Abbott almost 7 years ago

  • Related to Feature #1050: ExternalLibs: function for getting info added

#15 Updated by John Abbott almost 7 years ago

  • Related to Bug #1046: CoCoA-5 no longer lists the external libs present added

#16 Updated by Winfried Bruns almost 7 years ago

The Normaliz header of the development version that will soon become 3.3.0 now lists the external packages compiled into libnormaliz, at the moment the candidates are CoCoALib and SCIP. See example below. libnormaliz does not know which packages are compiled into it.

\.....|
Normaliz 3.3.0 \....|
\...|
(C) The Normaliz Team, University of Osnabrueck \..|
February 2017 \.|
\|
------------------------------------------------------------
with paackage(s) CoCoALib

#17 Updated by John Abbott over 3 years ago

  • Related to Support #677: Credits to CoCoA-5 contributors added

Also available in: Atom PDF