-
Notifications
You must be signed in to change notification settings - Fork 3
/
runconfig
executable file
·73 lines (71 loc) · 5.67 KB
/
runconfig
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
#!/usr/bin/env perl
#
# A script used by the authors of FastBit to configure the package on a
# few common machines used. Terse comments are provided in hoping they
# might be instructive for configuring the package on other machines.
#
use Env qw(HOME HOSTNAME PWD SYS);
if (! ${HOSTNAME}) {
$HOSTNAME=`hostname | tr -d '[[:space:]]'`;
}
if (! ${SYS}) {
$SYS=`uname -s`;
}
print "Configuring on ${HOSTNAME} with ${SYS}\n";
if (${HOSTNAME} =~ m/^kwu\-/) {
# on a Mac used by a developer, enable maintainer mode, use debug options # CC=gcc-mp-4.7 CXX=g++-mp-4.7 # CC=clang CXX=clang++ -gdwarf-2
# -DFASTBIT_RECURSIVE_UNLOAD -Wall -Wall
#$cmd="CC=gcc-11 CXX=g++-11 ./configure --prefix=${HOME}/tmp --enable-maintainer-mode --with-java CFLAGS='-g -O0 -Wno-deprecated-declarations' CXXFLAGS='-std=c++17 -g -O0 -Wno-register -Wno-deprecated-declarations'";
$cmd="CC=clang CXX=clang++ ./configure --prefix=${HOME}/tmp --enable-maintainer-mode --with-java CFLAGS='-g -O0 -Wno-deprecated-declarations' CXXFLAGS='-std=c++17 -g -O0 -Wno-register -Wno-deprecated-declarations'";
} elsif (${HOSTNAME} =~ m/^data\w+[.lbl.gov]?$/) {
# on dataXYZ, know where is java and where to install, use extra optimization
$cmd="./configure --enable-xopt --disable-debug --with-java=/software/jdk1.7.0 --prefix=/data/john/Linux";
} elsif (${HOSTNAME} =~ m/^d\w+[.lbl.gov]?$/) {
# on sdm group's linux machines, know where is java and where to install
$cmd="./configure --enable-xopt --disable-debug --with-java=/software/jdk1.7.0 --prefix=/fastbit/`uname -s`";
} elsif (${HOSTNAME} =~ m/^cori\w+[.nersc.gov]?$/) {
# on the front end of cori at NERSC, there is a choice to be made about what compiler to use
# print "\nPlease make sure that PrgEnv-gnu is used, for example by executing 'module swap PrgEnv-intel PrgEnv-gnu'\n\n";
#$cmd="./configure --without-getpwuid --with-quiet-nan CFLAGS='-fPIC -O3 -std=c++11' CXXFLAGS='-fPIC -O3 -std=c++11' --without-java --prefix=/project/projectdirs/m1248/pkgs/cori/gnu";
#$cmd="./configure CC=pgcc CXX=pgCC --without-getpwuid --with-quiet-nan CFLAGS='-fPIC -O3' CXXFLAGS='-fPIC -O3' --without-java --prefix=/project/projectdirs/m1248/pkgs/cori/pgi";
#$cmd="./configure CC=cc CXX=CC --without-getpwuid --with-quiet-nan CFLAGS='-fPIC -O3' CXXFLAGS='-fPIC -O3' --without-java --prefix=/project/projectdirs/m1248/pkgs/cori/intel";
$cmd="./configure CC=cc CXX=CC --without-getpwuid --with-quiet-nan CFLAGS='-fPIC -O0 -g' CXXFLAGS='-fPIC -O0 -g' --without-java --prefix=/project/projectdirs/m1248/pkgs/cori/intel";
} elsif (${HOSTNAME} =~ m/^edison\w+[.nersc.gov]?$/) {
# on the front end of edison at NERSC, the default compiler is from Intel
print "\nPlease make sure that PrgEnv-gnu is used, for example by executing 'module swap PrgEnv-intel PrgEnv-gnu'\n\n";
$cmd="./configure --without-getpwuid --with-quiet-nan CFLAGS='-fPIC -O3 -std=c++11' CXXFLAGS='-fPIC -O3 -std=c++11' --without-java --prefix=/project/projectdirs/m1248/pkgs/edison/gnu";
#$cmd="./configure CC=icc CXX=icpc --without-getpwuid --with-quiet-nan CFLAGS='-fPIC -g -O3' CXXFLAGS='-fPIC -g -O3' --without-java --prefix=/project/projectdirs/m1248/pkgs/edison/intel";
} elsif (${HOSTNAME} =~ m/^hopper\w+[.nersc.gov]?$/) {
# on the front end of hopper at NERSC, there is a choice to be made about what compiler to use
# print "\nPlease make sure that PrgEnv-gnu is used, for example by executing 'module swap PrgEnv-pgi PrgEnv-gnu'\n\n";
$cmd="./configure --without-getpwuid --with-quiet-nan CFLAGS='-fPIC -O3 -std=c++11' CXXFLAGS='-fPIC -O3 -std=c++11' --without-java --prefix=/project/projectdirs/m1248/pkgs/hopper/gnu";
#$cmd="./configure CC=pgcc CXX=pgCC --without-getpwuid --with-quiet-nan CFLAGS='-fPIC -O3' CXXFLAGS='-fPIC -O3' --without-java --prefix=/project/projectdirs/m1248/pkgs/hopper/pgi";
} elsif (${HOSTNAME} =~ m/^sith/) {# sith.ccs.ornl.gov
# on sith at ORNL, try GNU compilers
$cmd="./configure --prefix=${HOME}/`uname -s`/sith-gnu --without-java --enable-xopt --disable-debug"
} elsif (${HOSTNAME} =~ m/^titan/) {#[-\w+]?[.ornl.gov]?$
# on titan at ORNL, try GNU compilers
$cmd="./configure --prefix=${HOME}/`uname -s`/titan-gnu --without-java --enable-xopt --disable-debug --disable-shared --without-getpwuid --with-quiet-nan"
# on titan at ORNL, need to choose between PGI and GNU compilers
#$cmd="env CC=pgcc CXX=pgCC ./configure --prefix=${HOME}/`uname -s`/tital-pgi --without-java --enable-xopt --disable-debug --disable-shared"
} elsif (${HOSTNAME} =~ m/^mira/) {# mira at ALCF
# need bgclang
print "\nPlease use +mpiwrapper-bgclang in .soft\n\n";
$cmd="env CC=bgclang CXX=bgclang++11 ./configure --prefix=${HOME}/`uname -s` --without-java --disable-debug --disable-shared"
} elsif (${HOSTNAME} =~ m/^cvr\w+[\.nersc\.gov]?$/) {
# on carver at NERSC, use the GNU compilers, no debugging
$cmd="./configure --without-getpwuid --with-quiet-nan --enable-xopt --disable-debug --without-java --prefix=/project/projectdirs/m1248/pkgs/carver";
} elsif (defined $ENV{"NERSC_HOST"}) {
# on other NERSC machines, use the GNU compilers, no debugging
use Env qw(NERSC_HOST);
$cmd="./configure --prefix=/project/projectdirs/m1248/pkgs/${NERSC_HOST}/gnu --without-getpwuid --with-quiet-nan --disable-debug --enable-xopt";
} else { # based on system type ${SYS}
if (${SYS} =~ m/CYGWIN/i || ${SYS} =~ m/MINGW/i) {
$cmd="env CPPFLAGS=-DHAVE_STRUCT_TIMESPEC CXXPPFLAGS='-std=gnu++0x -U__STRICT_ANSI__ -DHAVE_STRUCT_TIMESPEC' CFLAGS='-O0 -g -DHAVE_STRUCT_TIMESPEC' CXXFLAGS='-O0 -g -DHAVE_STRUCT_TIMESPEC -std=gnu++0x -U__STRICT_ANSI__' ./configure --with-pthread --prefix=${PWD}/${SYS}";
}
else { # default options on generic linux/unix machines
$cmd="./configure --prefix=${PWD}/${SYS}";
}
}
print "$cmd\n\n";
system($cmd);