mirror of https://github.com/lammps/lammps.git
no need to use a deprecated argument in a newly added API
This commit is contained in:
parent
2a42fe66ad
commit
a1cf6c087c
|
@ -54,12 +54,11 @@ MODULE LIBLAMMPS
|
|||
|
||||
! interface definitions for calling functions in library.cpp
|
||||
INTERFACE
|
||||
FUNCTION lammps_open(argc,argv,comm,handle) &
|
||||
FUNCTION lammps_open(argc,argv,comm) &
|
||||
BIND(C, name='lammps_open_fortran')
|
||||
IMPORT :: c_ptr, c_int
|
||||
INTEGER(c_int), VALUE, INTENT(in) :: argc, comm
|
||||
TYPE(c_ptr), DIMENSION(*), INTENT(in) :: argv
|
||||
TYPE(c_ptr), INTENT(out) :: handle
|
||||
TYPE(c_ptr) :: lammps_open
|
||||
END FUNCTION lammps_open
|
||||
|
||||
|
@ -161,7 +160,7 @@ CONTAINS
|
|||
ENDIF
|
||||
|
||||
IF (PRESENT(comm)) THEN
|
||||
lmp_open%handle = lammps_open(argc,argv,comm,dummy)
|
||||
lmp_open%handle = lammps_open(argc,argv,comm)
|
||||
ELSE
|
||||
lmp_open%handle = lammps_open_no_mpi(argc,argv,dummy)
|
||||
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
|
||||
:cpp:func:`lammps_open`.
|
||||
|
||||
.. versionadded:: 15Sep2020
|
||||
|
||||
\endverbatim
|
||||
*
|
||||
* \param argc number of command line arguments
|
||||
* \param argv list of command line argument strings
|
||||
* \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 *`` */
|
||||
|
||||
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();
|
||||
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);
|
||||
#endif
|
||||
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_mpi_init();
|
||||
void lammps_mpi_finalize();
|
||||
|
|
Loading…
Reference in New Issue