3 downloads
="$HOME/software/downloads"
5 if [ ! -e /usr
/include
/tiffio.h
]; then
6 echo "Error: could not find file tiffio.h. Please install libtiff4-dev."
12 mkdir
-p "${downloads}"
16 if [ -e splash2
]; then
17 echo "Error: a directory with the name splash2 already exists. Please"
18 echo "remove it before running this script, or run this script in another"
25 if [ ! -e splash2.
tar.gz
]; then
26 wget
-q http
://www-flash.stanford.edu
/apps
/SPLASH
/splash2.
tar.gz
28 if [ ! -e splash2-modified.
patch.gz
]; then
29 wget
-q http
://www.capsl.udel.edu
/splash
/splash2-modified.
patch.gz
33 tar zxf
$downloads/splash2.
tar.gz
35 gzip -cd < "$downloads/splash2-modified.patch.gz" |
patch -p1 -s
37 diff -ru orig/splash2/codes/apps/radiosity/display.C splash2/codes/apps/radiosity/display.C
38 --- orig/splash2/codes/apps/radiosity/display.C 2008-05-25 10:38:52.000000000 +0200
39 +++ splash2/codes/apps/radiosity/display.C 2008-05-25 10:37:51.000000000 +0200
42 /*************************************************************************/
48 --- orig/splash2/codes/apps/radiosity/Makefile 2008-05-25 10:38:52.000000000 +0200
49 +++ splash2/codes/apps/radiosity/Makefile 2008-05-25 13:05:36.000000000 +0200
52 LOADLIBES = glibdumb/glib.a glibps/glibps.a
55 +$(TARGET): $(OBJS) $(LOADLIBES)
56 $(CC) $(OBJS) $(CFLAGS) $(LOADLIBES) -o $(TARGET) $(LDFLAGS)
58 radiosity.h: patch.h model.h parallel.h task.h
60 visible.c: visible.C $(HS)
61 rad_tools.c: rad_tools.C $(HS)
62 room_model.c: room_model.C $(HS)
64 + make -C glibdumb glib.a
66 + make -C glibps glibps.a
67 diff -ru orig/splash2/codes/apps/raytrace/rltotiff/Makefile splash2/codes/apps/raytrace/rltotiff/Makefile
68 --- orig/splash2/codes/apps/raytrace/rltotiff/Makefile 2008-05-25 10:38:52.000000000 +0200
69 +++ splash2/codes/apps/raytrace/rltotiff/Makefile 2008-05-25 10:31:57.000000000 +0200
71 include ../../../Makefile.config
73 LDFLAGS := $(LDFLAGS) -ltiff
76 - rm -rf $(OBJS) $(TARGET)
81 diff -ru orig/splash2/codes/Makefile.config splash2/codes/Makefile.config
82 --- orig/splash2/codes/Makefile.config 2008-05-25 10:38:52.000000000 +0200
83 +++ splash2/codes/Makefile.config 2008-05-25 10:14:25.000000000 +0200
87 -CFLAGS := -O3 -pthread -D_POSIX_C_SOURCE=200112
88 +CFLAGS := -g3 -m32 -O3 -pthread -D_POSIX_C_SOURCE=200112
89 #CFLAGS := -g3 -pthread -D_POSIX_C_SOURCE=200112
90 CFLAGS := \$(CFLAGS) -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wdisabled-optimization
91 CFLAGS := \$(CFLAGS) -Wpadded -Winline -Wpointer-arith -Wsign-compare -Wendif-labels
93 CFLAGS := \$(CFLAGS) -Wpadded -Winline -Wpointer-arith -Wsign-compare -Wendif-labels
96 -BASEDIR := \$(HOME)/splash2/codes
97 -MACROS := \$(BASEDIR)/null_macros/c.m4.null
98 +BASEDIR := ${PWD}/codes
99 +MACROS := \$(BASEDIR)/null_macros/c.m4.null.POSIX_BARRIER
100 M4 := m4 -s -Ulen -Uindex
103 --- orig/splash2/codes/apps/radiosity/elemman.C 2008-07-13 20:24:35.000000000 +0200
104 +++ splash2/codes/apps/radiosity/elemman.C 2008-07-13 20:45:15.000000000 +0200
113 @@ -707,6 +708,12 @@ void process_rays(Element *e, long proce
114 e->n_interactions = 0 ;
115 UNLOCK(e->elem_lock->lock);
119 + for (p = i_list; p; p = p->next)
120 + DRD_IGNORE_VAR(*p);
123 /* For each interaction, do BF-error-analysis */
124 bf_error_analysis_list( e, i_list, process_id ) ;
126 --- orig/splash2/codes/apps/radiosity/rad_main.C 2008-07-13 20:24:35.000000000 +0200
127 +++ splash2/codes/apps/radiosity/rad_main.C 2008-07-13 20:50:01.000000000 +0200
134 /* ANL macro initialization */
136 @@ -1084,6 +1085,18 @@ void init_global(long process_id)
137 /* Initialize statistical info */
138 init_stat_info(process_id) ;
143 + DRD_IGNORE_VAR(global->pbar_count);
145 + i < sizeof(global->task_queue) / sizeof(global->task_queue[0]);
148 + DRD_IGNORE_VAR(global->task_queue[i].n_tasks);
150 + DRD_IGNORE_VAR(global->element_buf);
155 --- orig/splash2/codes/apps/radiosity/Makefile 2008-07-13 20:24:35.000000000 +0200
156 +++ splash2/codes/apps/radiosity/Makefile 2008-07-13 20:09:27.000000000 +0200
157 @@ -6,7 +6,7 @@ HS = model.h parallel.h patch.h radiosit
159 include ../../Makefile.config
161 -CFLAGS := \$(CFLAGS) -I./glibdumb -I./glibps
162 +CFLAGS := \$(CFLAGS) -I./glibdumb -I./glibps -I../../../../../drd -I../../../../../include
164 #CCOPTS = -I -float -I/usr/include \$(CFLAGS)
165 #LDFLAGS = -lm -lpthread
168 for m
in $
(find codes
-name Makefile
)
171 make -s -C $
(dirname $m)