diff --git a/src/MAKE/MACHINES/Makefile.mingw32-cross b/src/MAKE/MACHINES/Makefile.mingw32-cross index 9766afe7f0..66366cdc7c 100644 --- a/src/MAKE/MACHINES/Makefile.mingw32-cross +++ b/src/MAKE/MACHINES/Makefile.mingw32-cross @@ -13,9 +13,9 @@ CCFLAGS = -O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp \ SHFLAGS = # -fPIC (not needed on windows, all code is PIC) DEPFLAGS = -M -LINK = i686-w64-mingw32-g++ +LINK = i686-w64-mingw32-g++ -static LINKFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp -LIB = -lwsock32 -static-libgcc +LIB = -lwsock32 -static-libgcc -lquadmath -lpsapi SIZE = i686-w64-mingw32-size ARCHIVE = i686-w64-mingw32-ar @@ -49,7 +49,7 @@ MPI_PATH = -L../STUBS MPI_LIB = -lmpi_mingw32 # FFT library -# see discussion in Section 2.2 (step 6) of manaul +# see discussion in Section 2.2 (step 6) of manual # can be left blank to use provided KISS FFT library # INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings # PATH = path for FFT library diff --git a/src/MAKE/MACHINES/Makefile.mingw32-cross-mpi b/src/MAKE/MACHINES/Makefile.mingw32-cross-mpi index 4aad3bd4d1..5205312c81 100644 --- a/src/MAKE/MACHINES/Makefile.mingw32-cross-mpi +++ b/src/MAKE/MACHINES/Makefile.mingw32-cross-mpi @@ -13,9 +13,9 @@ CCFLAGS = -O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp \ SHFLAGS = # -fPIC (not needed on windows, all code is PIC) DEPFLAGS = -M -LINK = i686-w64-mingw32-g++ -LINKFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp -LIB = -lwsock32 -static-libgcc +LINK = i686-w64-mingw32-g++ -static +LINKFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 -fopenmp +LIB = -lwsock32 -static-libgcc -lquadmath -lpsapi SIZE = i686-w64-mingw32-size ARCHIVE = i686-w64-mingw32-ar @@ -44,12 +44,12 @@ LMP_INC = -DLAMMPS_SMALLSMALL -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_XDR -DLAMMPS_G # PATH = path for MPI library # LIB = name of MPI library -MPI_INC = -I../../tools/mingw-cross/mpich2-win32/include +MPI_INC = -I../../tools/mingw-cross/mpich2-win32/include -DMPICH_SKIP_MPICXX MPI_PATH = -L../../tools/mingw-cross/mpich2-win32/lib MPI_LIB = -lmpi # FFT library -# see discussion in Section 2.2 (step 6) of manaul +# see discussion in Section 2.2 (step 6) of manual # can be left blank to use provided KISS FFT library # INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings # PATH = path for FFT library diff --git a/src/MAKE/MACHINES/Makefile.mingw64-cross b/src/MAKE/MACHINES/Makefile.mingw64-cross index 340cf7fedf..661d61b069 100644 --- a/src/MAKE/MACHINES/Makefile.mingw64-cross +++ b/src/MAKE/MACHINES/Makefile.mingw64-cross @@ -13,9 +13,9 @@ CCFLAGS = -O3 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp \ SHFLAGS = # -fPIC (not needed on windows, all code is PIC) DEPFLAGS = -M -LINK = x86_64-w64-mingw32-g++ +LINK = x86_64-w64-mingw32-g++ -static LINKFLAGS = -O2 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp -LIB = -lwsock32 -static-libgcc +LIB = -lwsock32 -static-libgcc -lquadmath -lpsapi SIZE = x86_64-w64-mingw32-size ARCHIVE = x86_64-w64-mingw32-ar @@ -49,7 +49,7 @@ MPI_PATH = -L../STUBS MPI_LIB = -lmpi_mingw64 # FFT library -# see discussion in Section 2.2 (step 6) of manaul +# see discussion in Section 2.2 (step 6) of manual # can be left blank to use provided KISS FFT library # INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings # PATH = path for FFT library diff --git a/src/MAKE/MACHINES/Makefile.mingw64-cross-mpi b/src/MAKE/MACHINES/Makefile.mingw64-cross-mpi index a6d7aaa169..ea4211605d 100644 --- a/src/MAKE/MACHINES/Makefile.mingw64-cross-mpi +++ b/src/MAKE/MACHINES/Makefile.mingw64-cross-mpi @@ -13,9 +13,9 @@ CCFLAGS = -O3 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp \ SHFLAGS = # -fPIC (not needed on windows, all code is PIC) DEPFLAGS = -M -LINK = x86_64-w64-mingw32-g++ +LINK = x86_64-w64-mingw32-g++ -static LINKFLAGS = -O2 -march=core2 -mtune=core2 -mpc64 -msse2 -fopenmp -LIB = -lwsock32 -static-libgcc +LIB = -lwsock32 -static-libgcc -lquadmath -lpsapi SIZE = x86_64-w64-mingw32-size ARCHIVE = x86_64-w64-mingw32-ar @@ -44,12 +44,12 @@ LMP_INC = -DLAMMPS_SMALLBIG -DLAMMPS_JPEG -DLAMMPS_PNG -DLAMMPS_XDR -DLAMMPS_GZI # PATH = path for MPI library # LIB = name of MPI library -MPI_INC = -I../../tools/mingw-cross/mpich2-win64/include +MPI_INC = -I../../tools/mingw-cross/mpich2-win64/include -DMPICH_SKIP_MPICXX MPI_PATH = -L../../tools/mingw-cross/mpich2-win64/lib MPI_LIB = -lmpi # FFT library -# see discussion in Section 2.2 (step 6) of manaul +# see discussion in Section 2.2 (step 6) of manual # can be left blank to use provided KISS FFT library # INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings # PATH = path for FFT library diff --git a/src/MANYBODY/fix_qeq_comb.cpp b/src/MANYBODY/fix_qeq_comb.cpp index a05211ab64..c2d9cd9281 100644 --- a/src/MANYBODY/fix_qeq_comb.cpp +++ b/src/MANYBODY/fix_qeq_comb.cpp @@ -33,7 +33,6 @@ #include "update.h" #include "memory.h" #include "error.h" -#include "iostream" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_ave_correlate_long.cpp b/src/USER-MISC/fix_ave_correlate_long.cpp index 3811eabcf3..f1a8a07cd6 100644 --- a/src/USER-MISC/fix_ave_correlate_long.cpp +++ b/src/USER-MISC/fix_ave_correlate_long.cpp @@ -424,6 +424,7 @@ void FixAveCorrelateLong::end_of_step() for (i = 0; i < nvalues; i++) { m = value2index[i]; + scalar = 0.0; // invoke compute if not previously invoked diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 32cfc74cc8..3c86702a9d 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -302,10 +302,7 @@ void DisplaceAtoms::move(int idim, char *arg, double scale) if (mask[i] & groupbit) x[i][idim] += delta; } else { - int n = strlen(&arg[2]) + 1; - char *vstr = new char[n]; - strcpy(vstr,&arg[2]); - int ivar = input->variable->find(vstr); + int ivar = input->variable->find(arg+2); if (ivar < 0) error->all(FLERR,"Variable name for displace_atoms does not exist"); diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 47888c5ed8..330cf9a224 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -839,6 +839,7 @@ void ReadDump::process_atoms(int n) // create type and coord fields from dump file // coord = 0.0 unless corresponding dump file field was specified + itype = 0; one[0] = one[1] = one[2] = 0.0; for (ifield = 1; ifield < nfield; ifield++) { switch (fieldtype[ifield]) { diff --git a/src/region_cone.cpp b/src/region_cone.cpp index deb8d04841..bc3197a02d 100644 --- a/src/region_cone.cpp +++ b/src/region_cone.cpp @@ -167,7 +167,7 @@ int RegCone::inside(double x, double y, double z) { double del1,del2,dist; double currentradius; - int inside; + int inside = 0; if (axis == 'x') { del1 = y - c1; diff --git a/src/variable.cpp b/src/variable.cpp index ddaff7d991..5db4ee29c9 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -817,7 +817,7 @@ double Variable::compute_equal(int ivar) error->all(FLERR,"Variable has circular dependency"); eval_in_progress[ivar] = 1; - double value; + double value = 0.0; if (style[ivar] == EQUAL) value = evaluate(data[ivar][0],NULL); else if (style[ivar] == PYTHON) { int ifunc = python->find(data[ivar][0]);