4 |
|
# Also, set DEFAULT values for Stanford-specific (if running at Stanford) make variables. |
5 |
|
# To override the DEFAULT Stanford values, create a config.local file. |
6 |
|
|
7 |
– |
use Sys::Hostname; |
8 |
– |
|
7 |
|
use constant ICCMAJOR => 9; |
8 |
|
use constant ICCMINOR => 0; |
9 |
|
use constant IFORTMAJOR => 9; |
129 |
|
# Set DEFAULT values for Stanford-specific (if running at Stanford) make variables. |
130 |
|
if (-e "suflag.txt") |
131 |
|
{ |
134 |
– |
my($hostname); |
135 |
– |
my($machtype); |
132 |
|
my($line); |
133 |
|
|
134 |
|
if (open(SUFLAG, "<suflag.txt")) |
135 |
|
{ |
140 |
– |
# first figure out what type of Stanford machine this script is running on |
141 |
– |
$hostname = hostname(); |
142 |
– |
|
143 |
– |
if ($hostname =~ /j1/) |
144 |
– |
{ |
145 |
– |
$machtype = "j1"; |
146 |
– |
} |
147 |
– |
elsif ($hostname =~ /d02/) |
148 |
– |
{ |
149 |
– |
$machtype = "d02"; |
150 |
– |
} |
151 |
– |
elsif ($hostname =~ /hmidb/) |
152 |
– |
{ |
153 |
– |
$machtype = "dbserver"; |
154 |
– |
} |
155 |
– |
elsif ($hostname =~ /cl1n0/) |
156 |
– |
{ |
157 |
– |
$machtype = "cluster"; |
158 |
– |
} |
159 |
– |
elsif ($hostname =~ /dcs/) |
160 |
– |
{ |
161 |
– |
$machtype = "dcs"; |
162 |
– |
} |
163 |
– |
|
164 |
– |
if (defined($machtype)) |
165 |
– |
{ |
166 |
– |
print OUTFILE "MACHTYPE = $machtype\n"; |
167 |
– |
} |
168 |
– |
|
136 |
|
while (defined($line = <SUFLAG>)) |
137 |
|
{ |
138 |
|
chomp($line); |