Skip to content
This repository
Newer
Older
100755 74 lines (65 sloc) 2.428 kb
c00e9a64 »
2009-01-09 improved the readme
1 import distutils.sysconfig
2 import os
3 import numpy
4
d8fd6661 »
2009-05-08 added repeated sparse jacobian driver
5 # 1: BUILD ADOL-C FUNCTIONALITY WITHOUT SPARSE DRIVERS
6
3bfe75fd »
2009-01-09 screwed up commit
7 adolc_include_path = os.getcwd() + '/adolc-2.0.0'
8 adolc_library_path = os.getcwd() + '/adolc-2.0.0/adolc/.libs'
c00e9a64 »
2009-01-09 improved the readme
9
10 LIBS = ['adolc',
d8fd6661 »
2009-05-08 added repeated sparse jacobian driver
11 'boost_python',
c00e9a64 »
2009-01-09 improved the readme
12 ]
13 LIBPATH = [
14 adolc_library_path,
485c378a »
2009-04-17 added ax = adouble(numpy.array([....]) functionality
15 ]
c00e9a64 »
2009-01-09 improved the readme
16 INCLUDEPATH = [
17 adolc_include_path,
18 '/usr/include/python2.5'
19 ]
20
21 env = Environment(
22 CPPPATH=[distutils.sysconfig.get_python_inc(),numpy.get_include()] + INCLUDEPATH,
23 CXXFLAGS="-ftemplate-depth-100 -DBOOST_PYTHON_DYNAMIC_LIB -O2",
24 LIBPATH=["/usr/lib/python2.5/config"] + LIBPATH,
25 LIBS= LIBS,
26 RPATH = LIBPATH, #include information where shared libraries can be found to avoid errors like: "ImportError: libboost_python-gcc42-mt-1_34_1.so.1.34.1: cannot open shared object file: No such file or directory"
27 SHLIBPREFIX="", #gets rid of lib prefix
28 )
29 Default('.')
30 adolc = env.SharedLibrary(target='_adolc', source=['py_adolc.cpp', 'num_util.cpp'])
31 #env.Install("./release/adolc", adolc)
32
d8fd6661 »
2009-05-08 added repeated sparse jacobian driver
33
34 # 2: BUILD SPARSE SUPPORT
35 LIBS = ['adolc',
36 'boost_python',
37 'colpack',
38 ]
39 LIBPATH = [
40 adolc_library_path,
41 '/data/walter/opt_software/ColPack/',
42 ]
43 INCLUDEPATH = [
44 adolc_include_path,
45 adolc_include_path + '/adolc/sparse',
46 adolc_include_path + '/colpack',
47 '/usr/include/python2.5'
48 ]
49
50 env = Environment(
51 CPPPATH=[distutils.sysconfig.get_python_inc(),numpy.get_include()] + INCLUDEPATH,
52 CXXFLAGS="-ftemplate-depth-100 -DBOOST_PYTHON_DYNAMIC_LIB -O2",
53 LIBPATH=["/usr/lib/python2.5/config"] + LIBPATH,
54 LIBS= LIBS,
55 RPATH = LIBPATH, #include information where shared libraries can be found to avoid errors like: "ImportError: libboost_python-gcc42-mt-1_34_1.so.1.34.1: cannot open shared object file: No such file or directory"
56 SHLIBPREFIX="", #gets rid of lib prefix
57 )
58 Default('.')
59
60
61 colpack = env.SharedLibrary(target='_colpack',
62 source=['py_colpack.cpp',
63 'num_util.cpp',
64 adolc_include_path +'/adolc/sparse/sparsedrivers.cpp',
65 adolc_include_path +'/adolc/sparse/sparse_fo_rev.cpp',
66 adolc_include_path +'/adolc/int_forward_s.c',
67 adolc_include_path +'/adolc/int_forward_t.c',
68 adolc_include_path +'/adolc/int_reverse_s.c',
69 adolc_include_path +'/adolc/int_reverse_t.c',
70 adolc_include_path +'/adolc/nonl_ind_forward_s.c',
71 adolc_include_path +'/adolc/nonl_ind_forward_t.c',
72 adolc_include_path +'/adolc/indopro_forward_s.c',
73 adolc_include_path +'/adolc/indopro_forward_t.c',
74 ])
Something went wrong with that request. Please try again.