head	1.7;
access;
symbols;
locks; strict;
comment	@# @;


1.7
date	2006.08.25.02.48.15;	author johns;	state Exp;
branches;
next	1.6;

1.6
date	2006.08.24.06.19.11;	author johns;	state Exp;
branches;
next	1.5;

1.5
date	2006.08.24.03.55.03;	author johns;	state Exp;
branches;
next	1.4;

1.4
date	2006.08.24.03.53.23;	author johns;	state Exp;
branches;
next	1.3;

1.3
date	2006.08.23.23.01.43;	author johns;	state Exp;
branches;
next	1.2;

1.2
date	2006.08.23.20.37.59;	author johns;	state Exp;
branches;
next	1.1;

1.1
date	2006.08.23.20.19.37;	author johns;	state Exp;
branches;
next	;


desc
@@


1.7
log
@updated path to icc executable hacking script
@
text
@##
## Makefile for parallel ion placement tool
##

# Command (if any) needed to patch the Intel C/C++ compiler's 
# resulting binary so it can run unhindered on AMD processors.
# By default this is set to 'touch', since it only matters on x86
# platforms, and only then when using Intel C/C++ compilers.
HACKICCBINARY = touch

default:
	@@echo "Pick a build:"
	@@echo "---------------"
	@@echo "  aix5-xlc         (32-bit)"
	@@echo "  aix5-64-xlc      (64-bit)"
	@@echo "  irix6-cc         (32-bit, mips3)"
	@@echo "  irix6-64-cc      (64-bit, mips4)"
	@@echo "  linux-gcc        (32-bit)"
	@@echo "  linux-gcc-simple (32-bit)"
	@@echo "  linux-gcc-amd    (64-bit)"
	@@echo "  linux-gcc-amd2   (64-bit)"
	@@echo "  linux-gcc-debug  (32-bit)"
	@@echo "  linux-icc        (32-bit, P4/Xeon tuned)"
	@@echo "  linux-icc-thr    (32-bit, P4/Xeon tuned, SSE, multithreaded)"
	@@echo "  linux-icc-sse2   (32-bit, P4/Xeon tuned, SSE2)"
	@@echo "  linux-icc-sse3   (32-bit, P4/Xeon tuned, SSE3)"
	@@echo "  linux-ia64-thr   (64-bit, Itanium2 tuned, NCSA Altix)"
	@@echo "  solaris          (32-bit)"
	@@echo "  solaris-64       (64-bit)"
	@@echo "---------------"
	@@echo "  make <build>"


aix5-xlc:
	$(MAKE) all \
	"CC  = xlc" \
	"CFLAGS   = -w -qinlglue -qarch=com -qtune=pwr3" \
	"LFLAGS = -lm"

aix5-64-xlc:
	$(MAKE) all \
	"CC  = xlc" \
	"CFLAGS   =  -w -qinlglue -q64 -qarch=com -qtune=pwr4" \
	"LFLAGS = -lm"

irix6-cc:
	$(MAKE) all \
	"CC  = xlc" \
	"CFLAGS   =  -O2 -fullwarn -n32 -mips3" \
	"LFLAGS = -lm"

irix6-64-cc:
	$(MAKE) all \
	"CC  = xlc" \
	"CFLAGS   =  -O2 -fullwarn -64 -mips4" \
	"LFLAGS = -lm"

linux-gcc:
	$(MAKE) all \
	"CC  = cc" \
	"CFLAGS   = -Wall -m32 -O5 -ffast-math -fomit-frame-pointer -fno-math-errno" \
	"LFLAGS = -lm"

linux-gcc-simple:
	$(MAKE) all \
	"CC  = cc" \
	"CFLAGS   = -Wall -m32 -O2 " \
	"LFLAGS = -lm"

linux-gcc-amd:
	$(MAKE) all \
	"CC  = cc" \
	"CFLAGS   = -Wall -m64 -O5 -ffast-math -fomit-frame-pointer -fno-math-errno" \
	"LFLAGS = -lm"

linux-gcc-amd2:
	$(MAKE) all \
	"CC  = cc" \
	"CFLAGS   = -Wall -m64 -O5 -ffast-math -fomit-frame-pointer -fno-math-errno -fno-trapping-math -ffinite-math-only" \
	"LFLAGS = -lm"

linux-gcc-debug:
	$(MAKE) all \
	"CC  = cc" \
	"CFLAGS   = -Wall -m32 -g -DDEBUG" \
	"LFLAGS = -lm"

linux-ia64-thr:
	$(MAKE) all \
	"CC  = icc" \
	"CFLAGS   = -fast -static -DTHR" \
	"LFLAGS = -lm -lpthread"

linux-icc:
	$(MAKE) all \
	"CC  = icc" \
	"CFLAGS   = -axW -fno-exceptions -fomit-frame-pointer -fno-math-errno -no-prec-sqrt -pc32 -vec-report=3 -ipo -O3 -static" \
	"LFLAGS = -lm"

linux-icc-thr:
	$(MAKE) all \
	"CC  = icc" \
	"CFLAGS   = -axW -fno-exceptions -fomit-frame-pointer -fno-math-errno -no-prec-sqrt -pc32 -vec-report=3 -ipo -O3 -static -DTHR" \
	"LFLAGS = -lm -lpthread"

linux-icc-sse2:
	$(MAKE) all \
	"CC  = icc" \
	"CFLAGS   = -fno-exceptions -fomit-frame-pointer -fno-math-errno -fast -no-prec-sqrt -pc32 -axP -vec-report=3" \
	"HACKICCBINARY = ../icchack/intel_check_executable_patch" \
	"LFLAGS = -lm"

linux-icc-sse3:
	$(MAKE) all \
	"CC  = icc" \
	"CFLAGS   = -fno-exceptions -fomit-frame-pointer -fno-math-errno -fast -no-prec-sqrt -pc32 -msse3 -vec-report=3" \
	"HACKICCBINARY = ../icchack/intel_check_executable_patch" \
	"LFLAGS = -lm"

linux-icc-sse3-64:
	$(MAKE) all \
	"CC  = icc" \
	"CFLAGS   = -m64 -fno-exceptions -fomit-frame-pointer -fno-math-errno -fast -no-prec-sqrt -pc32 -msse3 -vec-report=3" \
	"HACKICCBINARY = ../icchack/intel_check_executable_patch" \
	"LFLAGS = -lm"

solaris:
	$(MAKE) all \
	"CC  = cc" \
	"CFLAGS   = -v -native -xarch=native -fast" \
	"LFLAGS = -lm"
	
solaris-64:
	$(MAKE) all \
	"CC  = cc" \
	"CFLAGS   = -v -xarch=native64 -fast -native" \
	"LFLAGS = -lm"


IONBINS = ionize 
IONOBJS = ionize.o util.o threads.o energythr.o

all: $(IONBINS)

.c.o:
	$(CC) $(CFLAGS) -c $<

ionize: $(IONOBJS)
	$(CC) $(CFLAGS) $(IONOBJS) -o $@@ $(LFLAGS)
	$(HACKICCBINARY) $@@

test: 
	./ionize -n 4 -b 10 -r 3.0 -i 1.0 -g 0.5 -p 24 ../testfiles/helix.pdb testoutput.pdb
	@@echo "Comparing test output with known-correct run results..."
	diff testoutput.pdb ../testfiles/output.pdb.test

test-runionize:
	../scripts/runionize.pl ../testfiles/runionize.conf
	@@echo "Comparing test output with known-correct run results..."
	diff testoutput-runionize.pdb ../testfiles/output.pdb.test

clean:
	rm -f $(IONBINS) $(IONOBJS) ./*~ *.s testoutput*.pdb

@


1.6
log
@added perl script test
@
text
@d110 1
a110 1
	"HACKICCBINARY = icchack/intel_check_executable_patch" \
d117 1
a117 1
	"HACKICCBINARY = icchack/intel_check_executable_patch" \
d124 1
a124 1
	"HACKICCBINARY = icchack/intel_check_executable_patch" \
@


1.5
log
@updated test target
@
text
@d157 5
d163 1
a163 1
	rm -f $(IONBINS) $(IONOBJS) ./*~ *.s testoutput.pdb
@


1.4
log
@small test case
@
text
@d153 1
a153 1
	./ionize -n 4 -b 10 -r 3.0 -i 1.0 -g 0.5 -p 24 ./testfiles/helix.pdb testoutput.pdb
d155 1
a155 1
	diff testouput.pdb ../testfiles/output.pdb.test
@


1.3
log
@updated test target
@
text
@d153 1
a153 1
	./ionize -n 48 -b 5 -r 6.5 -i 0 -g 1 -p 24 ../testfiles/lac_w_dna_charges_orient.pdb testoutput.pdb
@


1.2
log
@added more platforms
@
text
@d4 5
d140 2
a141 2
SODBINS = ionize 
SODOBJS = ionize.o util.o threads.o energythr.o
d143 1
a143 1
all: $(SODBINS)
a144 3
test:
	./ionize -n 48 -b 5 -r 6.5 -i 0 -g 1 -p 24 ./test/lac_w_dna_charges_orient.pdb output.pdb

d148 2
a149 4
#	$(CC) $(CFLAGS) -S $<

ionize: $(SODOBJS)
	$(CC) $(CFLAGS) $(SODOBJS) -o $@@ $(LFLAGS)
d152 5
d158 1
a158 1
	rm -f $(SODBINS) $(SODOBJS) ./*~ *.s
@


1.1
log
@Initial revision
@
text
@d1 4
a4 2

HACKBINARY = touch
d9 16
a24 10
	@@echo "  linux-gcc"
	@@echo "  linux-gcc-"
	@@echo "  linux-gcc-amd"
	@@echo "  linux-gcc-amd2"
	@@echo "  linux-gcc-debug"
	@@echo "  linux-ia64-thr   (NCSA Altix)"
	@@echo "  linux-icc"
	@@echo "  linux-icc-thr"
	@@echo "  linux-icc-sse2"
	@@echo "  linux-icc-sse3"
d28 25
d80 1
a80 1
	"CFLAGS   = -Wall -m32 -g " \
d105 1
a105 1
	"HACKBINARY = icchack/intel_check_executable_patch" \
d112 1
a112 1
	"HACKBINARY = icchack/intel_check_executable_patch" \
d119 1
a119 1
	"HACKBINARY = icchack/intel_check_executable_patch" \
d128 1
a128 1
solaris.64:
d150 1
a150 1
	$(HACKBINARY) $@@
@
