Unverified Commit 4f804f58 authored by Richard Berger's avatar Richard Berger
Browse files

Merge remote-tracking branch 'origin/master' into refactor-table-reading

parents 2203e1e9 12386945
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -340,7 +340,8 @@ void AtomKokkos::sync_modify(ExecutionSpace execution_space,
  modified(execution_space,datamask_modify);
}

AtomVec *AtomKokkos::new_avec(const char *style, int trysuffix, int &sflag)
AtomVec *AtomKokkos::new_avec(const std::string &style,
                              int trysuffix, int &sflag)
{
  AtomVec* avec = Atom::new_avec(style,trysuffix,sflag);
  if (!avec->kokkosable)
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ class AtomKokkos : public Atom {
  virtual void deallocate_topology();
  void sync_modify(ExecutionSpace, unsigned int, unsigned int);
 private:
   class AtomVec *new_avec(const char *, int, int &);
  class AtomVec *new_avec(const std::string &, int, int &);
};

template<class ViewType, class IndexView>
+12 −4
Original line number Diff line number Diff line
@@ -22,6 +22,14 @@

using namespace LAMMPS_NS;

// the (rather old) version of ROMIO in MPICH for Windows
// uses "char *" instead of "const char *". This works around it.
#if defined(_WIN32)
#define ROMIO_COMPAT_CAST (char *)
#else
#define ROMIO_COMPAT_CAST
#endif

/* ---------------------------------------------------------------------- */

RestartMPIIO::RestartMPIIO(LAMMPS *lmp) : Pointers(lmp)
@@ -36,9 +44,9 @@ RestartMPIIO::RestartMPIIO(LAMMPS *lmp) : Pointers(lmp)
   for some file servers it is most efficient to only read or only write
------------------------------------------------------------------------- */

void RestartMPIIO::openForRead(char *filename)
void RestartMPIIO::openForRead(const char *filename)
{
  int err = MPI_File_open(world, filename, MPI_MODE_RDONLY ,
  int err = MPI_File_open(world, ROMIO_COMPAT_CAST filename, MPI_MODE_RDONLY,
                          MPI_INFO_NULL, &mpifh);
  if (err != MPI_SUCCESS) {
    char str[MPI_MAX_ERROR_STRING+128];
@@ -56,9 +64,9 @@ void RestartMPIIO::openForRead(char *filename)
   for some file servers it is most efficient to only read or only write
------------------------------------------------------------------------- */

void RestartMPIIO::openForWrite(char *filename)
void RestartMPIIO::openForWrite(const char *filename)
{
  int err = MPI_File_open(world, filename, MPI_MODE_WRONLY,
  int err = MPI_File_open(world, ROMIO_COMPAT_CAST filename, MPI_MODE_WRONLY,
                          MPI_INFO_NULL, &mpifh);
  if (err != MPI_SUCCESS) {
    char str[MPI_MAX_ERROR_STRING+128];
+2 −2
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ class RestartMPIIO : protected Pointers {

  RestartMPIIO(class LAMMPS *);
  ~RestartMPIIO() {}
  void openForRead(char *);
  void openForWrite(char *);
  void openForRead(const char *);
  void openForWrite(const char *);
  void write(MPI_Offset, int, double *);
  void read(MPI_Offset, bigint, double *);
  void close();
+1 −1
Original line number Diff line number Diff line
@@ -2406,7 +2406,7 @@ void FixRigid::readfile(int which, double *vec,
   only proc 0 writes list of global bodies to file
------------------------------------------------------------------------- */

void FixRigid::write_restart_file(char *file)
void FixRigid::write_restart_file(const char *file)
{
  if (me) return;

Loading