#! /bin/sh /usr/share/dpatch/dpatch-run ## 20_preprocessor.dpatch by
## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. Index: itsol-1.0.0/CMakeLists.txt =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ itsol-1.0.0/CMakeLists.txt 2010-04-02 21:13:25.000000000 -0400 @@ -0,0 +1,75 @@ +cmake_minimum_required(VERSION 2.6) + +project (ITSOL) + + +set(STATIC_LIBRARY_FLAGS "-rcv") +set(CMAKE_Fortran_FLAGS " -c -g -ffixed-line-length-none -ffree-line-length-none") +#set(CMAKE_Fortran_FLAGS " -c -g -Wall -ffixed-line-length-none -ffree-line-length-none") + +enable_language(Fortran) + +#SET_TARGET_PROPERTIES( PROPERTIES LINKER_LANGUAGE CXX) + + +# Create a library called "itsol". +add_library (itsol + arms2.c + auxill.c + fgmr.c + iluk.c + ilut.c + vbiluk.c + vbilut.c + LIB/PQ.c + LIB/ilutpC.c + LIB/indsetC.c + LIB/MatOps.c + LIB/misc.c + LIB/piluNEW.c + LIB/PQ.c + LIB/setblks.c + LIB/sets.c + LIB/svdInvC.c + LIB/systimer.c + LIB/tools.f +) + +SET_TARGET_PROPERTIES(itsol PROPERTIES + LINKER_LANGUAGE CXX + SOVERSION 1 + VERSION 1.0.0 +) + +install(TARGETS itsol + RUNTIME DESTINATION bin COMPONENT RuntimeLibraries + LIBRARY DESTINATION lib COMPONENT RuntimeLibraries + ARCHIVE DESTINATION lib COMPONENT Development +) + +install(DIRECTORY TESTS_COO/MATRICES TESTS_COO/OUT + DESTINATION share/itsol/tests/TESTS_COO +) + +install(FILES TESTS_COO/inputs TESTS_COO/matfile_coo + DESTINATION share/itsol/tests/TESTS_COO/ +) + + + +install(DIRECTORY TESTS_HB/MATRICES TESTS_HB/OUT + DESTINATION share/itsol/tests/TESTS_HB +) + +install(FILES TESTS_HB/inputs TESTS_HB/matfile_hb + DESTINATION share/itsol/tests/TESTS_HB/ +) + + + +#add_library (itsol LIB/tools.f) +# ./LIB/indsetC.c ./LIB/sets.c ./LIB/tools.c ./LIB/systimer.c ./LIB/misc.c ./LIB/MatOps.c ./LIB/ilutpC.c ./LIB/setblks.c ./LIB/svdInvC.c) + + +add_subdirectory (TESTS_HB) +#add_subdirectory (TESTS_COO) Index: itsol-1.0.0/TESTS_COO/CMakeLists.txt =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ itsol-1.0.0/TESTS_COO/CMakeLists.txt 2010-04-02 21:13:25.000000000 -0400 @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 2.6) + + +set(CMAKE_Fortran_FLAGS " -c -g -Wall -ffixed-line-length-none -ffree-line-length-none") + + +# Make sure the linker can find the ITSOL library once it is built. +link_directories (${ITSOL_BINARY_DIR}/LIB) + + +add_executable (coo_iluk.exe mainILUKcoo.c) +add_executable (coo_arms.exe mainARMScoo.c) +add_executable (coo_ilut.exe mainILUTcoo.c) +add_executable (coo_vbiluk.exe mainVBILUKcoo.c) +add_executable (coo_vbilut.exe mainVBILUTcoo.c) + + +# Link the executable to the ITSOL library. +target_link_libraries (coo_iluk.exe itsol lapack blas m) +target_link_libraries (coo_arms.exe itsol lapack blas m) +target_link_libraries (coo_ilut.exe itsol lapack blas m) +target_link_libraries (coo_vbiluk.exe itsol lapack blas m) +target_link_libraries (coo_vbilut.exe itsol lapack blas m) + + +install(TARGETS coo_iluk.exe coo_arms.exe coo_ilut.exe coo_vbiluk.exe coo_vbilut.exe + DESTINATION share/itsol/tests/TESTS_COO +) Index: itsol-1.0.0/TESTS_HB/CMakeLists.txt =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ itsol-1.0.0/TESTS_HB/CMakeLists.txt 2010-04-02 21:21:04.000000000 -0400 @@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 2.6) + + +set(CMAKE_Fortran_FLAGS " -c -g -Wall -ffixed-line-length-none -ffree-line-length-none") + + +# Make sure the linker can find the ITSOL library once it is built. +link_directories (${ITSOL_BINARY_DIR}/LIB) + + +add_executable (hb_iluk.exe mainILUKhb.c) +add_executable (hb_arms.exe mainARMShb.c) +add_executable (hb_ilut.exe mainILUThb.c) +add_executable (hb_vbiluk.exe mainVBILUKhb.c) +add_executable (hb_vbilut.exe mainVBILUThb.c) + + +# Link the executable to the ITSOL library. +target_link_libraries (hb_iluk.exe itsol lapack blas gfortran m) +target_link_libraries (hb_arms.exe itsol lapack blas gfortran m) +target_link_libraries (hb_ilut.exe itsol lapack blas gfortran m) +target_link_libraries (hb_vbiluk.exe itsol lapack blas gfortran m) +target_link_libraries (hb_vbilut.exe itsol lapack blas gfortran m) + +install(TARGETS hb_iluk.exe hb_arms.exe hb_ilut.exe hb_vbiluk.exe hb_vbilut.exe + DESTINATION share/itsol/tests/TESTS_HB +) Index: itsol-1.0.0/TESTS_COO/makefile =================================================================== --- itsol-1.0.0.orig/TESTS_COO/makefile 2010-04-02 21:13:25.000000000 -0400 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,49 +0,0 @@ -# this makefile is for LINUX machines only -# - -LINKS = -L../ -litsol \ - -L/project/scicom/scicom00/SOFT/lib/Linux32 -llapack \ - -L/project/scicom/scicom00/SOFT/lib/linux32 -lblas - -##-L/project/scicom/scicom00/SOFT/lib/linux/linux32 -llapack_LINUX \ -## -L/project/scicom/scicom00/SOFT/lib/linux/linux32 -lblas_LINUX -# -FC = f77 -FCFLAGS = -c -g -Wall -CC = cc -CCFLAGS = -c -DLINUX -Wall -O3 -LD = f77 -LDFLAGS = -# -# clear list of default suffixes, and declare default suffixes -.SUFFIXES: -.SUFFIXES: .f .c .o -# default rule to make .o files from .f files -.f.o : ; $(FC) $(FCFLAGS) $*.f -o $*.o -.c.o : ; $(CC) $(CCFLAGS) $*.c -o $*.o -# - -#all: arms.ex iluk.ex ilut.ex iluc.ex vbiluk.ex vbilut.ex - -all: arms.ex iluk.ex ilut.ex vbiluk.ex vbilut.ex - -arms.ex: mainARMScoo.o - $(LD) $(LDFLAGS) mainARMScoo.o $(LINKS) -o arms.ex - -iluk.ex: mainILUKcoo.o - $(LD) $(LDFLAGS) mainILUKcoo.o $(LINKS) -o iluk.ex - -ilut.ex: mainILUTcoo.o - $(LD) $(LDFLAGS) mainILUTcoo.o $(LINKS) -o ilut.ex - -##iluc.ex: mainILUCcoo.o -## $(LD) $(LDFLAGS) mainILUCcoo.o $(LINKS) -o iluc.ex - -vbiluk.ex: mainVBILUKcoo.o - $(LD) $(LDFLAGS) mainVBILUKcoo.o $(LINKS) -o vbiluk.ex - -vbilut.ex: mainVBILUTcoo.o - $(LD) $(LDFLAGS) mainVBILUTcoo.o $(LINKS) -o vbilut.ex -# -clean : - rm -f *.o *.ex *~ core *.cache OUT/* Index: itsol-1.0.0/TESTS_HB/makefile =================================================================== --- itsol-1.0.0.orig/TESTS_HB/makefile 2010-04-02 21:13:25.000000000 -0400 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -# this makefile is for LINUX machines only -# - -LINKS = -L../ -litsol \ - -L/project/scicom/scicom00/SOFT/lib/Linux32 -llapack \ - -L/project/scicom/scicom00/SOFT/lib/linux32 -lblas - -# -FC = f77 -FCFLAGS = -c -g -Wall -CC = cc -CCFLAGS = -c -g -DLINUX -Wall -O3 -LD = f77 -LDFLAGS = -# -# clear list of default suffixes, and declare default suffixes -.SUFFIXES: -.SUFFIXES: .f .c .o -# default rule to make .o files from .f files -.f.o : ; $(FC) $(FCFLAGS) $*.f -o $*.o -.c.o : ; $(CC) $(CCFLAGS) $*.c -o $*.o -# - -#all: arms.ex iluk.ex ilut.ex iluc.ex vbiluk.ex vbilut.ex - -all: arms.ex iluk.ex ilut.ex vbiluk.ex vbilut.ex - -arms.ex: mainARMShb.o - $(LD) $(LDFLAGS) mainARMShb.o $(LINKS) -o arms.ex - -iluk.ex: mainILUKhb.o - $(LD) $(LDFLAGS) mainILUKhb.o $(LINKS) -o iluk.ex - -ilut.ex: mainILUThb.o - $(LD) $(LDFLAGS) mainILUThb.o $(LINKS) -o ilut.ex - -## iluc.ex: mainILUChb.o -## $(LD) $(LDFLAGS) mainILUChb.o $(LINKS) -o iluc.ex - -vbiluk.ex: mainVBILUKhb.o - $(LD) $(LDFLAGS) mainVBILUKhb.o $(LINKS) -o vbiluk.ex - -vbilut.ex: mainVBILUThb.o - $(LD) $(LDFLAGS) mainVBILUThb.o $(LINKS) -o vbilut.ex -# -clean : - rm -f *.o *.ex *~ core *.cache OUT/* \ No newline at end of file Index: itsol-1.0.0/makefile =================================================================== --- itsol-1.0.0.orig/makefile 2010-04-02 21:13:25.000000000 -0400 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,38 +0,0 @@ -# this makefile is for LINUX machines only -# ILUC removed.. -OBJ = fgmr.o iluk.o ilut.o arms2.o vbiluk.o vbilut.o auxill.o - -LIB = ./LIB/PQ.o ./LIB/piluNEW.o ./LIB/indsetC.o \ - ./LIB/sets.o ./LIB/tools.o ./LIB/systimer.o ./LIB/misc.o \ - ./LIB/MatOps.o ./LIB/ilutpC.o ./LIB/setblks.o ./LIB/svdInvC.o - -AR = ar -rcv - -# -FC = f77 -FCFLAGS = -c -g -Wall -CC = gcc -CCFLAGS = -c -g -DLINUX -Wall -O3 -LD = f77 -LDFLAGS = -# -# clear list of default suffixes, and declare default suffixes -.SUFFIXES: -.SUFFIXES: .f .c .o -# default rule to make .o files from .f files -.f.o : ; $(FC) $(FCFLAGS) $*.f -o $*.o -.c.o : ; $(CC) $(CCFLAGS) $*.c -o $*.o -# - -lib libitsol.a: $(OBJ) $(LIB) - $(AR) libitsol.a $(OBJ) $(LIB) -## ranlib libitsol.a - -# -clean : - rm -f ${OBJ} *.o *.ex *~ core *.cache ${LIB} LIB/*~ LIB/*.cache OUT/* - -cleanall : - rm -f ${OBJ} *.o *.ex *.a *.cache *~ core ${LIB} \ - LIB/*~ LIB/*.cache OUT/* TESTS_COO/*.o TESTS_COO/*.ex \ - TESTS_HB/*.o TESTS_HB/*.ex Index: itsol-1.0.0/LIB/PQ.c =================================================================== --- itsol-1.0.0.orig/LIB/PQ.c 2010-04-02 21:13:25.000000000 -0400 +++ itsol-1.0.0/LIB/PQ.c 2010-04-02 21:13:25.000000000 -0400 @@ -126,216 +126,6 @@ |-----end-of-indsetPQ-------------------------------------------------- |--------------------------------------------------------------------*/ -int add2is(int *last, int nod, int *iord, int *riord) -{ -/*---------------------------------------------------------------------- -| adds element nod to independent set -|---------------------------------------------------------------------*/ - (*last)++; - iord[nod] = *last; - riord[*last] = nod; - return 0; -} -/*--------------------------------------------------------------------- -|---- end of add2is --------------------------------------------------- -|--------------------------------------------------------------------*/ -int add2com(int *nback, int nod, int *iord, int *riord) -{ -/*---------------------------------------------------------------------- -| adds element nod to independent set -|---------------------------------------------------------------------*/ - iord[nod] = *nback; - riord[*nback] = nod; - (*nback)--; - return 0; -} -/*--------------------------------------------------------------------- -|---- end of add2com -------------------------------------------------- -|--------------------------------------------------------------------*/ -int indsetC(csptr mat, int bsize, int *iord, int *nnod, double tol) -{ -/*--------------------------------------------------------------------- -| greedy algorithm for independent set ordering -- -|---------------------------------------------------------------------- -| Input parameters: -| ----------------- -| (mat) = matrix in SpaFmt format -| -| bsize = integer (input) the target size of each block. -| each block is of size >= bsize. -| -| w = weight factors for the selection of the elements in the -| independent set. If w(i) is small i will be left for the -| vertex cover set. -| -| tol = a tolerance for excluding a row from independent set. -| -| Output parameters: -| ------------------ -| iord = permutation array corresponding to the independent set -| ordering. Row number i will become row number iord[i] in -| permuted matrix. -| -| nnod = (output) number of elements in the independent set. -| -|----------------------------------------------------------------------- -| the algorithm searches nodes in lexicographic order and groups -| the (BSIZE-1) nearest nodes of the current to form a block of -| size BSIZE. The current algorithm does not use values of the matrix. -|---------------------------------------------------------------------*/ -/* local variables */ - int nod, jcount, lastlev, begin, last0, last, nback, mid, - j1, j2, jcol, inod, jnod, j, k, jcount0, begin0, *rowj; - int prog, n=mat->n, *riord; - double *w; - csptr matT,gmat; - -/*-----------------------------------------------------------------------*/ - riord = (int *) Malloc(n*sizeof(int), "indsetC:1" ); - w = (double *) Malloc(n*sizeof(double), "indsetC:2" ); - matT = (csptr) Malloc(sizeof(SparMat), "indsetC:3" ); -/* call weights to compute the weights for input matrix.. */ - setupCS(matT, mat->n,1); - SparTran(mat, matT, 1, 0); - SparTran(matT, mat, 1, 1); - weightsC(mat, w); -/*---------------------------------------------------------------------- -| scan all nodes first to eliminate those not satisfying DD criterion -+----------------------------------------------------------------------*/ - nback = n-1; - nod = 0; - for(j=0; j