From 620ae30f0c4b10cd11ffcd6f6638b377ef7b6cd4 Mon Sep 17 00:00:00 2001 From: Dimitri Komatitsch Date: Fri, 6 Apr 2018 18:40:34 +0200 Subject: [PATCH] removed external_libs/scotch_5.1.12b/examples --- .../examples/scotch_example_1.f | 130 ---------------- .../examples/scotch_example_2.f90 | 143 ------------------ 2 files changed, 273 deletions(-) delete mode 100644 external_libs/scotch_5.1.12b/examples/scotch_example_1.f delete mode 100644 external_libs/scotch_5.1.12b/examples/scotch_example_2.f90 diff --git a/external_libs/scotch_5.1.12b/examples/scotch_example_1.f b/external_libs/scotch_5.1.12b/examples/scotch_example_1.f deleted file mode 100644 index 5f636c28e..000000000 --- a/external_libs/scotch_5.1.12b/examples/scotch_example_1.f +++ /dev/null @@ -1,130 +0,0 @@ -************************************************************ -** ** -** NAME : scotch_example_1.f ** -** ** -** AUTHOR : Francois PELLEGRINI ** -** ** -** FUNCTION : FORTRAN testbed for the LibSCOTCH ** -** library routines. ** -** ** -** DATES : # Version 3.4 : from : 04 feb 2000 ** -** to 07 feb 2000 ** -** # Version 4.0 : from : 13 mar 2005 ** -** to 13 mar 2005 ** -** # Version 5.1 : from : 24 jul 2010 ** -** to 24 jul 2010 ** -** ** -** NOTES : # This program is to be compiled with ** -** the 32-bit version of the libScotch. ** -** It can be deduced from the fact that ** -** indices to be returned by the ** -** SCOTCHFGRAPHDATA routine are plain ** -** "integer" and not "integer*8". ** -** ** -*234567***************************************************** - - PROGRAM SCOTCH_TEST - IMPLICIT NONE - INCLUDE "scotchf.h" - DOUBLEPRECISION SCOTCHGRAPH (SCOTCH_GRAPHDIM) - INTEGER VERTNBR - DATA VERTNBR / 3 / - INTEGER EDGENBR - DATA EDGENBR / 4 / - INTEGER VERTTAB (4) - DATA VERTTAB / 1, 2, 4, 5 / - INTEGER EDGETAB (4) - DATA EDGETAB / 2, 1, 3, 2 / - INTEGER INDXTAB (1) - INTEGER IDXVERTNBR - INTEGER IDXVERTTABIDX, IDXVENDTABIDX - INTEGER IDXVELOTABIDX, IDXVLBLTABIDX - INTEGER IDXEDGENBR - INTEGER IDXEDGETABIDX, IDXEDLOTABIDX - INTEGER IDXBASEVAL, IDXFLAGVAL - INTEGER IERR - - PRINT *, 'Starting' - - CALL SCOTCHFGRAPHINIT (SCOTCHGRAPH (1), IERR) - IF (IERR .NE. 0) THEN - PRINT *, 'ERROR : MAIN : Cannot initialize graph' - STOP - ENDIF - - CALL SCOTCHFGRAPHBUILD (SCOTCHGRAPH (1), 1, VERTNBR, - * VERTTAB (1), VERTTAB (2), - * VERTTAB (1), VERTTAB (1), - * EDGENBR, - * EDGETAB (1), EDGETAB (1), IERR) - IF (IERR .NE. 0) THEN - PRINT *, 'ERROR : MAIN : Cannot build graph' - STOP - ENDIF - - CALL SCOTCHFGRAPHCHECK (SCOTCHGRAPH (1), IERR) - IF (IERR .NE. 0) THEN - PRINT *, 'ERROR : MAIN : Invalid check' - STOP - ENDIF - - PRINT *, 'Outputing original graph' - - CALL SCOTCHFGRAPHSAVE (SCOTCHGRAPH (1), 1, IERR) - IF (IERR .NE. 0) THEN - PRINT *, 'ERROR : MAIN : Invalid graph output' - STOP - ENDIF - - CALL SCOTCHFGRAPHDATA (SCOTCHGRAPH (1), INDXTAB (1), - * IDXBASEVAL, IDXVERTNBR, - * IDXVERTTABIDX, IDXVENDTABIDX, - * IDXVELOTABIDX, IDXVLBLTABIDX, - * IDXEDGENBR, - * IDXEDGETABIDX, IDXEDLOTABIDX, - * IDXFLAGVAL, IERR); - IF (IERR .NE. 0) THEN - PRINT *, 'ERROR : MAIN : Cannot get graph data' - STOP - ENDIF - - PRINT *, 'Number of vertices : ', IDXVERTNBR - PRINT *, 'Index of verttab : ', IDXVERTTABIDX - PRINT *, 'Index of vendtab : ', IDXVENDTABIDX - PRINT *, 'Index of velotab : ', IDXVELOTABIDX - PRINT *, 'Index of vlbltab : ', IDXVLBLTABIDX - PRINT *, 'Number of edges : ', IDXEDGENBR - PRINT *, 'Index of edgetab : ', IDXEDGETABIDX - PRINT *, 'Index of edlotab : ', IDXEDLOTABIDX - - PRINT *, 'Updating vertex and edge arrays' - INDXTAB (IDXVERTTABIDX + 1) = 3 - INDXTAB (IDXEDGETABIDX) = 2 - INDXTAB (IDXEDGETABIDX + 1) = 3 - INDXTAB (IDXEDGETABIDX + 2) = 1 - INDXTAB (IDXEDGETABIDX + 3) = 1 - - PRINT *, 'Outputting updated graph' - - CALL SCOTCHFGRAPHCHECK (SCOTCHGRAPH (1), IERR) - IF (IERR .NE. 0) THEN - PRINT *, 'ERROR : MAIN : Invalid check' - STOP - ENDIF - - CALL SCOTCHFGRAPHSAVE (SCOTCHGRAPH (1), 1, IERR) - IF (IERR .NE. 0) THEN - PRINT *, 'ERROR : MAIN : Invalid graph output' - STOP - ENDIF - - CALL SCOTCHFGRAPHEXIT (SCOTCHGRAPH (1), IERR) - IF (IERR .NE. 0) THEN - PRINT *, 'ERROR : MAIN : Cannot destroy graph' - STOP - ENDIF - - PRINT *, 'Test complete' - - RETURN - END diff --git a/external_libs/scotch_5.1.12b/examples/scotch_example_2.f90 b/external_libs/scotch_5.1.12b/examples/scotch_example_2.f90 deleted file mode 100644 index 672dc075d..000000000 --- a/external_libs/scotch_5.1.12b/examples/scotch_example_2.f90 +++ /dev/null @@ -1,143 +0,0 @@ -!*********************************************************** -!* ** -!* NAME : scotch_example_2.f90 ** -!* ** -!* AUTHOR : Francois PELLEGRINI ** -!* Frederic COUDERC ** -!* ** -!* function : Fortran testbed for the LibSCOTCH ** -!* library routines. ** -!* ** -!* DATES : # Version 5.1 : from : 24 jul 2010 ** -!* to 24 jul 2010 ** -!* ** -!* NOTES : # This program is to be compiled with ** -!* the 64-bit version of the libScotch. ** -!* It can be deduced from the fact that ** -!* SCOTCH_Num values are declared as ** -!* "integer*8" quantities. ** -!* ** -!* # To be compiled with : gfortran ** -!* scotch_example_2.f90 ** -!* -L/scotch/lib/path/ -lscotch ** -!* -lscotcherr -lz -lpthread ** -!* ** -!234567***************************************************** - -PROGRAM Scotch_test - -! USE IFPOSIX - - implicit none - - include "scotchf.h" - - real*8, dimension(Scotch_graphdim) :: Scotchgraph - real*8, dimension(Scotch_stratdim) :: Scotchstrat - - integer :: ierr, file_u - integer*8 :: nnt, nelt, i, j, k - integer*8 :: base, flag, nparts - - integer*8, dimension(2) :: indxtab - - integer*8 :: baseval, vertnbr, vertidx, vendidx, veloidx - integer*8 :: vlblidx, edgenbr, edgeidx, edloidx - - real*8, dimension(:,:), allocatable :: coordinates - real*8, dimension(:,:), allocatable :: connectivity - real*8, dimension(:,:), allocatable :: neighbors - - integer*8, dimension(:), allocatable :: part - - write(6,*) 'Starting' - - call ScotchFstratInit ( Scotchstrat(1), ierr ) - if (ierr /= 0) then - write(6,*) 'Scotch error : cannot initialize graph' - STOP - endif - - call ScotchFgraphInit ( Scotchgraph(1), ierr ) - if (ierr /= 0) then - write(6,*) 'Scotch error : cannot initialize strat' - STOP - endif - - open(10,iostat=ierr,file="bump.grf") - -! call PXFFILENO (10, file_u, ierr) - file_u = FNUM (10) - - base = 1 - flag = 0 - call ScotchFgraphLoad ( Scotchgraph(1), file_u, base, flag, ierr ) - if (ierr /= 0) then - write(6,*) 'Scotch error : cannot load graph' - STOP - endif - - close(10) - - call ScotchFgraphData ( Scotchgraph(1), indxtab(1), baseval, & - vertnbr, vertidx, vendidx, veloidx, vlblidx, edgenbr, & - edgeidx, edloidx ) - - write(6,*) baseval, vertnbr, vertidx, vendidx, veloidx, vlblidx, & - edgenbr, edgeidx, edloidx - - write(6,*) indxtab(vertidx) - write(6,*) indxtab(vendidx) - write(6,*) indxtab(veloidx) - write(6,*) indxtab(vlblidx) - write(6,*) indxtab(edgeidx) - write(6,*) indxtab(edloidx) - - call ScotchFgraphCheck ( Scotchgraph(1), ierr ) - if (ierr /= 0) then - write(6,*) 'ERROR Scotch : Invalid check' - STOP - endif - - open (10,iostat=ierr,file="test.grf") - -! call PXFFILENO (10, file_u, ierr) - file_u = FNUM (10) - - call ScotchFgraphSave ( Scotchgraph(1), file_u, ierr ) - if (ierr /= 0) then - write(6,*) 'ERROR Scotch : Invalid save ' - STOP - endif - - close(10) - - nparts = 8 - call ScotchFstratGraphMapChoose ( Scotchstrat(1), & - SCOTCH_STRATQUALITY, nparts, 0.01, ierr ) - if (ierr /= 0) then - write(6,*) 'ERROR Scotch : Cannot initialize partitioning& - &strategy' - STOP - endif - - allocate(part(1:vertnbr + 1)) - - call ScotchFgraphPart ( Scotchgraph(1), nparts, Scotchstrat(1), & - part(1), ierr ) - if (ierr /= 0) then - write(6,*) 'ERROR Scotch : Cannot partition graph' - STOP - endif - - do i=1,vertnbr + 1 - write(10,*) i,part(i) - enddo - - call ScotchFgraphExit ( Scotchgraph(1) ) - - call ScotchFstratExit ( Scotchstrat(1) ) - - write(6,*) 'Complete' - -END PROGRAM Scotch_test