Skip to content

Commit

Permalink
6.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pelegrin committed Mar 14, 2015
1 parent 44ebaa1 commit 147b2de
Show file tree
Hide file tree
Showing 123 changed files with 2,115 additions and 1,009 deletions.
8 changes: 5 additions & 3 deletions INSTALL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,11 @@ serve as non-regression checks for both sequential and parallel
features of Scotch and PT-Scotch. They can be launched by typing "make
check" and/or "make ptcheck" in the "src/" directory.

In the case of "ptcheck", programs will be run in debug mode; user
action is required (by typing ENTER whenever necessary) for launching
the parallel programs.
In the case of "ptcheck", programs can be run in debug mode, by
compiling with the "-DSCOTCH_CHECK_NOAUTO" flag set. In this case,
process numbers are printed, so that users can attach a debugger
to a given (set of) process(es), and user action is required for
launching the parallel programs, by typing ENTER whenever necessary.

One might look at these programs for examples of how to use the Scotch
and PT-Scotch libraries. However, some of these programs test internal
Expand Down
Binary file modified doc/ptscotch_user6.0.pdf
Binary file not shown.
Binary file modified doc/ptscotch_user6.0.ps.gz
Binary file not shown.
Binary file modified doc/scotch_user6.0.pdf
Binary file not shown.
Binary file modified doc/scotch_user6.0.ps.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

VERSION = 6
RELEASE = 0
PATCHLEVEL = 3
PATCHLEVEL = 4

.PHONY : clean default install ptscotch realclean required scotch

Expand Down
84 changes: 67 additions & 17 deletions src/check/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright 2011,2012,2014 IPB, Universite de Bordeaux, INRIA & CNRS
## Copyright 2011,2012,2014,2015 IPB, Universite de Bordeaux, INRIA & CNRS
##
## This file is part of the Scotch software package for static mapping,
## graph partitioning and sparse matrix ordering.
Expand Down Expand Up @@ -40,6 +40,7 @@ LIBSCOTCH = -lscotch -lscotcherrexit
DEPPTSCOTCH = $(SCOTCHLIBDIR)/libptscotch$(LIB)
DEPSCOTCH = $(SCOTCHLIBDIR)/libscotch$(LIB)

EXECS =
EXECP = mpirun -n 4

##
Expand Down Expand Up @@ -71,9 +72,13 @@ clean :

realclean : clean
-$(RM) \
test_common_random \
test_common_thread \
test_scotch_graph_coarsen \
test_scotch_graph_coarsen_build \
test_scotch_graph_color \
test_scotch_graph_map \
test_scotch_graph_map_copy \
test_scotch_graph_order \
test_scotch_graph_part_ovl \
test_scotch_dgraph_band \
Expand All @@ -88,12 +93,17 @@ realclean : clean
## Test cases dependencies.
##

CHECKSCOTCH = check_common_thread \
CHECKSCOTCH = check_common_random \
check_common_thread \
check_strat_seq \
check_graph_color \
check_graph_map \
check_graph_order \
check_graph_part_ovl \
check_scotch_graph_coarsen \
check_scotch_graph_coarsen_build \
check_scotch_graph_color \
check_scotch_graph_map \
check_scotch_graph_map_copy \
check_scotch_graph_order \
check_scotch_graph_part_ovl \
check_prog_gord \
check_prog_gpart_remap

CHECKPTSCOTCH = check_strat_par \
Expand All @@ -107,6 +117,23 @@ CHECKPTSCOTCH = check_strat_par \
## Todo list.
##

check_common_random : test_common_random
$(EXECS) ./test_common_random /tmp/rand.dat 0
$(EXECS) ./test_common_random /tmp/rand.dat 1

test_common_random : test_common_random.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##

check_common_thread : test_common_thread
$(EXECS) ./test_common_thread

test_common_thread : test_common_thread.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##

check_dgraph_fold_comm : test_dgraph_fold_comm
$(EXECS) ./test_dgraph_fold_comm data/dgraph_fold_comm_1.txt

Expand All @@ -121,52 +148,75 @@ test_scotch_dgraph_redist : test_scotch_dgraph_redist.c

##

check_prog_gord :
$(EXECS) $(SCOTCHBINDIR)/gord data/bump.grf /dev/null -vt
$(EXECS) $(SCOTCHBINDIR)/gord data/bump_b1.grf /dev/null -vt

##

check_prog_gpart_remap :
$(EXECS) $(SCOTCHBINDIR)/gpart 32 data/bump_imbal_32.grf /dev/null -rodata/bump_old.map -vmt

##

check_common_thread : test_common_thread
$(EXECS) ./test_common_thread
check_scotch_graph_coarsen : test_scotch_graph_coarsen
$(EXECS) ./test_scotch_graph_coarsen data/bump_b1.grf

test_common_thread : test_common_thread.c \
test_scotch_graph_coarsen : test_scotch_graph_coarsen.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##

check_scotch_graph_coarsen_build : test_scotch_graph_coarsen_build
$(EXECS) ./test_scotch_graph_coarsen_build data/bump.grf
$(EXECS) ./test_scotch_graph_coarsen_build data/bump_b1.grf

test_scotch_graph_coarsen_build : test_scotch_graph_coarsen_build.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##

check_graph_color : test_scotch_graph_color
check_scotch_graph_color : test_scotch_graph_color
$(EXECS) ./test_scotch_graph_color data/bump.grf

test_graph_color : test_scotch_graph_color.c \
test_scotch_graph_color : test_scotch_graph_color.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##

check_graph_map : test_scotch_graph_map
check_scotch_graph_map : test_scotch_graph_map
$(EXECS) ./test_scotch_graph_map data/m4x4.grf
$(EXECS) ./test_scotch_graph_map data/m4x4_b1.grf
$(EXECS) ./test_scotch_graph_map data/m16x16.grf
$(EXECS) ./test_scotch_graph_map data/m16x16_b1.grf

test_graph_map : test_scotch_graph_map.c \
test_scotch_graph_map : test_scotch_graph_map.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##

check_scotch_graph_map_copy : test_scotch_graph_map_copy
$(EXECS) ./test_scotch_graph_map_copy data/bump_b1.grf

test_scotch_graph_map_copy : test_scotch_graph_map_copy.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##

check_graph_order : test_scotch_graph_order
check_scotch_graph_order : test_scotch_graph_order
$(EXECS) ./test_scotch_graph_order data/bump.grf
$(EXECS) ./test_scotch_graph_order data/bump_b1.grf

test_graph_order : test_scotch_graph_order.c \
test_scotch_graph_order : test_scotch_graph_order.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##

check_graph_part_ovl : test_scotch_graph_part_ovl
check_scotch_graph_part_ovl : test_scotch_graph_part_ovl
$(EXECS) ./test_scotch_graph_part_ovl 4 data/m16x16.grf /dev/null
$(EXECS) ./test_scotch_graph_part_ovl 4 data/m16x16_b1.grf /dev/null

test_graph_part_ovl : test_scotch_graph_part_ovl.c \
test_scotch_graph_part_ovl : test_scotch_graph_part_ovl.c \
$(SCOTCHLIBDIR)/libscotch$(LIB)

##
Expand Down
156 changes: 156 additions & 0 deletions src/check/test_common_random.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
/* Copyright 2012,2014 IPB, Universite de Bordeaux, INRIA & CNRS
**
** This file is part of the Scotch software package for static mapping,
** graph partitioning and sparse matrix ordering.
**
** This software is governed by the CeCILL-C license under French law
** and abiding by the rules of distribution of free software. You can
** use, modify and/or redistribute the software under the terms of the
** CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
** URL: "http://www.cecill.info".
**
** As a counterpart to the access to the source code and rights to copy,
** modify and redistribute granted by the license, users are provided
** only with a limited warranty and the software's author, the holder of
** the economic rights, and the successive licensors have only limited
** liability.
**
** In this respect, the user's attention is drawn to the risks associated
** with loading, using, modifying and/or developing or reproducing the
** software by the user in light of its specific status of free software,
** that may mean that it is complicated to manipulate, and that also
** therefore means that it is reserved for developers and experienced
** professionals having in-depth computer knowledge. Users are therefore
** encouraged to load and test the software's suitability as regards
** their requirements in conditions enabling the security of their
** systems and/or data to be ensured and, more generally, to use and
** operate it in the same conditions as regards security.
**
** The fact that you are presently reading this means that you have had
** knowledge of the CeCILL-C license and that you accept its terms.
*/
/************************************************************/
/** **/
/** NAME : test_common_thread.c **/
/** **/
/** AUTHOR : Francois PELLEGRINI **/
/** **/
/** FUNCTION : This module tests the sequential **/
/** strategy building routines. **/
/** **/
/** DATES : # Version 6.0 : from : 01 oct 2014 **/
/** to 16 oct 2014 **/
/** **/
/************************************************************/

/*
** The defines and includes.
*/

#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif /* _XOPEN_SOURCE */
#ifndef __USE_XOPEN2K
#define __USE_XOPEN2K /* For POSIX pthread_barrier_t */
#endif /* __USE_XOPEN2K */

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

#include "../libscotch/module.h"
#include "../libscotch/common.h"

#define RANDNBR 100

/*********************/
/* */
/* The main routine. */
/* */
/*********************/

int
main (
int argc,
char * argv[])
{
INT * randtab;
int randnbr;
int randnum;
struct stat statdat;
FILE * fileptr;
int passnum;

if (argc != 3) {
errorPrint ("usage: %s file passnum", argv[0]);
return (1);
}

if ((randtab = malloc (RANDNBR * sizeof (INT))) == NULL) {
errorPrint ("main: out of memory");
return (1);
}

intRandInit (); /* Initialize random generator */

for (randnum = 0; randnum < RANDNBR; randnum ++)
randtab[randnum] = intRandVal (INTVALMAX);

intRandReset ();

passnum = (atoi (argv[2]) == 0); /* First pass to write file; second pass to read it */

if ((fileptr = fopen (argv[1], (passnum) ? "w+" : "r")) == NULL) {
errorPrint ("main: cannot open file");
return (1);
}

if (passnum) { /* If first pass */
for (randnum = 0; randnum < RANDNBR; randnum ++) {
if (randtab[randnum] != intRandVal (INTVALMAX)) {
errorPrint ("main: cannot replay random sequence");
return (1);
}
}

if (fwrite (randtab, sizeof (INT), RANDNBR, fileptr) < RANDNBR) {
errorPrint ("main: cannot write to file");
return (1);
}

sleep (1); /* Next run will not get the same time() value */
}
else { /* Second pass */
const char * const bufftab = "";
char * charptr;
int o;

if (fread (randtab, sizeof (INT), RANDNBR, fileptr) < RANDNBR) {
errorPrint ("main: cannot read from file");
return (1);
}

for (randnum = 0; randnum < RANDNBR; randnum ++) {
if (randtab[randnum] != intRandVal (INTVALMAX))
break;
}

o = (randnum == RANDNBR);
charptr = (o) ? "same" : "different";
#if ((defined COMMON_DEBUG) || (defined COMMON_RANDOM_FIXED_SEED) || (defined SCOTCH_DETERMINISTIC))
o ^= 1;
#endif /* ((defined COMMON_DEBUG) || (defined COMMON_RANDOM_FIXED_SEED) || (defined SCOTCH_DETERMINISTIC)) */

if (o) {
errorPrint ("main: two consecutive runs yield %s values.", charptr);
return (1);
}
printf ("Two consecutive runs yield %s values.\n", charptr);
}

fclose (fileptr);
free (randtab);

return (0);
}
8 changes: 4 additions & 4 deletions src/check/test_common_thread.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2012,2014 IPB, Universite de Bordeaux, INRIA & CNRS
/* Copyright 2012,2014,2015 IPB, Universite de Bordeaux, INRIA & CNRS
**
** This file is part of the Scotch software package for static mapping,
** graph partitioning and sparse matrix ordering.
Expand Down Expand Up @@ -39,7 +39,7 @@
/** strategy building routines. **/
/** **/
/** DATES : # Version 6.0 : from : 04 nov 2012 **/
/** to 23 sep 2014 **/
/** to 01 mar 2015 **/
/** **/
/************************************************************/

Expand Down Expand Up @@ -197,11 +197,11 @@ char * argv[])
errorPrint ("main: cannot launch or run threads");
return (1);
}

free (thrdtab);
#else /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */
printf ("Scotch not compiled with either COMMON_PTHREAD or SCOTCH_PTHREAD\n");
#endif /* ((defined COMMON_PTHREAD) || (defined SCOTCH_PTHREAD)) */

free (thrdtab);

return (0);
}
Loading

0 comments on commit 147b2de

Please sign in to comment.