updated to support ScaFaCoS 1.0.1
This commit is contained in:
@ -360,8 +360,8 @@ if(PKG_USER-SCAFACOS)
|
||||
if(DOWNLOAD_SCAFACOS)
|
||||
include(ExternalProject)
|
||||
ExternalProject_Add(scafacos_build
|
||||
URL https://github.com/scafacos/scafacos/releases/download/v1.0.0/scafacos-1.0.0.tar.gz
|
||||
URL_MD5 c75d75d8a4cb9757faddb8b205a2b20f
|
||||
URL https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz
|
||||
URL_MD5 bd46d74e3296bd8a444d731bb10c1738
|
||||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
|
||||
--disable-doc
|
||||
--enable-fcs-solvers=fmm,p2nfft,direct,ewald,p3m
|
||||
@ -389,6 +389,7 @@ if(PKG_USER-SCAFACOS)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_near.a)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_gridsort.a)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_resort.a)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_redist.a)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_common.a)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_pnfft.a)
|
||||
list(APPEND LAMMPS_LINK_LIBS ${SCAFACOS_BUILD_DIR}/lib/libfcs_pfft.a)
|
||||
|
||||
@ -29,8 +29,8 @@ make lib-scafacos args="-p $HOME/scafacos" # use existing Scafacos installation
|
||||
|
||||
# settings
|
||||
|
||||
version = "scafacos-1.0.0"
|
||||
url = "https://github.com/scafacos/scafacos/releases/download/v1.0.0/scafacos-1.0.0.tar.gz"
|
||||
version = "scafacos-1.0.1"
|
||||
url = "https://github.com/scafacos/scafacos/releases/download/v1.0.1/scafacos-1.0.1.tar.gz"
|
||||
#url = "https://gigamove.rz.rwth-aachen.de/d/id/CTzyApN76MXMJ6/dd/100" % version
|
||||
|
||||
# print error message or help
|
||||
@ -147,7 +147,7 @@ if buildflag:
|
||||
|
||||
if buildflag:
|
||||
print("Building Scafacos ...")
|
||||
cmd = 'cd "%s"; CC=mpicc FC=mpif90 CXX=mpicxx ./configure --prefix="`pwd`/build" --disable-doc --enable-fcs-solvers=fmm,p2nfft,direct,ewald > log.txt; make -j; make install' % homedir
|
||||
cmd = 'cd "%s"; ./configure --prefix="`pwd`/build" --disable-doc --enable-fcs-solvers=fmm,p2nfft,direct,ewald,p3m --with-internal-fftw --with-internal-pfft --with-internal-pnfft CC=mpicc FC=mpif90 CXX=mpicxx F77= > log.txt; make -j; make install' % homedir
|
||||
txt = subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True)
|
||||
print(txt.decode('UTF-8'))
|
||||
|
||||
|
||||
@ -150,6 +150,17 @@ void Scafacos::init()
|
||||
fcs_fmm_set_internal_tuning(fcs,FCS_FMM_HOMOGENOUS_SYSTEM);
|
||||
}
|
||||
|
||||
// for the FMM at least one particle is required per process
|
||||
if (strcmp(method,"fmm") == 0)
|
||||
{
|
||||
int empty = (nlocal==0)?1:0;
|
||||
MPI_Allreduce(MPI_IN_PLACE,&empty,1,MPI_INT,MPI_SUM,world);
|
||||
if (empty > 0)
|
||||
fcs_set_redistribute(fcs,1);
|
||||
else
|
||||
fcs_set_redistribute(fcs,0);
|
||||
}
|
||||
|
||||
result = fcs_tune(fcs,nlocal,&x[0][0],q);
|
||||
check_result(result);
|
||||
// more useful here, since the parameters should be tuned now
|
||||
@ -172,6 +183,17 @@ void Scafacos::compute(int eflag, int vflag)
|
||||
|
||||
const double qscale = qqrd2e;
|
||||
|
||||
// for the FMM at least one particle is required per process
|
||||
if (strcmp(method,"fmm"))
|
||||
{
|
||||
int empty = (nlocal==0)?1:0;
|
||||
MPI_Allreduce(MPI_IN_PLACE,&empty,1,MPI_INT,MPI_SUM,world);
|
||||
if (empty > 0)
|
||||
fcs_set_redistribute(fcs,1);
|
||||
else
|
||||
fcs_set_redistribute(fcs,0);
|
||||
}
|
||||
|
||||
if (eflag || vflag) ev_setup(eflag,vflag);
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user