sync with new version of MDI library
This commit is contained in:
@ -286,46 +286,22 @@ while iarg < narg:
|
|||||||
|
|
||||||
if not mdiarg: error()
|
if not mdiarg: error()
|
||||||
|
|
||||||
|
mdi.MDI_Init(mdiarg)
|
||||||
|
|
||||||
# LAMMPS engine is a stand-alone code
|
# LAMMPS engine is a stand-alone code
|
||||||
# world = MPI communicator for just this driver
|
# world = MPI communicator for just this driver
|
||||||
# invoke perform_tasks() directly
|
# invoke perform_tasks() directly
|
||||||
|
|
||||||
#if not plugin:
|
if not plugin:
|
||||||
# mdi.MDI_Init(mdiarg)
|
world = mdi.MDI_MPI_get_world_comm()
|
||||||
# world = mdi.MDI_MPI_get_world_comm()
|
mdicomm = mdi.MDI_Accept_Communicator()
|
||||||
|
perform_tasks(world,mdicomm,None)
|
||||||
# connect to engine
|
|
||||||
|
|
||||||
# mdicomm = mdi.MDI_Accept_Communicator()
|
|
||||||
|
|
||||||
# perform_tasks(world,mdicomm,None)
|
|
||||||
|
|
||||||
# LAMMPS engine is a plugin library
|
# LAMMPS engine is a plugin library
|
||||||
# launch plugin
|
# launch plugin
|
||||||
# MDI will call back to perform_tasks()
|
# MDI will call back to perform_tasks()
|
||||||
|
|
||||||
#if plugin:
|
if plugin:
|
||||||
# mdi.MDI_Init(mdiarg)
|
|
||||||
# world = MPI.COMM_WORLD
|
|
||||||
# plugin_args += " -mdi \"-role ENGINE -name lammps -method LINK\""
|
|
||||||
# mdi.MDI_Launch_plugin(plugin,plugin_args,world,perform_tasks,None)
|
|
||||||
|
|
||||||
|
|
||||||
# new code to auto-detect whether engine is stand-alone code or plugin library
|
|
||||||
|
|
||||||
mdi.MDI_Init(mdiarg)
|
|
||||||
mdicomm = mdi.MDI_Get_communicator(0)
|
|
||||||
|
|
||||||
if mdicomm == mdi.MDI_COMM_NULL:
|
|
||||||
world = mdi.MDI_MPI_get_world_comm()
|
|
||||||
mdicomm = mdi.MDI_Accept_Communicator()
|
|
||||||
if mdicomm == mdi.MDI_COMM_NULL:
|
|
||||||
error("MDI unable to connect to stand-alone engine")
|
|
||||||
perform_tasks(world,mdicomm,None)
|
|
||||||
else:
|
|
||||||
world = MPI.COMM_WORLD
|
world = MPI.COMM_WORLD
|
||||||
method = mdi.MDI_Get_method(mdicomm)
|
|
||||||
if method != mdi.MDI_PLUGIN:
|
|
||||||
error("MDI internal error for plugin engine")
|
|
||||||
plugin_args += " -mdi \"-role ENGINE -name lammps -method LINK\""
|
plugin_args += " -mdi \"-role ENGINE -name lammps -method LINK\""
|
||||||
mdi.MDI_Launch_plugin(plugin,plugin_args,world,perform_tasks,None)
|
mdi.MDI_Launch_plugin(plugin,plugin_args,world,perform_tasks,None)
|
||||||
|
|||||||
@ -34,7 +34,7 @@ make lib-meam args="-m ifort" # build MEAM lib with custom Makefile.ifort (usi
|
|||||||
|
|
||||||
# settings
|
# settings
|
||||||
|
|
||||||
version = "1.3.1"
|
version = "1.3.2"
|
||||||
url = "https://github.com/MolSSI-MDI/MDI_Library/archive/v%s.tar.gz" % version
|
url = "https://github.com/MolSSI-MDI/MDI_Library/archive/v%s.tar.gz" % version
|
||||||
|
|
||||||
# known checksums for different MDI versions. used to validate the download.
|
# known checksums for different MDI versions. used to validate the download.
|
||||||
|
|||||||
Reference in New Issue
Block a user