forked from MethodicalAcceleratorDesign/MAD-NG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
106 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This file must be used with "source bin/activate" *from bash* | ||
# you cannot run it directly | ||
|
||
deactivate () { | ||
[[ -v _OLD_PATH ]] && export PATH=$_OLD_PATH | ||
[[ -v _OLD_LUA_PATH ]] && export LUA_PATH=$_OLD_LUA_PATH | ||
[[ -v _OLD_LUA_CPATH ]] && export LUA_CPATH=$_OLD_LUA_CPATH | ||
[[ -z $LUA_PATH ]] && unset LUA_PATH | ||
[[ -z $LUA_CPATH ]] && unset LUA_CPATH | ||
unset MAD_ROOT _OLD_PATH _OLD_LUA_PATH _OLD_LUA_CPATH | ||
unalias lua lua51 luajit 2>/dev/null | ||
[[ $1 == nondestructive ]] || unset -f deactivate | ||
rehash | ||
} | ||
|
||
deactivate nondestructive | ||
|
||
export MAD_ROOT=$(readlink -f "$(dirname $0)"/../..) | ||
|
||
_OLD_PATH=$PATH | ||
_OLD_LUA_PATH=$LUA_PATH | ||
_OLD_LUA_CPATH=$LUA_CPATH | ||
export PATH=$MAD_ROOT/install/bin:$PATH | ||
export LUA_PATH="$MAD_ROOT/install/share/lua/5.1/?.lua;$LUA_PATH" | ||
export LUA_CPATH="$MAD_ROOT/install/lib/lua/5.1/?.so;$LUA_CPATH" | ||
alias lua="rlwrap lua" | ||
alias lua51="rlwrap lua51" | ||
alias luajit="rlwrap luajit" | ||
rehash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#! /bin/zsh | ||
|
||
# Do this manually: | ||
# cd src; make cleanall -f Makefile.linux | ||
# git clean -xdf | ||
# git stash | ||
|
||
set -ex | ||
|
||
./tests/travis/build_luajit.sh | ||
./tests/travis/build_lpeg.sh | ||
|
||
./tests/travis/build_lapack.sh | ||
./tests/travis/build_fftw3.sh | ||
./tests/travis/build_nfft3.sh | ||
./tests/travis/build_nlopt2.sh | ||
|
||
cd src | ||
make -f Makefile.linux cleanall | ||
make -f Makefile.linux | ||
cd .. | ||
|
||
./tests/travis/build_luarocks.sh | ||
. tests/travis/activate | ||
|
||
ln -s $(readlink -f src/mad) install/bin | ||
ln -s $(readlink -f lib/luajit/bin/luajit) install/bin/luajit | ||
ln -s luajit install/bin/lua | ||
ln -s luajit install/bin/lua51 | ||
|
||
luarocks install luacov | ||
luarocks install cluacov | ||
luarocks install lyaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#! /bin/bash | ||
set -ex | ||
cd lib | ||
wget ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4.tar.gz | ||
tar xzf fftw-3.3.4.tar.gz | ||
mv fftw-3.3.4 fftw3 | ||
[[ -e fftw-3.3.4.tar.gz ]] || wget ftp://ftp.fftw.org/pub/fftw/fftw-3.3.4.tar.gz | ||
[[ -e fftw3 ]] || (tar xzf fftw-3.3.4.tar.gz && \ | ||
mv fftw-3.3.4 fftw3) | ||
cd fftw3 | ||
./configure --disable-shared | ||
make clean | ||
make | ||
cp .libs/libfftw3.a ../../bin/linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
#! /bin/bash | ||
set -ex | ||
svn co https://icl.utk.edu/svn/lapack-dev/lapack/trunk lib/lapack | ||
HERE=$(readlink -f "$(dirname $BASH_SOURCE)") | ||
[[ -e lib/lapack ]] || svn co https://icl.utk.edu/svn/lapack-dev/lapack/trunk lib/lapack | ||
cd lib/lapack | ||
cp make.inc.example make.inc | ||
patch -p0 <${HERE}/patch_lapack.diff | ||
make clean | ||
make lapack_install lapacklib blaslib | ||
cp liblapack.a librefblas.a ../../bin/linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,6 @@ | |
# NOTE: this must be built after luajit! | ||
set -ex | ||
cd lib/lpeg | ||
make clean | ||
make | ||
cp liblpeg.a ../../bin/linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
#! /bin/bash | ||
set -ex | ||
cd lib | ||
wget http://www.nfft.org/download/nfft-3.3.1.tar.gz | ||
tar xzf nfft-3.3.1.tar.gz | ||
mv nfft-3.3.1 nfft3 | ||
[[ -e nfft-3.3.1.tar.gz ]] || wget http://www.nfft.org/download/nfft-3.3.1.tar.gz | ||
[[ -e nfft3 ]] || (tar xzf nfft-3.3.1.tar.gz && \ | ||
mv nfft-3.3.1 nfft3) | ||
cd nfft3 | ||
./configure --disable-shared \ | ||
--with-fftw3=`pwd`/../fftw3 \ | ||
--with-fftw3-libdir=`pwd`/../fftw3/.libs \ | ||
--with-fftw3-includedir=`pwd`/../fftw3/api | ||
make clean | ||
make | ||
cp .libs/libnfft3.a ../../bin/linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
#! /bin/bash | ||
set -ex | ||
cd lib | ||
wget http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz | ||
tar xzf nlopt-2.4.2.tar.gz | ||
mv nlopt-2.4.2 nlopt2 | ||
[[ -e nlopt-2.4.2.tar.gz ]] || wget http://ab-initio.mit.edu/nlopt/nlopt-2.4.2.tar.gz | ||
[[ -e nlopt2 ]] || (tar xzf nlopt-2.4.2.tar.gz && \ | ||
mv nlopt-2.4.2 nlopt2) | ||
cd nlopt2 | ||
./configure --disable-shared | ||
make clean | ||
make | ||
cp .libs/libnlopt.a ../../bin/linux/libnlopt2.a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- make.inc 2017-03-15 11:36:45.343057823 +0100 | ||
+++ make.inc 2017-03-15 11:39:55.082679220 +0100 | ||
@@ -17,9 +17,9 @@ | ||
# should not compile LAPACK with flags such as -ffpe-trap=overflow. | ||
# | ||
FORTRAN = gfortran | ||
-OPTS = -O2 -frecursive | ||
+OPTS = -O2 -frecursive -fPIC | ||
DRVOPTS = $(OPTS) | ||
-NOOPT = -O0 -frecursive | ||
+NOOPT = -O0 -frecursive -fPIC | ||
LOADER = gfortran | ||
LOADOPTS = | ||
# | ||
@@ -52,7 +52,7 @@ | ||
# CC is the C compiler, normally invoked with options CFLAGS. | ||
# | ||
CC = gcc | ||
-CFLAGS = -O3 | ||
+CFLAGS = -O3 -fPIC | ||
# | ||
# The archiver and the flag(s) to use when building archive (library) | ||
# If you system has no ranlib, set RANLIB = echo. |