no need to use a deprecated argument in a newly added API
This commit is contained in:
@ -54,12 +54,11 @@ MODULE LIBLAMMPS
|
|||||||
|
|
||||||
! interface definitions for calling functions in library.cpp
|
! interface definitions for calling functions in library.cpp
|
||||||
INTERFACE
|
INTERFACE
|
||||||
FUNCTION lammps_open(argc,argv,comm,handle) &
|
FUNCTION lammps_open(argc,argv,comm) &
|
||||||
BIND(C, name='lammps_open_fortran')
|
BIND(C, name='lammps_open_fortran')
|
||||||
IMPORT :: c_ptr, c_int
|
IMPORT :: c_ptr, c_int
|
||||||
INTEGER(c_int), VALUE, INTENT(in) :: argc, comm
|
INTEGER(c_int), VALUE, INTENT(in) :: argc, comm
|
||||||
TYPE(c_ptr), DIMENSION(*), INTENT(in) :: argv
|
TYPE(c_ptr), DIMENSION(*), INTENT(in) :: argv
|
||||||
TYPE(c_ptr), INTENT(out) :: handle
|
|
||||||
TYPE(c_ptr) :: lammps_open
|
TYPE(c_ptr) :: lammps_open
|
||||||
END FUNCTION lammps_open
|
END FUNCTION lammps_open
|
||||||
|
|
||||||
@ -161,7 +160,7 @@ CONTAINS
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF (PRESENT(comm)) THEN
|
IF (PRESENT(comm)) THEN
|
||||||
lmp_open%handle = lammps_open(argc,argv,comm,dummy)
|
lmp_open%handle = lammps_open(argc,argv,comm)
|
||||||
ELSE
|
ELSE
|
||||||
lmp_open%handle = lammps_open_no_mpi(argc,argv,dummy)
|
lmp_open%handle = lammps_open_no_mpi(argc,argv,dummy)
|
||||||
END IF
|
END IF
|
||||||
|
|||||||
@ -205,20 +205,20 @@ module. Internally it converts the *f_comm* argument into a C-style MPI
|
|||||||
communicator with ``MPI_Comm_f2c()`` and then calls
|
communicator with ``MPI_Comm_f2c()`` and then calls
|
||||||
:cpp:func:`lammps_open`.
|
:cpp:func:`lammps_open`.
|
||||||
|
|
||||||
|
.. versionadded:: 15Sep2020
|
||||||
|
|
||||||
\endverbatim
|
\endverbatim
|
||||||
*
|
*
|
||||||
* \param argc number of command line arguments
|
* \param argc number of command line arguments
|
||||||
* \param argv list of command line argument strings
|
* \param argv list of command line argument strings
|
||||||
* \param f_comm Fortran style MPI communicator for this LAMMPS instance
|
* \param f_comm Fortran style MPI communicator for this LAMMPS instance
|
||||||
* \param ptr pointer to a void pointer variable
|
|
||||||
* which serves as a handle; may be ``NULL``
|
|
||||||
* \return pointer to new LAMMPS instance cast to ``void *`` */
|
* \return pointer to new LAMMPS instance cast to ``void *`` */
|
||||||
|
|
||||||
void *lammps_open_fortran(int argc, char **argv, int f_comm, void **ptr)
|
void *lammps_open_fortran(int argc, char **argv, int f_comm)
|
||||||
{
|
{
|
||||||
lammps_mpi_init();
|
lammps_mpi_init();
|
||||||
MPI_Comm c_comm = MPI_Comm_f2c((MPI_Fint)f_comm);
|
MPI_Comm c_comm = MPI_Comm_f2c((MPI_Fint)f_comm);
|
||||||
return lammps_open(argc, argv, c_comm, ptr);
|
return lammps_open(argc, argv, c_comm, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------- */
|
||||||
|
|||||||
@ -77,7 +77,7 @@ extern "C" {
|
|||||||
void *lammps_open(int argc, char **argv, MPI_Comm comm, void **ptr);
|
void *lammps_open(int argc, char **argv, MPI_Comm comm, void **ptr);
|
||||||
#endif
|
#endif
|
||||||
void *lammps_open_no_mpi(int argc, char **argv, void **ptr);
|
void *lammps_open_no_mpi(int argc, char **argv, void **ptr);
|
||||||
void *lammps_open_fortran(int argc, char **argv, int f_comm, void **ptr);
|
void *lammps_open_fortran(int argc, char **argv, int f_comm);
|
||||||
void lammps_close(void *handle);
|
void lammps_close(void *handle);
|
||||||
void lammps_mpi_init();
|
void lammps_mpi_init();
|
||||||
void lammps_mpi_finalize();
|
void lammps_mpi_finalize();
|
||||||
|
|||||||
Reference in New Issue
Block a user