Unverified Commit 40e7ea83 authored by Steve Plimpton's avatar Steve Plimpton Committed by GitHub
Browse files

Merge pull request #1084 from rbberger/cmake-and-warning-suppression-bugs

Fixes various compilation issues
parents ed61ed5b a404da02
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -678,7 +678,9 @@ if(PKG_USER-OMP)
    set(USER-OMP_SOURCES ${USER-OMP_SOURCES_DIR}/thr_data.cpp
                         ${USER-OMP_SOURCES_DIR}/thr_omp.cpp
                         ${USER-OMP_SOURCES_DIR}/fix_nh_omp.cpp
                         ${USER-OMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp)
                         ${USER-OMP_SOURCES_DIR}/fix_nh_sphere_omp.cpp
                         ${USER-OMP_SOURCES_DIR}/domain_omp.cpp)
    add_definitions(-DLMP_USER_OMP)
    set_property(GLOBAL PROPERTY "OMP_SOURCES" "${USER-OMP_SOURCES}")

    # detects styles which have USER-OMP version
+10 −6
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@
   process's box throughout the whole simulation. therefore
   we need to make upper bound estimates for various data structures */
int PreAllocate_Space( reax_system *system, control_params * /*control*/,
                       storage */*workspace*/, MPI_Comm comm )
                       storage * workspace, MPI_Comm comm )
{
  int mincap = system->mincap;
  double safezone = system->safezone;
@@ -60,6 +60,8 @@ int PreAllocate_Space( reax_system *system, control_params */*control*/,
  workspace->forceReduction = NULL;
  workspace->valence_angle_atom_myoffset = NULL;
  workspace->my_ext_pressReduction = NULL;
#else
  LMP_UNUSED_PARAM(workspace);
#endif

  return SUCCESS;
@@ -204,7 +206,7 @@ void DeAllocate_Workspace( control_params */*control*/, storage *workspace )
}


int Allocate_Workspace( reax_system */*system*/, control_params */*control*/,
int Allocate_Workspace( reax_system * /*system*/, control_params * control,
                        storage *workspace, int local_cap, int total_cap,
                        MPI_Comm comm, char * /*msg*/ )
{
@@ -307,6 +309,8 @@ int Allocate_Workspace( reax_system */*system*/, control_params */*control*/,

  workspace->valence_angle_atom_myoffset = (int *) scalloc(sizeof(int), total_cap, "valence_angle_atom_myoffset", comm);
  workspace->my_ext_pressReduction = (rvec *) calloc(sizeof(rvec), control->nthreads);
#else
  LMP_UNUSED_PARAM(control);
#endif

  return SUCCESS;
+2 −86
Original line number Diff line number Diff line
@@ -17,47 +17,6 @@

// true interface to USER-OMP

// this part is used inside the neighbor.h header file to
// add functions to the Neighbor class definition

#ifdef LMP_INSIDE_NEIGHBOR_H

  void half_nsq_no_newton_omp(class NeighList *);
  void half_nsq_no_newton_ghost_omp(class NeighList *);
  void half_nsq_newton_omp(class NeighList *);

  void half_bin_no_newton_omp(class NeighList *);
  void half_bin_no_newton_ghost_omp(class NeighList *);
  void half_bin_newton_omp(class NeighList *);
  void half_bin_newton_tri_omp(class NeighList *);

  void half_multi_no_newton_omp(class NeighList *);
  void half_multi_newton_omp(class NeighList *);
  void half_multi_newton_tri_omp(class NeighList *);

  void full_nsq_omp(class NeighList *);
  void full_nsq_ghost_omp(class NeighList *);
  void full_bin_omp(class NeighList *);
  void full_bin_ghost_omp(class NeighList *);
  void full_multi_omp(class NeighList *);

  void half_from_full_no_newton_omp(class NeighList *);
  void half_from_full_newton_omp(class NeighList *);

  void granular_nsq_no_newton_omp(class NeighList *);
  void granular_nsq_newton_omp(class NeighList *);
  void granular_bin_no_newton_omp(class NeighList *);
  void granular_bin_newton_omp(class NeighList *);
  void granular_bin_newton_tri_omp(class NeighList *);

  void respa_nsq_no_newton_omp(class NeighList *);
  void respa_nsq_newton_omp(class NeighList *);
  void respa_bin_no_newton_omp(class NeighList *);
  void respa_bin_newton_omp(class NeighList *);
  void respa_bin_newton_tri_omp(class NeighList *);

#else /* !LMP_INSIDE_NEIGHBOR_H */

// provide a DomainOMP class with some overrides for Domain
#include "domain.h"

@@ -68,8 +27,8 @@ namespace LAMMPS_NS {

class DomainOMP : public Domain {
 public:
  DomainOMP(class LAMMPS *lmp) : Domain(lmp) {};
  virtual ~DomainOMP() {};
  DomainOMP(class LAMMPS *lmp) : Domain(lmp) {}
  virtual ~DomainOMP() {}

  // multi-threaded versions
  virtual void pbc();
@@ -81,48 +40,5 @@ class DomainOMP : public Domain {
}

#endif /* LMP_DOMAIN_OMP_H */
#endif /* !LMP_INSIDE_NEIGHBOR_H */

#else /* !LMP_USER_OMP */

// dummy interface to USER-OMP
// needed for compiling when USER-OMP is not installed

#ifdef LMP_INSIDE_NEIGHBOR_H

  void half_nsq_no_newton_omp(class NeighList *) {}
  void half_nsq_no_newton_ghost_omp(class NeighList *) {}
  void half_nsq_newton_omp(class NeighList *) {}

  void half_bin_no_newton_omp(class NeighList *) {}
  void half_bin_no_newton_ghost_omp(class NeighList *) {}
  void half_bin_newton_omp(class NeighList *) {}
  void half_bin_newton_tri_omp(class NeighList *) {}

  void half_multi_no_newton_omp(class NeighList *) {}
  void half_multi_newton_omp(class NeighList *) {}
  void half_multi_newton_tri_omp(class NeighList *) {}

  void full_nsq_omp(class NeighList *) {}
  void full_nsq_ghost_omp(class NeighList *) {}
  void full_bin_omp(class NeighList *) {}
  void full_bin_ghost_omp(class NeighList *) {}
  void full_multi_omp(class NeighList *) {}

  void half_from_full_no_newton_omp(class NeighList *) {}
  void half_from_full_newton_omp(class NeighList *) {}

  void granular_nsq_no_newton_omp(class NeighList *) {}
  void granular_nsq_newton_omp(class NeighList *) {}
  void granular_bin_no_newton_omp(class NeighList *) {}
  void granular_bin_newton_omp(class NeighList *) {}
  void granular_bin_newton_tri_omp(class NeighList *) {}

  void respa_nsq_no_newton_omp(class NeighList *) {}
  void respa_nsq_newton_omp(class NeighList *) {}
  void respa_bin_no_newton_omp(class NeighList *) {}
  void respa_bin_newton_omp(class NeighList *) {}
  void respa_bin_newton_tri_omp(class NeighList *) {}
#endif

#endif /* !LMP_USER_OMP */
+4 −2
Original line number Diff line number Diff line
@@ -992,7 +992,6 @@ void Image::compute_SSAO()

void Image::write_JPG(FILE *fp)
{
  (void)(fp); // suppress unused parameter warning
#ifdef LAMMPS_JPEG
  struct jpeg_compress_struct cinfo;
  struct jpeg_error_mgr jerr;
@@ -1018,6 +1017,8 @@ void Image::write_JPG(FILE *fp)

  jpeg_finish_compress(&cinfo);
  jpeg_destroy_compress(&cinfo);
#else
  LMP_UNUSED_PARAM(fp);
#endif
}

@@ -1025,7 +1026,6 @@ void Image::write_JPG(FILE *fp)

void Image::write_PNG(FILE *fp)
{
  (void)(fp); // suppress unused parameter warning
#ifdef LAMMPS_PNG
  png_structp png_ptr;
  png_infop info_ptr;
@@ -1076,6 +1076,8 @@ void Image::write_PNG(FILE *fp)

  png_destroy_write_struct(&png_ptr, &info_ptr);
  delete[] row_pointers;
#else
  LMP_UNUSED_PARAM(fp);
#endif
}

+4 −0
Original line number Diff line number Diff line
@@ -213,4 +213,8 @@ typedef int bigint;
#include "lmpwindows.h"
#endif

// suppress unused parameter warning

#define LMP_UNUSED_PARAM(x) (void)(x)

#endif
+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+13 −13

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+6 −6

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+8 −8

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+6 −6

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+2 −2

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

Loading