forked from ahmadia/homebrew-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hopdm.rb
89 lines (82 loc) · 2.08 KB
/
hopdm.rb
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
require 'formula'
# HOPDM: A interior-point linear optimizer designed for solving large systems.
class Hopdm < Formula
homepage 'http://www.maths.ed.ac.uk/~gondzio/software/hopdm.html'
url 'http://dl.dropbox.com/u/72178/dist/hopdm-2.13.tar.gz'
sha1 '5d4df64f1a03251c0c22f9d292c26da2f2cea1eb'
def patches
{:p1 => DATA}
end
def install
ENV.fortran
inreplace 'makefile' do |s|
s.remove_make_var! 'FC'
s.change_make_var! 'LIBS', '-Wl,-framework -Wl,Accelerate'
s.remove_make_var! 'FFLAGS'
s.remove_make_var! 'LDFLAGS'
s.remove_make_var! 'CC'
s.remove_make_var! 'CFLAGS'
s.remove_make_var! 'COBJS'
end
system 'make'
bin.install 'hopdm'
end
end
__END__
Patch to disable timing routines.
diff --git a/mytime.f b/mytime.f
index 55bdaaa..ce024fe 100644
--- a/mytime.f
+++ b/mytime.f
@@ -25,17 +25,17 @@ C SECONDS to store the elapsed time.
C
C
C Only for DOS
- COMMON/IDTM/ IDATIM
- INTEGER*4 IDATIM(9)
+C COMMON/IDTM/ IDATIM
+C INTEGER*4 IDATIM(9)
C
C Only for SUN UNIX
- COMMON /TIME/ ELTIME
- REAL ELTIME(3)
+C COMMON /TIME/ ELTIME
+C REAL ELTIME(3)
C
C Only for IBM UNIX
- COMMON /TIMIBM/ T1,T2
- DOUBLE PRECISION T1,T2
- DOUBLE PRECISION SECONDS
+C COMMON /TIMIBM/ T1,T2
+C DOUBLE PRECISION T1,T2
+C DOUBLE PRECISION SECONDS
C
C
C *** PARAMETERS DESCRIPTION
@@ -74,16 +74,16 @@ C
C
C Here for UNIX (IBM RISC6000 and Power PC workstations)
C ------------------------------------------------------
- IF(JOB.EQ.0) THEN
- call init_seconds()
- T1 = seconds()
- T2 = T1
- ELSE
- T2 = seconds()
- ENDIF
- WRITE(BUFFER,101) (T2 - T1)
- 101 format(1X,'MYTIME: Elapsed user time:',F12.2)
- CALL MYWRT(IOLOG,BUFFER)
+C IF(JOB.EQ.0) THEN
+C call init_seconds()
+C T1 = seconds()
+C T2 = T1
+C ELSE
+C T2 = seconds()
+C ENDIF
+C WRITE(BUFFER,101) (T2 - T1)
+C 101 format(1X,'MYTIME: Elapsed user time:',F12.2)
+C CALL MYWRT(IOLOG,BUFFER)
C
C
C