COIN-OR::LEMON - Graph Library

Opened 17 years ago

Closed 17 years ago

#74 closed enhancement (fixed)

Support MinGW

Reported by: Alpar Juttner Owned by: Balazs Dezso
Priority: major Milestone: LEMON 1.0 release
Component: core Version:
Keywords: Cc:
Revision id:

Description (last modified by Balazs Dezso)

Support MinGW

Attachments (4)

time_measure_port.hg (17.3 KB) - added by Balazs Dezso 17 years ago.
mingw_compatible_time_measure.patch (6.6 KB) - added by Balazs Dezso 17 years ago.
mingw_compatible_time_measure.2.patch (6.6 KB) - added by Balazs Dezso 17 years ago.
mingw_compatibility_graph_to_eps.patch (1.7 KB) - added by Balazs Dezso 17 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 17 years ago by Alpar Juttner

Owner: changed from Alpar Juttner to Balazs Dezso

Changed 17 years ago by Balazs Dezso

Attachment: time_measure_port.hg added

comment:2 Changed 17 years ago by Balazs Dezso

I uploaded a port for time_measure.h
It is modified in order to support mingw32 time functions.

comment:3 Changed 17 years ago by Alpar Juttner

A port of time_measure.h can already be found in ticket:52. Therefore I suggest waiting with this until those changes gets into the main branch.

Changed 17 years ago by Balazs Dezso

comment:4 Changed 17 years ago by Balazs Dezso

New patch based on the ported time_measure.h.

comment:5 in reply to:  4 ; Changed 17 years ago by Alpar Juttner

Replying to deba:

New patch based on the ported time_measure.h.

Thanks. In fact, it seems to be more than just a mingw compatibility fix, a lot of internals has also (positively) changed.

I have to minor issued.

  1. In the old version, TimeStamp stored the number of kernel ticks instead of seconds because I was worried whether rounding error could cause some problem. (The time of a kernel tick cannot be represented precisely on a double). Right now, I cannot see any real-life example where it would really cause problem, so I'm not against this change at all, just ask you to reconsider this change once more.
  2. In the stamp() function, please move the #ifdef into the execution block. (Otherwise it may happen that the documentation will not be generated to this function on Windows.)

Changed 17 years ago by Balazs Dezso

comment:6 in reply to:  5 Changed 17 years ago by Balazs Dezso

Description: modified (diff)

Replying to alpar:

Replying to deba:

New patch based on the ported time_measure.h.

Thanks. In fact, it seems to be more than just a mingw compatibility fix, a lot of internals has also (positively) changed.

I have to minor issued.

  1. In the old version, TimeStamp stored the number of kernel ticks instead of seconds because I was worried whether rounding error could cause some problem. (The time of a kernel tick cannot be represented precisely on a double). Right now, I cannot see any real-life example where it would really cause problem, so I'm not against this change at all, just ask you to reconsider this change once more.
  2. In the stamp() function, please move the #ifdef into the execution block. (Otherwise it may happen that the documentation will not be generated to this function on Windows.)

comment:7 Changed 17 years ago by Balazs Dezso

Description: modified (diff)

2) I uploaded the new patch based on your issue. 1) In my opinion, the rounding error is just a slightly dependent on this change. If t1 and t2 values are the retrieved timestamps and c is the clock time, then the (t2-t1)/c and the t2/c-t1/c should give back nearly the same value, because the division could not cause big relative error. But I think, the conversion from clock_t to double, which is already in the original version, could cause big relative error, when we subtract t1 from t2. However, on a regular linux desktop it does not cause problem, because the sensitivity of timer is at most 1/1000 second, and the double value has 52 binary digits, so more than 140 thousand years can measured with TimeStamp??.

Changed 17 years ago by Balazs Dezso

comment:8 Changed 17 years ago by Balazs Dezso

I uploaded a patch for MinGW compatibility.

comment:9 in reply to:  7 Changed 17 years ago by Alpar Juttner

Replying to deba:

1) In my opinion, [...]

My only concert was the case of exact comparison, which sometimes might be useful. If we store the times as (integer) ticks, then double will compute accurately with the number of this magnitude. If store the values in seconds, the computations will not be exact.

Anyway, I think it is less than minor issue.

I put the second patch (with a changes commit log) into the main branch: [e1dd2a70737c]

comment:10 Changed 17 years ago by Alpar Juttner

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.