From 6b92826a1a224362117545326fd1a052d82796c9 Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Fri, 27 Apr 2018 12:35:00 -0600 Subject: [PATCH 01/22] Remove Kokkos deprecated code --- src/KOKKOS/kokkos.cpp | 20 ++++++++------------ src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp | 5 ++++- src/KOKKOS/pair_exp6_rx_kokkos.cpp | 20 ++++++++++++-------- src/KOKKOS/rand_pool_wrap_kokkos.h | 12 ++++++++---- 4 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 5f81078afd..65942fbeaf 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -113,14 +113,15 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp) #ifdef KOKKOS_HAVE_CUDA if (ngpu <= 0) error->all(FLERR,"Kokkos has been compiled for CUDA but no GPUs are requested"); - - Kokkos::HostSpace::execution_space::initialize(num_threads,numa); - Kokkos::Cuda::SelectDevice select_device(device); - Kokkos::Cuda::initialize(select_device); -#else - LMPHostType::initialize(num_threads,numa); #endif + Kokkos::InitArguments args; + args.num_threads = num_threads; + args.num_numa = numa; + args.device_id = device; + + Kokkos::initialize(args); + // default settings for package kokkos command neighflag = FULL; @@ -144,12 +145,7 @@ KokkosLMP::~KokkosLMP() { // finalize Kokkos -#ifdef KOKKOS_HAVE_CUDA - Kokkos::Cuda::finalize(); - Kokkos::HostSpace::execution_space::finalize(); -#else - LMPHostType::finalize(); -#endif + Kokkos::finalize(); } /* ---------------------------------------------------------------------- diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 7d71719e0a..f45da3a131 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -111,7 +111,10 @@ void PairDPDfdtEnergyKokkos::init_style() #ifdef DPD_USE_RAN_MARS rand_pool.init(random,seed); #else - rand_pool.init(seed + comm->me,DeviceType::max_hardware_threads()); + typedef Kokkos::Experimental::UniqueToken< + DeviceType, Kokkos::Experimental::UniqueTokenScope::Global> unique_token_type; + unique_token_type unique_token; + rand_pool.init(seed + comm->me,unique_token.size()); #endif } diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index 65b36635a3..427561d868 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -813,10 +813,10 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics unique_token_type; + unique_token_type unique_token; + int tid = unique_token.acquire(); int i,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,evdwlOld,fpair; @@ -1152,6 +1152,8 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics::vectorized_operator(const int &ii, EV_FLOAT& Kokkos::View::value> > a_uCG = uCG; Kokkos::View::value> > a_uCGnew = uCGnew; - int tid = 0; -#ifndef KOKKOS_HAVE_CUDA - tid = DeviceType::hardware_thread_id(); -#endif + typedef Kokkos::Experimental::UniqueToken< + DeviceType, Kokkos::Experimental::UniqueTokenScope::Global> unique_token_type; + unique_token_type unique_token; + int tid = unique_token.acquire(); const int nRep = 12; const double shift = 1.05; @@ -1612,6 +1614,8 @@ void PairExp6rxKokkos::vectorized_operator(const int &ii, EV_FLOAT& t_uCG(tid,i) += uCG_i; t_uCGnew(tid,i) += uCGnew_i; } + + unique_token.release(tid); } template diff --git a/src/KOKKOS/rand_pool_wrap_kokkos.h b/src/KOKKOS/rand_pool_wrap_kokkos.h index 975ce0c89a..12255a8a62 100644 --- a/src/KOKKOS/rand_pool_wrap_kokkos.h +++ b/src/KOKKOS/rand_pool_wrap_kokkos.h @@ -55,11 +55,15 @@ class RandPoolWrap : protected Pointers { #endif RandWrap rand_wrap; - int tid = 0; -#ifndef KOKKOS_HAVE_CUDA - tid = LMPDeviceType::hardware_thread_id(); -#endif + + typedef Kokkos::Experimental::UniqueToken< + LMPHostType, Kokkos::Experimental::UniqueTokenScope::Global> unique_token_type; + + unique_token_type unique_token; + int tid = (int) unique_token.acquire(); rand_wrap.rng = random_thr[tid]; + unique_token.release(tid); + return rand_wrap; } From 104dde27ed404caaad67cb054d254401fb067622 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 7 May 2018 17:36:34 -0400 Subject: [PATCH 02/22] eliminate variable length arrays from AtC lib for C++ standard compliance --- lib/atc/ATC_Method.cpp | 12 ++++++++---- lib/atc/FE_Engine.cpp | 11 ++++++++--- lib/atc/Function.cpp | 5 +++-- lib/atc/LammpsInterface.cpp | 16 ++++++++++------ lib/atc/LammpsInterface.h | 11 ++++++----- lib/atc/MPI_Wrappers.cpp | 11 ++++++++--- lib/atc/Makefile.mpi | 2 +- lib/atc/Makefile.mpic++ | 1 - lib/atc/PrescribedDataManager.h | 12 ++++++++---- 9 files changed, 52 insertions(+), 29 deletions(-) delete mode 120000 lib/atc/Makefile.mpic++ diff --git a/lib/atc/ATC_Method.cpp b/lib/atc/ATC_Method.cpp index b1f3fa2545..5d61a7bed8 100644 --- a/lib/atc/ATC_Method.cpp +++ b/lib/atc/ATC_Method.cpp @@ -2015,8 +2015,8 @@ pecified LammpsInterface::instance()->int_allmax(&send_size,&max_size); if (comm_rank == 0) { - int intbuf[max_size]; - double buf[max_size]; + int *intbuf = new int[max_size]; + double *buf = new double[max_size]; for (int iproc = 1; iproc < nprocs; iproc++) { LammpsInterface::instance()->int_recv(intbuf,max_size,iproc); LammpsInterface::instance()->recv(buf,max_size,iproc); @@ -2024,15 +2024,19 @@ pecified out << intbuf[i] << " " << buf[i] << "\n"; } } + delete[] intbuf; + delete[] buf; } else { - int intbuf[send_size]; - double buf[send_size]; + int *intbuf = new int[send_size]; + double *buf = new double[send_size]; for (int i = 0; i < send_size; i++) { intbuf[i] = id2tag[i]; buf[i] = atomicVolumeMatrix(i,i); } LammpsInterface::instance()->int_send(intbuf,send_size); LammpsInterface::instance()->send(buf,send_size); + delete[] intbuf; + delete[] buf; } } diff --git a/lib/atc/FE_Engine.cpp b/lib/atc/FE_Engine.cpp index d8d6e3e440..0e94dfa031 100644 --- a/lib/atc/FE_Engine.cpp +++ b/lib/atc/FE_Engine.cpp @@ -352,8 +352,9 @@ namespace ATC{ // each segment of the piecewise funcion is length-normalized separately else if (strcmp(arg[argIdx],"position-number-density")==0) { argIdx++; - double y[nx],w[nx]; - int n[nx]; + double *y = new double[nx]; + double *w = new double[nx]; + int *n = new int[nx]; int nn = 0; while (argIdx < narg) { if (! is_numeric(arg[argIdx])) break; @@ -369,7 +370,7 @@ namespace ATC{ double w0 = w[i-1]; double dw = w[i]-w0; double lx = 0; - double l[dn]; + double *l = new double[dn]; for (int j = 0; j < dn; ++j) { double x = (j+0.5)/dn; double dl = w0+x*dw; @@ -380,7 +381,11 @@ namespace ATC{ for (int j = 0; j < dn; ++j) { dx(k++) = scale*l[j]; } + delete[] l; } + delete[] y; + delete[] w; + delete[] n; } // construct relative values from a density function // evaluate for a domain (0,1) diff --git a/lib/atc/Function.cpp b/lib/atc/Function.cpp index 0bd759695c..dfc42d5148 100644 --- a/lib/atc/Function.cpp +++ b/lib/atc/Function.cpp @@ -1,3 +1,4 @@ +#include #include "Function.h" #include "ATC_Error.h" #include "LammpsInterface.h" @@ -58,7 +59,7 @@ namespace ATC { { string type = args[0]; int narg = nargs -1; - double dargs[narg]; + double *dargs = alloca(sizeof(double) * narg); for (int i = 0; i < narg; ++i) dargs[i] = atof(args[i+1]); return function(type, narg, dargs); @@ -192,7 +193,7 @@ XT_Function_Mgr * XT_Function_Mgr::myInstance_ = NULL; { string type = args[0]; int narg = nargs -1; - double dargs[narg]; + double *dargs = alloca(sizeof(double) * narg); for (int i = 0; i < narg; ++i) dargs[i] = atof(args[i+1]); return function(type, narg, dargs); diff --git a/lib/atc/LammpsInterface.cpp b/lib/atc/LammpsInterface.cpp index d584d159ea..2238d930f4 100644 --- a/lib/atc/LammpsInterface.cpp +++ b/lib/atc/LammpsInterface.cpp @@ -131,15 +131,15 @@ void LammpsInterface::sparse_allsum(SparseMatrix &toShare) const if (error != MPI_SUCCESS) throw ATC_Error("error in sparse_allsum_numrows "+to_string(error)); // adjust row sendcounts because recRowsCRS is off by one - int rowCounts[nProcs]; - int sizeCounts[nProcs]; + int *rowCounts = new int[nProcs]; + int *sizeCounts = new int[nProcs]; // set up total size of receive buffers for Allgatherv calls int totalRowsCRS = 0; int totalSize = 0; // set up array of displacements for Allgatherv calls - int rowOffsets[nProcs]; + int *rowOffsets = new int[nProcs]; rowOffsets[0] = 0; - int sizeOffsets[nProcs]; + int *sizeOffsets = new int[nProcs]; sizeOffsets[0] = 0; for (int i = 0; i < nProcs; i++) { // find the total number of entries to share in the mpi calls below @@ -156,8 +156,8 @@ void LammpsInterface::sparse_allsum(SparseMatrix &toShare) const // get actual rows INDEX *rec_ia = new INDEX[totalRowsCRS]; if (toShare.size() == 0) { - double dummy[0]; - error = MPI_Allgatherv(dummy, 0, MPI_INT, + double dummy; + error = MPI_Allgatherv(&dummy, 0, MPI_INT, rec_ia, rowCounts, rowOffsets, MPI_INT, lammps_->world); } else @@ -211,6 +211,10 @@ void LammpsInterface::sparse_allsum(SparseMatrix &toShare) const toShare += tempMat; } } + delete[] rowCounts; + delete[] sizeCounts; + delete[] rowOffsets; + delete[] sizeOffsets; delete[] recInfo; delete[] rec_ia; diff --git a/lib/atc/LammpsInterface.h b/lib/atc/LammpsInterface.h index ff2b4ba9b2..2c78269522 100644 --- a/lib/atc/LammpsInterface.h +++ b/lib/atc/LammpsInterface.h @@ -315,7 +315,7 @@ class LammpsInterface { } else { int commSize = comm_size(); - double recv[commSize]; + double *recv = new double[commSize]; MPI_Wrappers::gather(lammps_->world,data,recv); if (rank_zero()) { full_msg << " ATC:" << tag; @@ -324,6 +324,7 @@ class LammpsInterface { } full_msg << "\n"; } + delete[] recv; } if (rank_zero()) { std::string mesg = full_msg.str(); @@ -577,13 +578,13 @@ class LammpsInterface { void destroy_2d_int_array(int **i) const; int ** grow_2d_int_array(int **array, int n1, int n2, const char *name) const; template - T * grow_array(T *&array, int n, const char *name) const {return lammps_->memory->grow(array,n,name);}; + T * grow_array(T *&array, int n, const char *name) const {return lammps_->memory->grow(array,n,name);} template - void destroy_array(T * array) {lammps_->memory->destroy(array);}; + void destroy_array(T * array) {lammps_->memory->destroy(array);} template - T ** grow_array(T **&array, int n1, int n2, const char *name) const {return lammps_->memory->grow(array,n1,n2,name);}; + T ** grow_array(T **&array, int n1, int n2, const char *name) const {return lammps_->memory->grow(array,n1,n2,name);} template - void destroy_array(T ** array) const {lammps_->memory->destroy(array);}; + void destroy_array(T ** array) const {lammps_->memory->destroy(array);} /*@}*/ /** \name Methods that interface with Update class */ diff --git a/lib/atc/MPI_Wrappers.cpp b/lib/atc/MPI_Wrappers.cpp index 9468644c53..b8a8ab77b7 100644 --- a/lib/atc/MPI_Wrappers.cpp +++ b/lib/atc/MPI_Wrappers.cpp @@ -94,7 +94,8 @@ namespace MPI_Wrappers { { int myRank; MPI_Comm_rank(MPI_COMM_WORLD, &myRank); - DOUBLE_RANK in[count],out[count]; + DOUBLE_RANK *in = new DOUBLE_RANK[count]; + DOUBLE_RANK *out = new DOUBLE_RANK[count]; for (int i = 0; i < count; i++) { in[i].val = send_buf[i]; in[i].rank = myRank; @@ -105,6 +106,8 @@ namespace MPI_Wrappers { for (int i = 0; i < count; i++) { rec_buf[i] = out[i].val; } + delete[] in; + delete[] out; return out[0].rank; } @@ -154,14 +157,16 @@ namespace MPI_Wrappers { { int error; int numprocs = size(comm); - int sizes[numprocs]; - int displacements[numprocs]; + int *sizes = new int[numprocs]; + int *displacements = new int[numprocs]; for (int i = 0; i < numprocs; ++i) { sizes[i] = 1; displacements[i] = i; } error = MPI_Scatterv(send_buf, sizes, displacements, MPI_INT, rec_buf, count, MPI_INT, 0, comm); if (error != MPI_SUCCESS) throw ATC_Error("error in int_scatter "+to_string(error)); + delete[] sizes; + delete[] displacements; } void allgatherv(MPI_Comm comm, double *send_buf, int send_count, diff --git a/lib/atc/Makefile.mpi b/lib/atc/Makefile.mpi index ec941efdcb..c1ce0500ea 100644 --- a/lib/atc/Makefile.mpi +++ b/lib/atc/Makefile.mpi @@ -52,4 +52,4 @@ fastdep.exe: ../../src/DEPEND/fastdep.c clean: -rm -f *.o *~ .depend $(LIB) fastdep.exe -sinclude $(DEPENDS) +sinclude .depend diff --git a/lib/atc/Makefile.mpic++ b/lib/atc/Makefile.mpic++ deleted file mode 120000 index 1f5f55d2ad..0000000000 --- a/lib/atc/Makefile.mpic++ +++ /dev/null @@ -1 +0,0 @@ -Makefile.mpi \ No newline at end of file diff --git a/lib/atc/PrescribedDataManager.h b/lib/atc/PrescribedDataManager.h index 05f553ab2d..738c34d593 100644 --- a/lib/atc/PrescribedDataManager.h +++ b/lib/atc/PrescribedDataManager.h @@ -154,7 +154,7 @@ namespace ATC { std::set fluxes; //list of nodes to insert. //1 for nodes to insert, 0 for nodes not to insert. - int toInsert[nNodes_]; + int *toInsert = new int[nNodes_]; for (int i = 0; i < nNodes_; ++i) toInsert[i] = 0; const std::map < std::pair , Array < XT_Function * > > & sources = faceSources_.find(thisField)->second; @@ -178,6 +178,7 @@ namespace ATC { for (int node = 0; node < nNodes_; ++node) { if (toInsert[node]) fluxes.insert(node); } + delete[] toInsert; return fluxes; } @@ -189,7 +190,7 @@ namespace ATC { { //list of nodes to insert. //1 for nodes to insert, 0 for nodes not to insert. - int toInsert[nNodes_]; + int *toInsert = new int[nNodes_]; for (int i = 0; i < nNodes_; ++i) toInsert[i] = 0; const std::map < std::pair , Array < XT_Function * > > & sources = faceSources_.find(thisField)->second; @@ -213,6 +214,7 @@ namespace ATC { for (int node = 0; node < nNodes_; ++node) { if (toInsert[node]) fluxes.insert(node); } + delete[] toInsert; } /** */ @@ -223,7 +225,7 @@ namespace ATC { std::set fluxes; //list of nodes to insert. //1 for nodes to insert, 0 for nodes not to insert. - int toInsert[nNodes_]; + int *toInsert = new int[nNodes_]; for (int i = 0; i < nNodes_; ++i) toInsert[i] = 0; const Array2D < XT_Function *> & sources = elementSources_.find(thisField)->second; @@ -244,6 +246,7 @@ namespace ATC { for (int node = 0; node < nNodes_; ++node) { if (toInsert[node]) fluxes.insert(node); } + delete[] toInsert; return fluxes; } @@ -255,7 +258,7 @@ namespace ATC { { //list of nodes to insert. //1 for nodes to insert, 0 for nodes not to insert. - int toInsert[nNodes_]; + int *toInsert = new int[nNodes_]; for (int i = 0; i < nNodes_; ++i) toInsert[i] = 0; const Array2D < XT_Function *> & sources = elementSources_.find(thisField)->second; @@ -276,6 +279,7 @@ namespace ATC { for (int node = 0; node < nNodes_; ++node) { if (toInsert[node]) fluxes.insert(node); } + delete[] toInsert; } /** */ From cde6e9b7c419d678b69ea2f0ec4a5f11431c9d9f Mon Sep 17 00:00:00 2001 From: Stan Moore Date: Mon, 7 May 2018 15:51:15 -0600 Subject: [PATCH 03/22] Fix CUDA issue in pair_exp6_rx_kokkos --- src/KOKKOS/pair_exp6_rx_kokkos.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index 6ff787b67b..810173d219 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -813,10 +813,13 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics unique_token_type; unique_token_type unique_token; - int tid = unique_token.acquire(); + tid = unique_token.acquire(); +#endif int i,jj,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,evdwlOld,fpair; @@ -1153,7 +1156,9 @@ void PairExp6rxKokkos::operator()(TagPairExp6rxComputeNoAtomics::vectorized_operator(const int &ii, EV_FLOAT& Kokkos::View::value> > a_uCG = uCG; Kokkos::View::value> > a_uCGnew = uCGnew; + int tid = 0; +#ifndef KOKKOS_HAVE_CUDA typedef Kokkos::Experimental::UniqueToken< DeviceType, Kokkos::Experimental::UniqueTokenScope::Global> unique_token_type; unique_token_type unique_token; - int tid = unique_token.acquire(); + tid = unique_token.acquire(); +#endif const int nRep = 12; const double shift = 1.05; @@ -1615,7 +1623,9 @@ void PairExp6rxKokkos::vectorized_operator(const int &ii, EV_FLOAT& t_uCGnew(tid,i) += uCGnew_i; } +#ifndef KOKKOS_HAVE_CUDA unique_token.release(tid); +#endif } template From 1888b616c4d26da4686bce74376162f988b72f09 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 7 May 2018 18:04:25 -0400 Subject: [PATCH 04/22] remove some extra semicolons --- lib/atc/InterscaleOperators.h | 38 ++++++++++++++++---------------- lib/colvars/colvar_UIestimator.h | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/atc/InterscaleOperators.h b/lib/atc/InterscaleOperators.h index 4681801e73..0ddca1dc67 100644 --- a/lib/atc/InterscaleOperators.h +++ b/lib/atc/InterscaleOperators.h @@ -279,7 +279,7 @@ namespace ATC { typename std::map::iterator it = list.find(tag); if (it==list.end()) return NULL; return it->second; - }; + } /** helper function to add a data entry to a list */ template @@ -290,7 +290,7 @@ namespace ATC { throw ATC_Error("Tried to add another Quantity with tag "+tag+" in InterscaleManager::add_quantity"); typename std::template pair myPair(tag,quantity); list.insert(myPair); - }; + } /** helper function to add a data entry to a list when it requires neighbor communication*/ template @@ -302,7 +302,7 @@ namespace ATC { if (quantity->atom_type() == PROC_GHOST) { commList.push_back(quantity); } - }; + } /** helper function to fina a data entry in a list */ template @@ -311,7 +311,7 @@ namespace ATC { typename std::map::iterator it = list.find(tag); if (it!=list.end()) return it->second; return NULL; - }; + } /** helper function to force the reset of all data in a list */ template @@ -319,7 +319,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) (it->second)->force_reset(); - }; + } /** helper function to set the memory type to temporary of a list */ template @@ -327,7 +327,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) (it->second)->set_memory_type(TEMPORARY); - }; + } /** helper function to perform intialization for dfs of a list */ template @@ -336,7 +336,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { (it->second)->dfsFound_ = false; } - }; + } /** helper function to start the dfs visit for list */ template @@ -349,7 +349,7 @@ namespace ATC { if ((it->second)->memory_type()==TEMPORARY) list.erase(it++); else ++it; } - }; + } // PAQ helper functions /** helper function to adjust local atom count for all data in a list before exchange, only valid with quantities that do that are aware of atom counts */ @@ -359,7 +359,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { (it->second)->reset_nlocal(); } - }; + } /** helper function to indicate lammps data is stale for all data in a list before exchange, only valid with PAQs */ template @@ -367,7 +367,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) (it->second)->lammps_force_reset(); - }; + } /** helper function to size all data in a list, only valid with comm lists */ template @@ -375,7 +375,7 @@ namespace ATC { { for (typename std::vector::iterator it = list.begin(); it != list.end(); ++it) (*it)->quantity(); - }; + } /** helper function to pack all data in a list before exchange, only valid with quantities that do work before parallel communication */ template @@ -384,7 +384,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { (it->second)->prepare_exchange(); } - }; + } /** helper function to extract all data in a list after exchange, only valid with quantities that do work after parallel communication */ template @@ -393,7 +393,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { (it->second)->post_exchange(); } - }; + } /** helper function to determine memory usage of all data in a list, only valid with PAQs */ template @@ -401,7 +401,7 @@ namespace ATC { { for (typename std::map::const_iterator it = list.begin(); it != list.end(); ++it) usage += (it->second)->memory_usage(); - }; + } /** helper function to pack arrays of all data before exchange in a list, only valid with PAQs */ template @@ -410,7 +410,7 @@ namespace ATC { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) { index += (it->second)->pack_exchange(i,&buffer[index]); } - }; + } /** helper function to unpack arrays of all data after exchange in a list, only valid with PAQs */ template @@ -418,7 +418,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) index += (it->second)->unpack_exchange(i,&buffer[index]); - }; + } /** helper function to pack arrays of all data in a list, only valid with comm lists */ template @@ -427,7 +427,7 @@ namespace ATC { { for (typename std::vector::iterator it = list.begin(); it != list.end(); ++it) size += (*it)->pack_comm(index,&buf[size],pbc_flag,pbc); - }; + } /** helper function to unpack arrays of all data in a list, only valid with comm lists */ template @@ -435,7 +435,7 @@ namespace ATC { { for (typename std::vector::iterator it = list.begin(); it != list.end(); ++it) size += (*it)->unpack_comm(index,&buf[size]); - }; + } /** helper function to grow arrays of all data in a list, only valid with PAQs */ template @@ -443,7 +443,7 @@ namespace ATC { { for (typename std::map::iterator it = list.begin(); it != list.end(); ++it) (it->second)->grow_lammps_array(nmax,prefix_+it->first); - }; + } /** helper function to copy arrays of all data in a list, only valid with PAQs */ template diff --git a/lib/colvars/colvar_UIestimator.h b/lib/colvars/colvar_UIestimator.h index 36ed938119..759b8d54a0 100644 --- a/lib/colvars/colvar_UIestimator.h +++ b/lib/colvars/colvar_UIestimator.h @@ -731,6 +731,6 @@ namespace UIestimator { } } }; -}; +} #endif From f39a8d46d19a15a6735c319b0190b7f3ce416e3c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:05:18 -0400 Subject: [PATCH 05/22] convert atc library header files to C++ style --- lib/atc/Array.h | 2 +- lib/atc/Array2D.h | 3 +-- lib/atc/ElectronPhononExchange.cpp | 2 +- lib/atc/FE_Element.cpp | 2 +- lib/atc/FE_Engine.cpp | 4 ++-- lib/atc/FE_Interpolate.cpp | 2 +- lib/atc/FE_Mesh.cpp | 2 +- lib/atc/FE_Mesh.h | 2 +- lib/atc/Function.h | 2 +- lib/atc/GMRES.h | 2 +- lib/atc/KD_Tree.cpp | 2 +- lib/atc/KD_Tree.h | 2 +- lib/atc/KernelFunction.cpp | 2 +- lib/atc/LammpsInterface.h | 2 +- lib/atc/OutputManager.cpp | 2 +- lib/atc/ShapeFunction.h | 8 ++++---- lib/atc/Utility.h | 2 +- 17 files changed, 21 insertions(+), 22 deletions(-) diff --git a/lib/atc/Array.h b/lib/atc/Array.h index 9df6cbbda2..21e66a9551 100644 --- a/lib/atc/Array.h +++ b/lib/atc/Array.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include // for macros #include "MatrixDef.h" diff --git a/lib/atc/Array2D.h b/lib/atc/Array2D.h index 8d3af47e12..25f895f72c 100644 --- a/lib/atc/Array2D.h +++ b/lib/atc/Array2D.h @@ -2,10 +2,9 @@ #define ARRAY2D_H #include +#include #include #include -#include -#include #include "Array.h" diff --git a/lib/atc/ElectronPhononExchange.cpp b/lib/atc/ElectronPhononExchange.cpp index 2ed25fc557..0ccc8ec67e 100644 --- a/lib/atc/ElectronPhononExchange.cpp +++ b/lib/atc/ElectronPhononExchange.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include using ATC_Utility::command_line; using ATC_Utility::str2dbl; diff --git a/lib/atc/FE_Element.cpp b/lib/atc/FE_Element.cpp index cfc59aa601..9eec08c483 100644 --- a/lib/atc/FE_Element.cpp +++ b/lib/atc/FE_Element.cpp @@ -8,7 +8,7 @@ #include "Utility.h" // Other headers -#include "math.h" +#include using ATC_Utility::dbl_geq; using ATC_Utility::det3; diff --git a/lib/atc/FE_Engine.cpp b/lib/atc/FE_Engine.cpp index 0e94dfa031..efcde66d78 100644 --- a/lib/atc/FE_Engine.cpp +++ b/lib/atc/FE_Engine.cpp @@ -7,8 +7,8 @@ #include "KernelFunction.h" #include "Utility.h" #include "MPI_Wrappers.h" -#include -#include +#include +#include #include #include diff --git a/lib/atc/FE_Interpolate.cpp b/lib/atc/FE_Interpolate.cpp index 3f41e30029..19753a8007 100644 --- a/lib/atc/FE_Interpolate.cpp +++ b/lib/atc/FE_Interpolate.cpp @@ -5,7 +5,7 @@ #include "FE_Quadrature.h" // Other headers -#include "math.h" +#include using std::map; using std::vector; diff --git a/lib/atc/FE_Mesh.cpp b/lib/atc/FE_Mesh.cpp index 6225a1b192..b090bf2881 100644 --- a/lib/atc/FE_Mesh.cpp +++ b/lib/atc/FE_Mesh.cpp @@ -6,7 +6,7 @@ #include "OutputManager.h" #include "Utility.h" #include -#include +#include #include #include #include diff --git a/lib/atc/FE_Mesh.h b/lib/atc/FE_Mesh.h index b37cb1e8ba..be40d7cb28 100644 --- a/lib/atc/FE_Mesh.h +++ b/lib/atc/FE_Mesh.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include "mpi.h" diff --git a/lib/atc/Function.h b/lib/atc/Function.h index 7368589e96..4572009f92 100644 --- a/lib/atc/Function.h +++ b/lib/atc/Function.h @@ -1,7 +1,7 @@ #ifndef XT_FUNCTION_H #define XT_FUNCTION_H -#include +#include #include #include #include diff --git a/lib/atc/GMRES.h b/lib/atc/GMRES.h index 0cffe9837f..a64fc70c00 100644 --- a/lib/atc/GMRES.h +++ b/lib/atc/GMRES.h @@ -19,7 +19,7 @@ // //***************************************************************** -#include +#include template diff --git a/lib/atc/KD_Tree.cpp b/lib/atc/KD_Tree.cpp index 362bd70d34..1432663e80 100644 --- a/lib/atc/KD_Tree.cpp +++ b/lib/atc/KD_Tree.cpp @@ -1,5 +1,5 @@ #include "KD_Tree.h" -#include +#include using std::vector; diff --git a/lib/atc/KD_Tree.h b/lib/atc/KD_Tree.h index 6c788c4071..3877cd4099 100644 --- a/lib/atc/KD_Tree.h +++ b/lib/atc/KD_Tree.h @@ -4,7 +4,7 @@ #include "Array2D.h" #include "MatrixDef.h" #include "MatrixLibrary.h" -#include +#include #include #include diff --git a/lib/atc/KernelFunction.cpp b/lib/atc/KernelFunction.cpp index 91f99a6149..80e41a1550 100644 --- a/lib/atc/KernelFunction.cpp +++ b/lib/atc/KernelFunction.cpp @@ -1,5 +1,5 @@ #include "KernelFunction.h" -#include "math.h" +#include #include #include "ATC_Error.h" #include "Quadrature.h" diff --git a/lib/atc/LammpsInterface.h b/lib/atc/LammpsInterface.h index 2c78269522..2032571da5 100644 --- a/lib/atc/LammpsInterface.h +++ b/lib/atc/LammpsInterface.h @@ -2,7 +2,7 @@ #define LAMMPS_INTERFACE_H #include -#include +#include #include #include #include diff --git a/lib/atc/OutputManager.cpp b/lib/atc/OutputManager.cpp index 414c5173e7..4340c8b8b0 100644 --- a/lib/atc/OutputManager.cpp +++ b/lib/atc/OutputManager.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include "OutputManager.h" #include "ATC_Error.h" diff --git a/lib/atc/ShapeFunction.h b/lib/atc/ShapeFunction.h index 724e66924f..62b2138cd7 100644 --- a/lib/atc/ShapeFunction.h +++ b/lib/atc/ShapeFunction.h @@ -5,10 +5,10 @@ #include "DependencyManager.h" #include "PaqAtcUtility.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace ATC { diff --git a/lib/atc/Utility.h b/lib/atc/Utility.h index f9e99ff194..d975d4804a 100644 --- a/lib/atc/Utility.h +++ b/lib/atc/Utility.h @@ -13,7 +13,7 @@ #include #include #include -#include "math.h" +#include #include "ATC_Error.h" From fff962646fba2c21e91e46faf0541742ce46efdc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:10:20 -0400 Subject: [PATCH 06/22] convert awpmd header include to c++ style --- lib/awpmd/ivutils/include/cerf.h | 7 +------ lib/awpmd/ivutils/include/logexc.h | 6 +++--- lib/awpmd/ivutils/include/vector_3.h | 2 +- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/awpmd/ivutils/include/cerf.h b/lib/awpmd/ivutils/include/cerf.h index 207fe8f459..b094c4144f 100644 --- a/lib/awpmd/ivutils/include/cerf.h +++ b/lib/awpmd/ivutils/include/cerf.h @@ -42,11 +42,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // -//#include -//#include - -//#include "f77-fcn.h" - // // Abramowitz and Stegun: (eqn: 7.1.14) gives this continued // fraction for erfc(z) @@ -242,4 +237,4 @@ const Complex cerf( const Complex z ) // 2.2 1.7 0.135021+0.153161i | 0.135021 +0.153161 1.65541359 -1.276707 // 2.2 2.7 0.127900+0.096330i | 0.127900 +0.096330 0.98619434 +0.000564 -# endif \ No newline at end of file +# endif diff --git a/lib/awpmd/ivutils/include/logexc.h b/lib/awpmd/ivutils/include/logexc.h index 0211a96034..400b3fb7d2 100644 --- a/lib/awpmd/ivutils/include/logexc.h +++ b/lib/awpmd/ivutils/include/logexc.h @@ -1,9 +1,9 @@ # ifndef LOGEXC_H # define LOGEXC_H -#include -#include -#include +#include +#include +#include #include #include diff --git a/lib/awpmd/ivutils/include/vector_3.h b/lib/awpmd/ivutils/include/vector_3.h index 75ef801a2e..3e3d9e6e0b 100644 --- a/lib/awpmd/ivutils/include/vector_3.h +++ b/lib/awpmd/ivutils/include/vector_3.h @@ -84,7 +84,7 @@ # include # include # include -# include +# include // some compilers don't define PI! # ifndef M_PI From ff6507e7b7324bb94a0e99ce4185207ff032f8dc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:17:57 -0400 Subject: [PATCH 07/22] convert colvars lib to use c++ style header files --- lib/colvars/colvarmodule.cpp | 2 +- lib/colvars/colvarproxy.cpp | 2 +- lib/colvars/colvarscript.cpp | 3 +-- lib/colvars/colvartypes.cpp | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/colvars/colvarmodule.cpp b/lib/colvars/colvarmodule.cpp index c9e2d14116..dc6242c5bc 100644 --- a/lib/colvars/colvarmodule.cpp +++ b/lib/colvars/colvarmodule.cpp @@ -8,7 +8,7 @@ // Colvars repository at GitHub. #include -#include +#include #include "colvarmodule.h" #include "colvarparse.h" diff --git a/lib/colvars/colvarproxy.cpp b/lib/colvars/colvarproxy.cpp index c2992c309c..86338dfd1b 100644 --- a/lib/colvars/colvarproxy.cpp +++ b/lib/colvars/colvarproxy.cpp @@ -8,7 +8,7 @@ // Colvars repository at GitHub. #include -#include +#include #if defined(_OPENMP) #include diff --git a/lib/colvars/colvarscript.cpp b/lib/colvars/colvarscript.cpp index 0977496b9e..a55e4c65d9 100644 --- a/lib/colvars/colvarscript.cpp +++ b/lib/colvars/colvarscript.cpp @@ -8,8 +8,7 @@ // Colvars repository at GitHub. #include -#include -#include +#include #define COLVARSCRIPT_CPP #include "colvarscript.h" diff --git a/lib/colvars/colvartypes.cpp b/lib/colvars/colvartypes.cpp index b604606d46..2b45d77e07 100644 --- a/lib/colvars/colvartypes.cpp +++ b/lib/colvars/colvartypes.cpp @@ -7,8 +7,8 @@ // If you wish to distribute your changes, please submit them to the // Colvars repository at GitHub. -#include -#include +#include +#include #include "colvarmodule.h" #include "colvartypes.h" From 3394d18a2aa4cced9832b4420bff283c65298805 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:25:10 -0400 Subject: [PATCH 08/22] convert gpu lib to use c++-style include files --- lib/gpu/cudpp_mini/cudpp.h | 2 +- lib/gpu/cudpp_mini/cudpp_plan.cpp | 2 +- lib/gpu/cudpp_mini/cudpp_util.h | 2 +- lib/gpu/geryon/nvd_macros.h | 2 +- lib/gpu/geryon/ocl_macros.h | 2 +- lib/gpu/lal_answer.h | 2 +- lib/gpu/lal_atom.h | 2 +- lib/gpu/lal_balance.h | 2 +- lib/gpu/lal_beck_ext.cpp | 2 +- lib/gpu/lal_born_coul_long_ext.cpp | 2 +- lib/gpu/lal_born_coul_wolf_ext.cpp | 2 +- lib/gpu/lal_born_ext.cpp | 2 +- lib/gpu/lal_buck_coul_ext.cpp | 2 +- lib/gpu/lal_buck_coul_long_ext.cpp | 2 +- lib/gpu/lal_buck_ext.cpp | 2 +- lib/gpu/lal_charmm_long_ext.cpp | 2 +- lib/gpu/lal_colloid_ext.cpp | 2 +- lib/gpu/lal_coul_debye_ext.cpp | 2 +- lib/gpu/lal_coul_dsf_ext.cpp | 2 +- lib/gpu/lal_coul_ext.cpp | 2 +- lib/gpu/lal_coul_long_ext.cpp | 2 +- lib/gpu/lal_device.cpp | 2 +- lib/gpu/lal_device.h | 2 +- lib/gpu/lal_dipole_lj_ext.cpp | 2 +- lib/gpu/lal_dipole_lj_sf_ext.cpp | 2 +- lib/gpu/lal_dpd_ext.cpp | 2 +- lib/gpu/lal_eam_alloy_ext.cpp | 2 +- lib/gpu/lal_eam_ext.cpp | 2 +- lib/gpu/lal_eam_fs_ext.cpp | 2 +- lib/gpu/lal_gauss_ext.cpp | 2 +- lib/gpu/lal_gayberne_ext.cpp | 2 +- lib/gpu/lal_lj96_ext.cpp | 2 +- lib/gpu/lal_lj_class2_long_ext.cpp | 2 +- lib/gpu/lal_lj_coul_debye_ext.cpp | 2 +- lib/gpu/lal_lj_coul_ext.cpp | 2 +- lib/gpu/lal_lj_coul_long_ext.cpp | 2 +- lib/gpu/lal_lj_coul_msm_ext.cpp | 2 +- lib/gpu/lal_lj_cubic_ext.cpp | 2 +- lib/gpu/lal_lj_dsf_ext.cpp | 2 +- lib/gpu/lal_lj_expand_ext.cpp | 2 +- lib/gpu/lal_lj_ext.cpp | 2 +- lib/gpu/lal_lj_gromacs_ext.cpp | 2 +- lib/gpu/lal_lj_sdk_ext.cpp | 2 +- lib/gpu/lal_lj_sdk_long_ext.cpp | 2 +- lib/gpu/lal_mie_ext.cpp | 2 +- lib/gpu/lal_morse_ext.cpp | 2 +- lib/gpu/lal_neighbor.cpp | 2 +- lib/gpu/lal_pppm_ext.cpp | 2 +- lib/gpu/lal_re_squared_ext.cpp | 2 +- lib/gpu/lal_soft_ext.cpp | 2 +- lib/gpu/lal_sw_ext.cpp | 2 +- lib/gpu/lal_table_ext.cpp | 2 +- lib/gpu/lal_tersoff_ext.cpp | 2 +- lib/gpu/lal_tersoff_mod_ext.cpp | 2 +- lib/gpu/lal_tersoff_zbl_ext.cpp | 2 +- lib/gpu/lal_ufm_ext.cpp | 2 +- lib/gpu/lal_vashishta_ext.cpp | 2 +- lib/gpu/lal_yukawa_colloid_ext.cpp | 2 +- lib/gpu/lal_yukawa_ext.cpp | 2 +- lib/gpu/lal_zbl_ext.cpp | 2 +- 60 files changed, 60 insertions(+), 60 deletions(-) diff --git a/lib/gpu/cudpp_mini/cudpp.h b/lib/gpu/cudpp_mini/cudpp.h index 088b560abc..2f38d780a5 100644 --- a/lib/gpu/cudpp_mini/cudpp.h +++ b/lib/gpu/cudpp_mini/cudpp.h @@ -300,7 +300,7 @@ #ifndef __CUDPP_H__ #define __CUDPP_H__ -#include // for size_t +#include // for size_t #ifdef __cplusplus extern "C" { diff --git a/lib/gpu/cudpp_mini/cudpp_plan.cpp b/lib/gpu/cudpp_mini/cudpp_plan.cpp index b64b7b37ff..e92a857dd1 100644 --- a/lib/gpu/cudpp_mini/cudpp_plan.cpp +++ b/lib/gpu/cudpp_mini/cudpp_plan.cpp @@ -16,7 +16,7 @@ //#include "cudpp_spmvmult.h" #include "cudpp_radixsort.h" -#include +#include CUDPPPlanManager* CUDPPPlanManager::m_instance = NULL; diff --git a/lib/gpu/cudpp_mini/cudpp_util.h b/lib/gpu/cudpp_mini/cudpp_util.h index 5cff05e818..e1c21f3fe6 100644 --- a/lib/gpu/cudpp_mini/cudpp_util.h +++ b/lib/gpu/cudpp_mini/cudpp_util.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #if (CUDA_VERSION >= 3000) #define LAUNCH_BOUNDS(x) __launch_bounds__((x)) diff --git a/lib/gpu/geryon/nvd_macros.h b/lib/gpu/geryon/nvd_macros.h index e0e29b4c6f..08ff84991a 100644 --- a/lib/gpu/geryon/nvd_macros.h +++ b/lib/gpu/geryon/nvd_macros.h @@ -1,7 +1,7 @@ #ifndef NVD_MACROS_H #define NVD_MACROS_H -#include +#include #include #include diff --git a/lib/gpu/geryon/ocl_macros.h b/lib/gpu/geryon/ocl_macros.h index d4e27b6e71..5fb7665817 100644 --- a/lib/gpu/geryon/ocl_macros.h +++ b/lib/gpu/geryon/ocl_macros.h @@ -1,7 +1,7 @@ #ifndef OCL_MACROS_H #define OCL_MACROS_H -#include +#include #include #ifdef __APPLE__ diff --git a/lib/gpu/lal_answer.h b/lib/gpu/lal_answer.h index 790d9c1f8d..557c69b471 100644 --- a/lib/gpu/lal_answer.h +++ b/lib/gpu/lal_answer.h @@ -16,7 +16,7 @@ #ifndef LAL_ANSWER_H #define LAL_ANSWER_H -#include +#include #include "mpi.h" #if defined(USE_OPENCL) diff --git a/lib/gpu/lal_atom.h b/lib/gpu/lal_atom.h index 1b4e17d972..f6a0b109f2 100644 --- a/lib/gpu/lal_atom.h +++ b/lib/gpu/lal_atom.h @@ -16,7 +16,7 @@ #ifndef PAIR_GPU_ATOM_H #define PAIR_GPU_ATOM_H -#include +#include #include "mpi.h" #if defined(USE_OPENCL) diff --git a/lib/gpu/lal_balance.h b/lib/gpu/lal_balance.h index e90e94bee1..6aee5952ed 100644 --- a/lib/gpu/lal_balance.h +++ b/lib/gpu/lal_balance.h @@ -17,7 +17,7 @@ #define LAL_BALANCE_H #include "lal_device.h" -#include +#include #define _HD_BALANCE_EVERY 25 #define _HD_BALANCE_WEIGHT 0.5 diff --git a/lib/gpu/lal_beck_ext.cpp b/lib/gpu/lal_beck_ext.cpp index 226c2d477b..dcba4e4f40 100644 --- a/lib/gpu/lal_beck_ext.cpp +++ b/lib/gpu/lal_beck_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_beck.h" diff --git a/lib/gpu/lal_born_coul_long_ext.cpp b/lib/gpu/lal_born_coul_long_ext.cpp index feb7472e74..d0825529b1 100644 --- a/lib/gpu/lal_born_coul_long_ext.cpp +++ b/lib/gpu/lal_born_coul_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_born_coul_long.h" diff --git a/lib/gpu/lal_born_coul_wolf_ext.cpp b/lib/gpu/lal_born_coul_wolf_ext.cpp index 254b1c905b..d664f30212 100644 --- a/lib/gpu/lal_born_coul_wolf_ext.cpp +++ b/lib/gpu/lal_born_coul_wolf_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_born_coul_wolf.h" diff --git a/lib/gpu/lal_born_ext.cpp b/lib/gpu/lal_born_ext.cpp index b1ebf5804c..63991889d9 100644 --- a/lib/gpu/lal_born_ext.cpp +++ b/lib/gpu/lal_born_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_born.h" diff --git a/lib/gpu/lal_buck_coul_ext.cpp b/lib/gpu/lal_buck_coul_ext.cpp index e5a5e1315b..2a089e2040 100644 --- a/lib/gpu/lal_buck_coul_ext.cpp +++ b/lib/gpu/lal_buck_coul_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_buck_coul.h" diff --git a/lib/gpu/lal_buck_coul_long_ext.cpp b/lib/gpu/lal_buck_coul_long_ext.cpp index 28a89746b3..c7e1cd1e35 100644 --- a/lib/gpu/lal_buck_coul_long_ext.cpp +++ b/lib/gpu/lal_buck_coul_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_buck_coul_long.h" diff --git a/lib/gpu/lal_buck_ext.cpp b/lib/gpu/lal_buck_ext.cpp index 336aab6d4c..cc8b77c0a9 100644 --- a/lib/gpu/lal_buck_ext.cpp +++ b/lib/gpu/lal_buck_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_buck.h" diff --git a/lib/gpu/lal_charmm_long_ext.cpp b/lib/gpu/lal_charmm_long_ext.cpp index e24c650be4..743b510825 100644 --- a/lib/gpu/lal_charmm_long_ext.cpp +++ b/lib/gpu/lal_charmm_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_charmm_long.h" diff --git a/lib/gpu/lal_colloid_ext.cpp b/lib/gpu/lal_colloid_ext.cpp index 8e1b18e72f..961ad75925 100644 --- a/lib/gpu/lal_colloid_ext.cpp +++ b/lib/gpu/lal_colloid_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_colloid.h" diff --git a/lib/gpu/lal_coul_debye_ext.cpp b/lib/gpu/lal_coul_debye_ext.cpp index af9156c24c..af54746def 100644 --- a/lib/gpu/lal_coul_debye_ext.cpp +++ b/lib/gpu/lal_coul_debye_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_coul_debye.h" diff --git a/lib/gpu/lal_coul_dsf_ext.cpp b/lib/gpu/lal_coul_dsf_ext.cpp index 026dd924c9..2d18f9f94d 100644 --- a/lib/gpu/lal_coul_dsf_ext.cpp +++ b/lib/gpu/lal_coul_dsf_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_coul_dsf.h" diff --git a/lib/gpu/lal_coul_ext.cpp b/lib/gpu/lal_coul_ext.cpp index f03d8fcdfc..9779526d62 100644 --- a/lib/gpu/lal_coul_ext.cpp +++ b/lib/gpu/lal_coul_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_coul.h" diff --git a/lib/gpu/lal_coul_long_ext.cpp b/lib/gpu/lal_coul_long_ext.cpp index 06c102b2d1..653b4be4f3 100644 --- a/lib/gpu/lal_coul_long_ext.cpp +++ b/lib/gpu/lal_coul_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_coul_long.h" diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index e95f2b30ef..25f1cea7d4 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -16,7 +16,7 @@ #include "lal_device.h" #include "lal_precision.h" #include -#include +#include #ifdef _OPENMP #include #endif diff --git a/lib/gpu/lal_device.h b/lib/gpu/lal_device.h index 4f7b594c7c..95e9f2a430 100644 --- a/lib/gpu/lal_device.h +++ b/lib/gpu/lal_device.h @@ -22,7 +22,7 @@ #include "lal_pppm.h" #include "mpi.h" #include -#include "stdio.h" +#include #include #include diff --git a/lib/gpu/lal_dipole_lj_ext.cpp b/lib/gpu/lal_dipole_lj_ext.cpp index 76722a20b4..0a94969c8b 100644 --- a/lib/gpu/lal_dipole_lj_ext.cpp +++ b/lib/gpu/lal_dipole_lj_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_dipole_lj.h" diff --git a/lib/gpu/lal_dipole_lj_sf_ext.cpp b/lib/gpu/lal_dipole_lj_sf_ext.cpp index 68b935ff38..3626e8305e 100644 --- a/lib/gpu/lal_dipole_lj_sf_ext.cpp +++ b/lib/gpu/lal_dipole_lj_sf_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_dipole_lj_sf.h" diff --git a/lib/gpu/lal_dpd_ext.cpp b/lib/gpu/lal_dpd_ext.cpp index 26bbb660b8..33b4beddb0 100644 --- a/lib/gpu/lal_dpd_ext.cpp +++ b/lib/gpu/lal_dpd_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_dpd.h" diff --git a/lib/gpu/lal_eam_alloy_ext.cpp b/lib/gpu/lal_eam_alloy_ext.cpp index 9209ed5c26..e5f1010e76 100644 --- a/lib/gpu/lal_eam_alloy_ext.cpp +++ b/lib/gpu/lal_eam_alloy_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_eam.h" diff --git a/lib/gpu/lal_eam_ext.cpp b/lib/gpu/lal_eam_ext.cpp index 1b5602f808..78f2e3c1f8 100644 --- a/lib/gpu/lal_eam_ext.cpp +++ b/lib/gpu/lal_eam_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_eam.h" diff --git a/lib/gpu/lal_eam_fs_ext.cpp b/lib/gpu/lal_eam_fs_ext.cpp index b9e25466aa..37208e54f8 100644 --- a/lib/gpu/lal_eam_fs_ext.cpp +++ b/lib/gpu/lal_eam_fs_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_eam.h" diff --git a/lib/gpu/lal_gauss_ext.cpp b/lib/gpu/lal_gauss_ext.cpp index 7fa4b68870..a2804ce3cf 100644 --- a/lib/gpu/lal_gauss_ext.cpp +++ b/lib/gpu/lal_gauss_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_gauss.h" diff --git a/lib/gpu/lal_gayberne_ext.cpp b/lib/gpu/lal_gayberne_ext.cpp index 451550e7ef..56aad61632 100644 --- a/lib/gpu/lal_gayberne_ext.cpp +++ b/lib/gpu/lal_gayberne_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_gayberne.h" diff --git a/lib/gpu/lal_lj96_ext.cpp b/lib/gpu/lal_lj96_ext.cpp index 5c4a58c5e8..f68b35de57 100644 --- a/lib/gpu/lal_lj96_ext.cpp +++ b/lib/gpu/lal_lj96_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj96.h" diff --git a/lib/gpu/lal_lj_class2_long_ext.cpp b/lib/gpu/lal_lj_class2_long_ext.cpp index 6ed15126d9..f669a81189 100644 --- a/lib/gpu/lal_lj_class2_long_ext.cpp +++ b/lib/gpu/lal_lj_class2_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_class2_long.h" diff --git a/lib/gpu/lal_lj_coul_debye_ext.cpp b/lib/gpu/lal_lj_coul_debye_ext.cpp index 3a0a3593e7..95588eb95a 100644 --- a/lib/gpu/lal_lj_coul_debye_ext.cpp +++ b/lib/gpu/lal_lj_coul_debye_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_coul_debye.h" diff --git a/lib/gpu/lal_lj_coul_ext.cpp b/lib/gpu/lal_lj_coul_ext.cpp index b803101b9e..060088a7cb 100644 --- a/lib/gpu/lal_lj_coul_ext.cpp +++ b/lib/gpu/lal_lj_coul_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_coul.h" diff --git a/lib/gpu/lal_lj_coul_long_ext.cpp b/lib/gpu/lal_lj_coul_long_ext.cpp index 6f8b5c9fe1..33771af53c 100644 --- a/lib/gpu/lal_lj_coul_long_ext.cpp +++ b/lib/gpu/lal_lj_coul_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_coul_long.h" diff --git a/lib/gpu/lal_lj_coul_msm_ext.cpp b/lib/gpu/lal_lj_coul_msm_ext.cpp index bf520e4dc5..d957cbe376 100644 --- a/lib/gpu/lal_lj_coul_msm_ext.cpp +++ b/lib/gpu/lal_lj_coul_msm_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_coul_msm.h" diff --git a/lib/gpu/lal_lj_cubic_ext.cpp b/lib/gpu/lal_lj_cubic_ext.cpp index efbcee0a9f..f02ce0f184 100644 --- a/lib/gpu/lal_lj_cubic_ext.cpp +++ b/lib/gpu/lal_lj_cubic_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_cubic.h" diff --git a/lib/gpu/lal_lj_dsf_ext.cpp b/lib/gpu/lal_lj_dsf_ext.cpp index 25802e7544..6d53896a11 100644 --- a/lib/gpu/lal_lj_dsf_ext.cpp +++ b/lib/gpu/lal_lj_dsf_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_dsf.h" diff --git a/lib/gpu/lal_lj_expand_ext.cpp b/lib/gpu/lal_lj_expand_ext.cpp index a9c791803b..603e425d3f 100644 --- a/lib/gpu/lal_lj_expand_ext.cpp +++ b/lib/gpu/lal_lj_expand_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_expand.h" diff --git a/lib/gpu/lal_lj_ext.cpp b/lib/gpu/lal_lj_ext.cpp index 8124556d40..124cf46c8c 100644 --- a/lib/gpu/lal_lj_ext.cpp +++ b/lib/gpu/lal_lj_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj.h" diff --git a/lib/gpu/lal_lj_gromacs_ext.cpp b/lib/gpu/lal_lj_gromacs_ext.cpp index 53b93bfdff..99d32ab09a 100644 --- a/lib/gpu/lal_lj_gromacs_ext.cpp +++ b/lib/gpu/lal_lj_gromacs_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_gromacs.h" diff --git a/lib/gpu/lal_lj_sdk_ext.cpp b/lib/gpu/lal_lj_sdk_ext.cpp index 386106161e..de0c5fef4f 100644 --- a/lib/gpu/lal_lj_sdk_ext.cpp +++ b/lib/gpu/lal_lj_sdk_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_sdk.h" diff --git a/lib/gpu/lal_lj_sdk_long_ext.cpp b/lib/gpu/lal_lj_sdk_long_ext.cpp index 08390d3eeb..f293487282 100644 --- a/lib/gpu/lal_lj_sdk_long_ext.cpp +++ b/lib/gpu/lal_lj_sdk_long_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_lj_sdk_long.h" diff --git a/lib/gpu/lal_mie_ext.cpp b/lib/gpu/lal_mie_ext.cpp index 9b03903c4f..f612de4336 100644 --- a/lib/gpu/lal_mie_ext.cpp +++ b/lib/gpu/lal_mie_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_mie.h" diff --git a/lib/gpu/lal_morse_ext.cpp b/lib/gpu/lal_morse_ext.cpp index 0338bc07a8..3b62d10305 100644 --- a/lib/gpu/lal_morse_ext.cpp +++ b/lib/gpu/lal_morse_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_morse.h" diff --git a/lib/gpu/lal_neighbor.cpp b/lib/gpu/lal_neighbor.cpp index 0a9933a6c0..04e08c3e9c 100644 --- a/lib/gpu/lal_neighbor.cpp +++ b/lib/gpu/lal_neighbor.cpp @@ -17,7 +17,7 @@ #include "lal_precision.h" #include "lal_neighbor.h" #include "lal_device.h" -#include "math.h" +#include using namespace LAMMPS_AL; int Neighbor::bytes_per_atom(const int max_nbors) const { diff --git a/lib/gpu/lal_pppm_ext.cpp b/lib/gpu/lal_pppm_ext.cpp index 7e07d6c87b..a75536eb19 100644 --- a/lib/gpu/lal_pppm_ext.cpp +++ b/lib/gpu/lal_pppm_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_pppm.h" diff --git a/lib/gpu/lal_re_squared_ext.cpp b/lib/gpu/lal_re_squared_ext.cpp index b719dfe05f..e1eb8a45b0 100644 --- a/lib/gpu/lal_re_squared_ext.cpp +++ b/lib/gpu/lal_re_squared_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_re_squared.h" diff --git a/lib/gpu/lal_soft_ext.cpp b/lib/gpu/lal_soft_ext.cpp index d3b3fa2598..7c0cbe7973 100644 --- a/lib/gpu/lal_soft_ext.cpp +++ b/lib/gpu/lal_soft_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_soft.h" diff --git a/lib/gpu/lal_sw_ext.cpp b/lib/gpu/lal_sw_ext.cpp index 4959650c90..1935ed615b 100644 --- a/lib/gpu/lal_sw_ext.cpp +++ b/lib/gpu/lal_sw_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_sw.h" diff --git a/lib/gpu/lal_table_ext.cpp b/lib/gpu/lal_table_ext.cpp index a2b5c61e74..f067881b88 100644 --- a/lib/gpu/lal_table_ext.cpp +++ b/lib/gpu/lal_table_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_table.h" diff --git a/lib/gpu/lal_tersoff_ext.cpp b/lib/gpu/lal_tersoff_ext.cpp index e6dc539035..749842864f 100644 --- a/lib/gpu/lal_tersoff_ext.cpp +++ b/lib/gpu/lal_tersoff_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_tersoff.h" diff --git a/lib/gpu/lal_tersoff_mod_ext.cpp b/lib/gpu/lal_tersoff_mod_ext.cpp index 7f0af3fce9..cce9df8713 100644 --- a/lib/gpu/lal_tersoff_mod_ext.cpp +++ b/lib/gpu/lal_tersoff_mod_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_tersoff_mod.h" diff --git a/lib/gpu/lal_tersoff_zbl_ext.cpp b/lib/gpu/lal_tersoff_zbl_ext.cpp index ccfcf6839d..d1a9e090b6 100644 --- a/lib/gpu/lal_tersoff_zbl_ext.cpp +++ b/lib/gpu/lal_tersoff_zbl_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_tersoff_zbl.h" diff --git a/lib/gpu/lal_ufm_ext.cpp b/lib/gpu/lal_ufm_ext.cpp index ae4a5fb8fc..dd476ec3fa 100644 --- a/lib/gpu/lal_ufm_ext.cpp +++ b/lib/gpu/lal_ufm_ext.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include "lal_ufm.h" diff --git a/lib/gpu/lal_vashishta_ext.cpp b/lib/gpu/lal_vashishta_ext.cpp index 22f530a7ed..56dfd8a0ff 100644 --- a/lib/gpu/lal_vashishta_ext.cpp +++ b/lib/gpu/lal_vashishta_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_vashishta.h" using namespace LAMMPS_AL; diff --git a/lib/gpu/lal_yukawa_colloid_ext.cpp b/lib/gpu/lal_yukawa_colloid_ext.cpp index e2b0354d10..988d33bdd6 100644 --- a/lib/gpu/lal_yukawa_colloid_ext.cpp +++ b/lib/gpu/lal_yukawa_colloid_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_yukawa_colloid.h" diff --git a/lib/gpu/lal_yukawa_ext.cpp b/lib/gpu/lal_yukawa_ext.cpp index 9d38387bc1..995694bdfd 100644 --- a/lib/gpu/lal_yukawa_ext.cpp +++ b/lib/gpu/lal_yukawa_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_yukawa.h" diff --git a/lib/gpu/lal_zbl_ext.cpp b/lib/gpu/lal_zbl_ext.cpp index 37aa74351b..f15e814a50 100644 --- a/lib/gpu/lal_zbl_ext.cpp +++ b/lib/gpu/lal_zbl_ext.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include "lal_zbl.h" From f4d14c96e81fbca047de33839c866eb6a90305c3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:29:56 -0400 Subject: [PATCH 09/22] convert poems lib to use c++-style header includes --- lib/poems/eulerparameters.cpp | 2 +- lib/poems/matrixfun.cpp | 2 +- lib/poems/system.cpp | 2 +- lib/poems/system.h | 2 +- lib/poems/workspace.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/poems/eulerparameters.cpp b/lib/poems/eulerparameters.cpp index 61fcc5fcc2..032bc7da82 100644 --- a/lib/poems/eulerparameters.cpp +++ b/lib/poems/eulerparameters.cpp @@ -16,7 +16,7 @@ *_________________________________________________________________________*/ #include "eulerparameters.h" -#include "math.h" +#include using namespace std; diff --git a/lib/poems/matrixfun.cpp b/lib/poems/matrixfun.cpp index 8478443645..d193114679 100644 --- a/lib/poems/matrixfun.cpp +++ b/lib/poems/matrixfun.cpp @@ -16,7 +16,7 @@ *_________________________________________________________________________*/ #include "matrixfun.h" -#include +#include #include "fastmatrixops.h" #include diff --git a/lib/poems/system.cpp b/lib/poems/system.cpp index d3702a6440..369213f7d0 100644 --- a/lib/poems/system.cpp +++ b/lib/poems/system.cpp @@ -19,7 +19,7 @@ #include "system.h" #include "body.h" #include "joint.h" -#include +#include System::System(){ diff --git a/lib/poems/system.h b/lib/poems/system.h index 39c1f518b3..1b59395de7 100644 --- a/lib/poems/system.h +++ b/lib/poems/system.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include "poemslist.h" diff --git a/lib/poems/workspace.h b/lib/poems/workspace.h index 83af077832..5faaf904dc 100644 --- a/lib/poems/workspace.h +++ b/lib/poems/workspace.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include From 318dfd0613a245f3eab153e00e205a8ebedb685c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:32:49 -0400 Subject: [PATCH 10/22] correct indentation --- lib/poems/fastmatrixops.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/poems/fastmatrixops.cpp b/lib/poems/fastmatrixops.cpp index f65536ea68..782381a706 100644 --- a/lib/poems/fastmatrixops.cpp +++ b/lib/poems/fastmatrixops.cpp @@ -262,7 +262,7 @@ void FastLU(Matrix& A, Matrix& LU, int *indx){ // LU is the LU decomposition of for (j=0;j big) big=temp; - } + } vv[i]=1.0/big; } for (j=0;j= big) { + LU.rows[i][j]=sum; + if ((dum=vv[i]*fabs(sum)) >= big) { big=dum; imax=i; } @@ -311,7 +311,7 @@ void FastLU(Mat3x3& A, Mat3x3& LU, int *indx){ // LU is the LU decomposition of for (j=0;j<3;j++){ temp=fabs(LU.BasicGet(i,j)); if (temp > big) big=temp; - } + } vv[i]=1.0/big; } for (j=0;j<3;j++){ @@ -325,8 +325,8 @@ void FastLU(Mat3x3& A, Mat3x3& LU, int *indx){ // LU is the LU decomposition of sum=LU.BasicGet(i,j); for (k=0;k= big) { + LU.BasicSet(i,j,sum); + if ((dum=vv[i]*fabs(sum)) >= big) { big=dum; imax=i; } @@ -373,8 +373,8 @@ void FastLU(Mat4x4& A, Mat4x4& LU, int *indx){ // LU is the LU decomposition of sum=LU.BasicGet(i,j); for (k=0;k= big) { + LU.BasicSet(i,j,sum); + if ((dum=vv[i]*fabs(sum)) >= big) { big=dum; imax=i; } @@ -421,8 +421,8 @@ void FastLU(Mat6x6& A, Mat6x6& LU, int *indx){ // LU is the LU decomposition of sum=LU.BasicGet(i,j); for (k=0;k= big) { + LU.BasicSet(i,j,sum); + if ((dum=vv[i]*fabs(sum)) >= big) { big=dum; imax=i; } @@ -1030,4 +1030,3 @@ void FastAssignT(Mat4x4& A, Mat4x4& C){ C.elements[2][3] = A.elements[3][2]; C.elements[3][2] = A.elements[2][3]; } - From c9817b0db99a36c9264c1e444b03573dade2d092 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:33:27 -0400 Subject: [PATCH 11/22] update src/.gitignore --- src/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/.gitignore b/src/.gitignore index 1ff66859e8..3e06a33580 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -272,6 +272,8 @@ /compute_pe_tally.h /compute_plasticity_atom.cpp /compute_plasticity_atom.h +/compute_pressure_bocs.cpp +/compute_pressure_bocs.h /compute_pressure_grem.cpp /compute_pressure_grem.h /compute_rigid_local.cpp @@ -370,6 +372,8 @@ /fix_atc.h /fix_ave_correlate_long.cpp /fix_ave_correlate_long.h +/fix_bocs.cpp +/fix_bocs.h /fix_bond_break.cpp /fix_bond_break.h /fix_bond_create.cpp From e7e1827e573e70c2014d34a9ffa7c91fdb55b89f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:48:53 -0400 Subject: [PATCH 12/22] remove variable length arrays in gpu lib --- lib/gpu/geryon/ocl_device.h | 7 ++++--- lib/gpu/geryon/ocl_kernel.h | 5 +++-- lib/gpu/geryon/ocl_memory.h | 3 ++- lib/gpu/lal_device.cpp | 3 ++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/gpu/geryon/ocl_device.h b/lib/gpu/geryon/ocl_device.h index 138b03c091..584d04e616 100644 --- a/lib/gpu/geryon/ocl_device.h +++ b/lib/gpu/geryon/ocl_device.h @@ -353,7 +353,7 @@ int UCL_Device::set_platform(int pid) { _num_devices=0; return UCL_ERROR; } - cl_device_id device_list[_num_devices]; + cl_device_id *device_list = new cl_device_id[_num_devices]; CL_SAFE_CALL(clGetDeviceIDs(_cl_platform,CL_DEVICE_TYPE_ALL,n,device_list, &n)); @@ -362,7 +362,7 @@ int UCL_Device::set_platform(int pid) { _cl_devices.push_back(device_list[i]); add_properties(device_list[i]); } - + delete[] device_list; return UCL_SUCCESS; } @@ -518,13 +518,14 @@ int UCL_Device::device_type(const int i) { int UCL_Device::set(int num) { clear(); - cl_device_id device_list[_num_devices]; + cl_device_id *device_list = new cl_device_id[_num_devices]; cl_uint n; CL_SAFE_CALL(clGetDeviceIDs(_cl_platform,CL_DEVICE_TYPE_ALL,_num_devices, device_list,&n)); _device=num; _cl_device=device_list[_device]; + delete[] device_list; return create_context(); } diff --git a/lib/gpu/geryon/ocl_kernel.h b/lib/gpu/geryon/ocl_kernel.h index e4c37b2a77..b65049b9e6 100644 --- a/lib/gpu/geryon/ocl_kernel.h +++ b/lib/gpu/geryon/ocl_kernel.h @@ -111,7 +111,7 @@ class UCL_Program { size_t ms; CL_SAFE_CALL(clGetProgramBuildInfo(_program,_device,CL_PROGRAM_BUILD_LOG,0, NULL, &ms)); - char build_log[ms]; + char *build_log = new char[ms]; CL_SAFE_CALL(clGetProgramBuildInfo(_program,_device,CL_PROGRAM_BUILD_LOG,ms, build_log, NULL)); @@ -127,8 +127,9 @@ class UCL_Program { << "----------------------------------------------------------\n"; std::cerr << build_log << std::endl; #endif + delete[] build_log; return UCL_COMPILE_ERROR; - } + } else delete[] build_log; } return UCL_SUCCESS; diff --git a/lib/gpu/geryon/ocl_memory.h b/lib/gpu/geryon/ocl_memory.h index 28bb88941f..9692f4dd7b 100644 --- a/lib/gpu/geryon/ocl_memory.h +++ b/lib/gpu/geryon/ocl_memory.h @@ -407,7 +407,7 @@ inline void _ocl_build(cl_program &program, cl_device_id &device, size_t ms; CL_SAFE_CALL(clGetProgramBuildInfo(program, device,CL_PROGRAM_BUILD_LOG, 0, NULL, &ms)); - char build_log[ms]; + char *build_log = new char[ms]; CL_SAFE_CALL(clGetProgramBuildInfo(program,device,CL_PROGRAM_BUILD_LOG,ms, build_log, NULL)); @@ -416,6 +416,7 @@ inline void _ocl_build(cl_program &program, cl_device_id &device, << " Error compiling OpenCL Program...\n" << "----------------------------------------------------------\n"; std::cerr << build_log << std::endl; + delete[] build_log; } inline void _ocl_kernel_from_source(cl_context &context, cl_device_id &device, diff --git a/lib/gpu/lal_device.cpp b/lib/gpu/lal_device.cpp index 25f1cea7d4..c58b484e4e 100644 --- a/lib/gpu/lal_device.cpp +++ b/lib/gpu/lal_device.cpp @@ -78,7 +78,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int first_gpu, // Get the names of all nodes int name_length; char node_name[MPI_MAX_PROCESSOR_NAME]; - char node_names[MPI_MAX_PROCESSOR_NAME*_world_size]; + char *node_names = new char[MPI_MAX_PROCESSOR_NAME*_world_size]; MPI_Get_processor_name(node_name,&name_length); MPI_Allgather(&node_name,MPI_MAX_PROCESSOR_NAME,MPI_CHAR,&node_names, MPI_MAX_PROCESSOR_NAME,MPI_CHAR,_comm_world); @@ -104,6 +104,7 @@ int DeviceT::init_device(MPI_Comm world, MPI_Comm replica, const int first_gpu, split_id=split_num; split_num++; } + delete[] node_names; // Set up a per node communicator and find rank within MPI_Comm node_comm; From fccc16f42ca00aee745a6d6833b10e3072b7fa77 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 00:50:23 -0400 Subject: [PATCH 13/22] tune OpenCL for generic architecture by default --- lib/gpu/Makefile.linux_opencl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gpu/Makefile.linux_opencl b/lib/gpu/Makefile.linux_opencl index e635890778..640562dca5 100644 --- a/lib/gpu/Makefile.linux_opencl +++ b/lib/gpu/Makefile.linux_opencl @@ -6,10 +6,10 @@ EXTRAMAKE = Makefile.lammps.opencl -OCL_TUNE = -DFERMI_OCL # -- Uncomment for NVIDIA Fermi +# OCL_TUNE = -DFERMI_OCL # -- Uncomment for NVIDIA Fermi # OCL_TUNE = -DKEPLER_OCL # -- Uncomment for NVIDIA Kepler # OCL_TUNE = -DCYPRESS_OCL # -- Uncomment for AMD Cypress -# OCL_TUNE = -DGENERIC_OCL # -- Uncomment for generic device +OCL_TUNE = -DGENERIC_OCL # -- Uncomment for generic device # this setting should match LAMMPS Makefile # one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL From 69605295942797b0a9d1474f4a563b34ae845a5f Mon Sep 17 00:00:00 2001 From: robeme Date: Tue, 8 May 2018 10:02:10 +0200 Subject: [PATCH 14/22] set appropriate flags for computing a vector in constructor of fix restrain --- src/fix_restrain.cpp | 28 +++++++++++++++++++++++++--- src/fix_restrain.h | 2 ++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 09cb8946e5..80775e0283 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -53,6 +53,9 @@ FixRestrain::FixRestrain(LAMMPS *lmp, int narg, char **arg) : scalar_flag = 1; global_freq = 1; extscalar = 1; + vector_flag = 1; + size_vector = 3; + extvector = 1; respa_level_support = 1; ilevel_respa = 0; @@ -188,6 +191,10 @@ void FixRestrain::min_setup(int vflag) void FixRestrain::post_force(int vflag) { energy = 0.0; + + ebond = 0.0; + eangle = 0.0; + edihed = 0.0; for (int m = 0; m < nrestrain; m++) if (rstyle[m] == BOND) restrain_bond(m); @@ -271,7 +278,8 @@ void FixRestrain::restrain_bond(int m) if (r > 0.0) fbond = -2.0*rk/r; else fbond = 0.0; - energy += rk*dr; + ebond += rk*dr; + energy += ebond; // apply force to each of 2 atoms @@ -378,7 +386,8 @@ void FixRestrain::restrain_angle(int m) dtheta = acos(c) - target[m]; tk = k * dtheta; - energy += tk*dtheta; + eangle += tk*dtheta; + energy += eangle; a = -2.0 * tk * s; a11 = a*c / rsq1; @@ -558,7 +567,8 @@ void FixRestrain::restrain_dihedral(int m) df1 *= -mult[m]; p += 1.0; - energy += k * p; + edihed += k * p; + energy += edihed; fg = vb1x*vb2xm + vb1y*vb2ym + vb1z*vb2zm; hg = vb3x*vb2xm + vb3y*vb2ym + vb3z*vb2zm; @@ -635,3 +645,15 @@ double FixRestrain::compute_scalar() MPI_Allreduce(&energy,&energy_all,1,MPI_DOUBLE,MPI_SUM,world); return energy_all; } + +/* ---------------------------------------------------------------------- + return individual energy contributions +------------------------------------------------------------------------- */ + +double FixRestrain::compute_vector(int n) +{ + if (n == 0) return ebond; + if (n == 1) return eangle; + if (n == 2) return edihed; + return 0.0; +} diff --git a/src/fix_restrain.h b/src/fix_restrain.h index 14699ed5af..c956e40982 100644 --- a/src/fix_restrain.h +++ b/src/fix_restrain.h @@ -36,6 +36,7 @@ class FixRestrain : public Fix { void post_force_respa(int, int, int); void min_post_force(int); double compute_scalar(); + double compute_vector(int); private: int ilevel_respa; @@ -46,6 +47,7 @@ class FixRestrain : public Fix { double *kstart,*kstop,*target; double *cos_target,*sin_target; double energy,energy_all; + double ebond,eangle,edihed; void restrain_bond(int); void restrain_angle(int); From 53fc9f1f0ffb6aeada893aff4d50e060b167891e Mon Sep 17 00:00:00 2001 From: robeme Date: Tue, 8 May 2018 10:11:00 +0200 Subject: [PATCH 15/22] updated doc for new fix restrain output --- doc/src/fix_restrain.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/src/fix_restrain.txt b/doc/src/fix_restrain.txt index 1a7c7b6ba5..6d3e20bdea 100644 --- a/doc/src/fix_restrain.txt +++ b/doc/src/fix_restrain.txt @@ -187,10 +187,16 @@ added forces to be included in the total potential energy of the system (the quantity being minimized), you MUST enable the "fix_modify"_fix_modify.html {energy} option for this fix. -This fix computes a global scalar, which can be accessed by various -"output commands"_Section_howto.html#howto_15. The scalar is the -potential energy for all the restraints as discussed above. The scalar -value calculated by this fix is "extensive". +This fix computes a global scalar and vector of length 3, which can be +accessed by various "output commands"_Section_howto.html#howto_15. The +scalar is the potential energy for all the restraints as discussed above. +The vector values are the following global quantities: + +1 = bond energy +2 = angle energy +3 = dihedral energy :ul + +The scalar and vector values calculated by this fix are "extensive". No parameter of this fix can be used with the {start/stop} keywords of the "run"_run.html command. From 16697fc4cb7d72de38442d552a9026586f2cf526 Mon Sep 17 00:00:00 2001 From: robeme Date: Tue, 8 May 2018 10:46:41 +0200 Subject: [PATCH 16/22] forgot to reduce energies --- src/fix_restrain.cpp | 16 ++++++++++++---- src/fix_restrain.h | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 80775e0283..4c0d3e4a29 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -652,8 +652,16 @@ double FixRestrain::compute_scalar() double FixRestrain::compute_vector(int n) { - if (n == 0) return ebond; - if (n == 1) return eangle; - if (n == 2) return edihed; - return 0.0; + if (n == 0) { + MPI_Allreduce(&ebond,&ebond_all,1,MPI_DOUBLE,MPI_SUM,world); + return ebond_all; + } else if (n == 1) { + MPI_Allreduce(&eangle,&eangle_all,1,MPI_DOUBLE,MPI_SUM,world); + return eangle_all; + } else if (n == 2) { + MPI_Allreduce(&edihed,&edihed_all,1,MPI_DOUBLE,MPI_SUM,world); + return edihed_all; + } else { + return 0.0; + } } diff --git a/src/fix_restrain.h b/src/fix_restrain.h index c956e40982..4572905d46 100644 --- a/src/fix_restrain.h +++ b/src/fix_restrain.h @@ -47,7 +47,9 @@ class FixRestrain : public Fix { double *kstart,*kstop,*target; double *cos_target,*sin_target; double energy,energy_all; - double ebond,eangle,edihed; + double ebond,ebond_all; + double eangle,eangle_all; + double edihed,edihed_all; void restrain_bond(int); void restrain_angle(int); From 8705ea9fc5db9edf0231f8e682b040effbf05a1e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 08:49:05 -0400 Subject: [PATCH 17/22] replace pointless use of strncat() emulating strcat() with plain strcat() --- src/USER-DPD/fix_rx.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/USER-DPD/fix_rx.cpp b/src/USER-DPD/fix_rx.cpp index c370f8abe6..be78989bb5 100644 --- a/src/USER-DPD/fix_rx.cpp +++ b/src/USER-DPD/fix_rx.cpp @@ -361,9 +361,9 @@ void FixRX::post_constructor() for(int ii=0; ii Date: Tue, 8 May 2018 15:33:42 -0400 Subject: [PATCH 18/22] Make the description of global properties more explicit --- doc/src/fix_restrain.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/fix_restrain.txt b/doc/src/fix_restrain.txt index 6d3e20bdea..9de63defb7 100644 --- a/doc/src/fix_restrain.txt +++ b/doc/src/fix_restrain.txt @@ -187,10 +187,11 @@ added forces to be included in the total potential energy of the system (the quantity being minimized), you MUST enable the "fix_modify"_fix_modify.html {energy} option for this fix. -This fix computes a global scalar and vector of length 3, which can be -accessed by various "output commands"_Section_howto.html#howto_15. The -scalar is the potential energy for all the restraints as discussed above. -The vector values are the following global quantities: +This fix computes a global scalar and a global vector of length 3, which +can be accessed by various "output commands"_Section_howto.html#howto_15. +The scalar is the total potential energy for {all} the restraints as +discussed above. The vector values are the sum of contributions to the +following individual categories: 1 = bond energy 2 = angle energy From b4e5828a6085dcc4f54d7595b914ba6e14224d7d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 8 May 2018 15:36:32 -0400 Subject: [PATCH 19/22] Update fix_restrain.cpp --- src/fix_restrain.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 4c0d3e4a29..6ad229fea7 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -279,7 +279,7 @@ void FixRestrain::restrain_bond(int m) else fbond = 0.0; ebond += rk*dr; - energy += ebond; + energy += rk*dr; // apply force to each of 2 atoms @@ -387,7 +387,7 @@ void FixRestrain::restrain_angle(int m) tk = k * dtheta; eangle += tk*dtheta; - energy += eangle; + energy += tk*dtheta; a = -2.0 * tk * s; a11 = a*c / rsq1; @@ -568,7 +568,7 @@ void FixRestrain::restrain_dihedral(int m) p += 1.0; edihed += k * p; - energy += edihed; + energy += k * p; fg = vb1x*vb2xm + vb1y*vb2ym + vb1z*vb2zm; hg = vb3x*vb2xm + vb3y*vb2ym + vb3z*vb2zm; From 793260f22749ecb96fedfd5dff788e70e150cf15 Mon Sep 17 00:00:00 2001 From: "Steven J. Plimpton" Date: Wed, 9 May 2018 11:47:57 -0600 Subject: [PATCH 20/22] consistency tweak to package LATTE Install.sh file --- src/LATTE/Install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LATTE/Install.sh b/src/LATTE/Install.sh index d034774e7a..73f8bc24cb 100644 --- a/src/LATTE/Install.sh +++ b/src/LATTE/Install.sh @@ -29,7 +29,7 @@ action () { # all package files with no dependencies for file in *.cpp *.h; do - action $file + test -f ${file} && action $file done # edit 2 Makefile.package files to include/exclude package info From 8697cac6aaac72da9231d4021cde7fe32d0b4376 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 9 May 2018 16:06:37 -0400 Subject: [PATCH 21/22] make QEQ package depend on MANYBODY the qeq/fire style depends on pair style comb, thus QEQ needs and explicit Install.sh file and it has to depend on MANYBODY --- src/Depend.sh | 1 + src/QEQ/Install.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/QEQ/Install.sh diff --git a/src/Depend.sh b/src/Depend.sh index 9fe30e6583..b6d9c70f13 100644 --- a/src/Depend.sh +++ b/src/Depend.sh @@ -87,6 +87,7 @@ if (test $1 = "MANYBODY") then depend GPU depend KOKKOS depend OPT + depend QEQ depend USER-MISC depend USER-OMP fi diff --git a/src/QEQ/Install.sh b/src/QEQ/Install.sh new file mode 100644 index 0000000000..334be24e4b --- /dev/null +++ b/src/QEQ/Install.sh @@ -0,0 +1,46 @@ +# Install/unInstall package files in LAMMPS +# mode = 0/1/2 for uninstall/install/update + +# this is default Install.sh for all packages +# if package has an auxiliary library or a file with a dependency, +# then package dir has its own customized Install.sh + +mode=$1 + +# enforce using portable C locale +LC_ALL=C +export LC_ALL + +# arg1 = file, arg2 = file it depends on + +action () { + if (test $mode = 0) then + rm -f ../$1 + elif (! cmp -s $1 ../$1) then + if (test -z "$2" || test -e ../$2) then + cp $1 .. + if (test $mode = 2) then + echo " updating src/$1" + fi + fi + elif (test -n "$2") then + if (test ! -e ../$2) then + rm -f ../$1 + fi + fi +} + +# all package files with dependencies + +action fix_qeq.cpp +action fix_qeq.h +action fix_qeq_dynamic.cpp +action fix_qeq_dynamic.h +action fix_qeq_fire.cpp pair_comb.h +action fix_qeq_fire.h pair_comb.h +action fix_qeq_point.cpp +action fix_qeq_point.h +action fix_qeq_shielded.cpp +action fix_qeq_shielded.h +action fix_qeq_slater.cpp +action fix_qeq_slater.h From a7a83b118d90e42f4986deb4e35830968b8d3f4a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 9 May 2018 16:13:54 -0400 Subject: [PATCH 22/22] update dependencies for USER-CGSDK package. make script permissions consistent --- src/COMPRESS/Install.sh | 0 src/CORESHELL/Install.sh | 0 src/Depend.sh | 3 +-- src/GPU/Install.sh | 0 src/Install.sh | 0 src/KIM/Install.sh | 0 src/KOKKOS/Install.sh | 0 src/LATTE/Install.sh | 0 src/MEAM/Install.sh | 0 src/MPIIO/Install.sh | 0 src/Make.sh | 0 src/OPT/Install.sh | 0 src/POEMS/Install.sh | 0 src/Package.sh | 0 src/QEQ/Install.sh | 0 src/REAX/Install.sh | 0 src/USER-AWPMD/Install.sh | 0 src/USER-CGDNA/Install.sh | 0 src/USER-CGSDK/Install.sh | 4 ++-- src/USER-FEP/Install.sh | 0 src/USER-H5MD/Install.sh | 0 src/USER-INTEL/Install.sh | 0 src/USER-MISC/Install.sh | 0 src/USER-MOLFILE/Install.sh | 0 src/USER-NETCDF/Install.sh | 0 src/USER-OMP/Install.sh | 0 src/USER-OMP/hack_openmp_for_pgi.sh | 0 src/USER-PHONON/Install.sh | 0 src/USER-QUIP/Install.sh | 0 src/USER-SMD/Install.sh | 0 src/USER-VTK/Install.sh | 0 31 files changed, 3 insertions(+), 4 deletions(-) mode change 100644 => 100755 src/COMPRESS/Install.sh mode change 100644 => 100755 src/CORESHELL/Install.sh mode change 100644 => 100755 src/Depend.sh mode change 100644 => 100755 src/GPU/Install.sh mode change 100644 => 100755 src/Install.sh mode change 100644 => 100755 src/KIM/Install.sh mode change 100644 => 100755 src/KOKKOS/Install.sh mode change 100644 => 100755 src/LATTE/Install.sh mode change 100644 => 100755 src/MEAM/Install.sh mode change 100644 => 100755 src/MPIIO/Install.sh mode change 100644 => 100755 src/Make.sh mode change 100644 => 100755 src/OPT/Install.sh mode change 100644 => 100755 src/POEMS/Install.sh mode change 100644 => 100755 src/Package.sh mode change 100644 => 100755 src/QEQ/Install.sh mode change 100644 => 100755 src/REAX/Install.sh mode change 100644 => 100755 src/USER-AWPMD/Install.sh mode change 100644 => 100755 src/USER-CGDNA/Install.sh mode change 100644 => 100755 src/USER-CGSDK/Install.sh mode change 100644 => 100755 src/USER-FEP/Install.sh mode change 100644 => 100755 src/USER-H5MD/Install.sh mode change 100644 => 100755 src/USER-INTEL/Install.sh mode change 100644 => 100755 src/USER-MISC/Install.sh mode change 100644 => 100755 src/USER-MOLFILE/Install.sh mode change 100644 => 100755 src/USER-NETCDF/Install.sh mode change 100644 => 100755 src/USER-OMP/Install.sh mode change 100644 => 100755 src/USER-OMP/hack_openmp_for_pgi.sh mode change 100644 => 100755 src/USER-PHONON/Install.sh mode change 100644 => 100755 src/USER-QUIP/Install.sh mode change 100644 => 100755 src/USER-SMD/Install.sh mode change 100644 => 100755 src/USER-VTK/Install.sh diff --git a/src/COMPRESS/Install.sh b/src/COMPRESS/Install.sh old mode 100644 new mode 100755 diff --git a/src/CORESHELL/Install.sh b/src/CORESHELL/Install.sh old mode 100644 new mode 100755 diff --git a/src/Depend.sh b/src/Depend.sh old mode 100644 new mode 100755 index b6d9c70f13..a3f4e49667 --- a/src/Depend.sh +++ b/src/Depend.sh @@ -96,9 +96,8 @@ if (test $1 = "MOLECULE") then depend GPU depend KOKKOS depend USER-MISC - depend USER-OMP depend USER-FEP - depend USER-CGDNA + depend USER-OMP depend USER-INTEL fi diff --git a/src/GPU/Install.sh b/src/GPU/Install.sh old mode 100644 new mode 100755 diff --git a/src/Install.sh b/src/Install.sh old mode 100644 new mode 100755 diff --git a/src/KIM/Install.sh b/src/KIM/Install.sh old mode 100644 new mode 100755 diff --git a/src/KOKKOS/Install.sh b/src/KOKKOS/Install.sh old mode 100644 new mode 100755 diff --git a/src/LATTE/Install.sh b/src/LATTE/Install.sh old mode 100644 new mode 100755 diff --git a/src/MEAM/Install.sh b/src/MEAM/Install.sh old mode 100644 new mode 100755 diff --git a/src/MPIIO/Install.sh b/src/MPIIO/Install.sh old mode 100644 new mode 100755 diff --git a/src/Make.sh b/src/Make.sh old mode 100644 new mode 100755 diff --git a/src/OPT/Install.sh b/src/OPT/Install.sh old mode 100644 new mode 100755 diff --git a/src/POEMS/Install.sh b/src/POEMS/Install.sh old mode 100644 new mode 100755 diff --git a/src/Package.sh b/src/Package.sh old mode 100644 new mode 100755 diff --git a/src/QEQ/Install.sh b/src/QEQ/Install.sh old mode 100644 new mode 100755 diff --git a/src/REAX/Install.sh b/src/REAX/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-AWPMD/Install.sh b/src/USER-AWPMD/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-CGDNA/Install.sh b/src/USER-CGDNA/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-CGSDK/Install.sh b/src/USER-CGSDK/Install.sh old mode 100644 new mode 100755 index 00f515b794..8e2432343d --- a/src/USER-CGSDK/Install.sh +++ b/src/USER-CGSDK/Install.sh @@ -28,8 +28,8 @@ action () { # list of files with optional dependcies -action angle_sdk.cpp angle_harmonic.cpp -action angle_sdk.h angle_harmonic.cpp +action angle_sdk.cpp +action angle_sdk.h action lj_sdk_common.h action pair_lj_sdk.cpp action pair_lj_sdk.h diff --git a/src/USER-FEP/Install.sh b/src/USER-FEP/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-H5MD/Install.sh b/src/USER-H5MD/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-INTEL/Install.sh b/src/USER-INTEL/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-MISC/Install.sh b/src/USER-MISC/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-MOLFILE/Install.sh b/src/USER-MOLFILE/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-NETCDF/Install.sh b/src/USER-NETCDF/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-OMP/Install.sh b/src/USER-OMP/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-OMP/hack_openmp_for_pgi.sh b/src/USER-OMP/hack_openmp_for_pgi.sh old mode 100644 new mode 100755 diff --git a/src/USER-PHONON/Install.sh b/src/USER-PHONON/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-QUIP/Install.sh b/src/USER-QUIP/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-SMD/Install.sh b/src/USER-SMD/Install.sh old mode 100644 new mode 100755 diff --git a/src/USER-VTK/Install.sh b/src/USER-VTK/Install.sh old mode 100644 new mode 100755