Skip to content

Commit

Permalink
update to latest parRSB
Browse files Browse the repository at this point in the history
  • Loading branch information
stgeke committed Nov 9, 2022
1 parent 4989cec commit 165d946
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 19 deletions.
8 changes: 4 additions & 4 deletions 3rd_party/gslib/install
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
set -e

VER=1.0.7
VER=1.0.8

if [ "$1" == "clean" ]; then
rm -rf lib include 2>/dev/null
rm -rf lib include 2>/dev/null
find . -name '*.o' -exec rm {} +
find . -name '*.a' -exec rm {} +
find . -name '*.a' -exec rm {} +
exit 0
fi

Expand All @@ -16,7 +16,7 @@ fi

if [ ! -d ./gslib ]; then
wget --no-check-certificate -O v$VER.tar.gz http://github.com/gslib/gslib/archive/v$VER.tar.gz
mkdir gslib
mkdir gslib
tar -zxvf v$VER.tar.gz -C ./gslib --strip-components=1
fi

Expand Down
2 changes: 1 addition & 1 deletion 3rd_party/parRSB/install
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

VER=0.8
VER=0.9

if [ "$1" == "clean" ]; then
rm -rf parRSB/build lib include 2>/dev/null
Expand Down
4 changes: 2 additions & 2 deletions core/makenek.inc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ do
fi
if [ "$i" == "PARRSB" ]; then
PARRSB=1
PARRSB_OPT=" DESTDIR=.. UNDERSCORE=$UNDERSCORE MPI=$MPI BLAS=0"
PARRSB_OPT=" DESTDIR=${SOURCE_ROOT_PARRSB} UNDERSCORE=$UNDERSCORE MPI=$MPI BLAS=0"
PARRSB_OPT+=" GSLIBPATH=${SOURCE_ROOT_GSLIB}"
USR_LFLAGS+=" -L${SOURCE_ROOT_PARRSB}/lib -lparRSB"
PARRSB_INC="${SOURCE_ROOT_PARRSB}/include"
Expand Down Expand Up @@ -350,7 +350,7 @@ if [ $VENDOR_BLAS -ne 1 ]; then
fi

# gslib build options
GSLIB_OPT+=" DESTDIR=.."
GSLIB_OPT+=" DESTDIR=${SOURCE_ROOT_GSLIB}"
GSLIB_OPT+=" MPI=$MPI MPIIO=$MPIIO"
GSLIB_OPT+=" ADDUS=$UNDERSCORE USREXIT=0 BLAS=2"
GSLIB_IFLAGS=" -I$SOURCE_ROOT_GSLIB/include"
Expand Down
11 changes: 6 additions & 5 deletions core/map2.f
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,13 @@ subroutine get_vert_map(nlv)
if (ierr.ne.0) then
ifread_con = .false.
tol = connectivityTol
call find_con(wk,size(wk),tol,ierr)
call find_con(wk,nwk,tol,ierr)
if(ierr.ne.0) then
tol = tol / 10.0;
call find_con(wk,size(wk),tol,ierr)
call find_con(wk,nwk,tol,ierr)
endif
call err_chk(ierr,' find_con failed!$')
call err_chk(ierr,'Connectivity calculation failed! '//
& 'Try tightening mesh::connectivityTol$')
endif

c fluid elements
Expand Down Expand Up @@ -511,8 +512,8 @@ subroutine find_con(wk,nwk,tol,ierr)
enddo
enddo

call fparrsb_find_conn(vtx8,xyz,nelt,ndim,eid8,npf,tol,nekcomm,
$ 0,ierr)
call fparrsb_conn_mesh(vtx8,xyz,nelt,ndim,eid8,npf,tol,nekcomm,
$ ierr)

k=1
l=1
Expand Down
26 changes: 19 additions & 7 deletions core/partitioner.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,24 @@ void fpartMesh(long long *el, long long *vl, double *xyz, const int *lelt, int *

ierr = 1;
#if defined(PARRSB)
parrsb_options options = parrsb_default_options;

options.debug_level = 0;
if (*loglevel > 2)
options.debug_level = 1;
// General options
// partitioner: Partition algo: 0 - RSB, 1 - RCB, 2 - RIB (Default: 0)
// verbose_level: Verbose level: 0, 1, 2, .. etc (Default: 1)
// profile_level: Profile level: 0, 1, 2, .. etc (Default: 1)
// two_level: Use two level partitioning algo (Default: 0)
// repair: Repair disconnected components: 0 - No, 1 - Yes (Default: 0)
// RSB specific
// rsb_algo: RSB algo: 0 - Lanczos, 1 - RQI (Default: 0)
// rsb_pre: RSB pre-partition algo: 0 - None, 1 - RCB , 2 - RIB (Default: 1)
// rsb_max_iter: Maximum iterations in Lanczos or RQI (Default: 50)
// rsb_tol: Tolerance for Lanczos or RQI (Default: 1e-3)
// RSB-MG specific
// rsb_mg_grammian: MG Grammian: 0 or 1 (Default: 0)
// rsb_mg_factor: MG Coarsening factor (Default: 2, should be > 1)
// RSB-Lanczos specific
// rsb_lanczos_max_restarts: Maximum restarts in Lanczos (Default: 50)

parrsb_options options = parrsb_default_options;
if (partitioner & 1)
options.partitioner = 0;
else if (partitioner & 2)
Expand All @@ -357,7 +369,7 @@ void fpartMesh(long long *el, long long *vl, double *xyz, const int *lelt, int *
if (partitioner & 1)
options.rsb_algo = algo;

if(*loglevel >2)
if (*loglevel > 2)
printPartStat(vl, nel, nv, cext);

ierr = parrsb_part_mesh(part, seq, vl, xyz, nel, nv, options, comm.c);
Expand All @@ -368,7 +380,7 @@ void fpartMesh(long long *el, long long *vl, double *xyz, const int *lelt, int *
if (ierr != 0)
goto err;

if(*loglevel >2)
if (*loglevel > 2)
printPartStat(vl, nel, nv, cext);

#elif defined(PARMETIS)
Expand Down

0 comments on commit 165d946

Please sign in to comment.