diff --git a/lib/atc/LammpsInterface.cpp b/lib/atc/LammpsInterface.cpp index 4959ce085..a6a054b06 100644 --- a/lib/atc/LammpsInterface.cpp +++ b/lib/atc/LammpsInterface.cpp @@ -1,670 +1,671 @@ // Header file for this class #include "LammpsInterface.h" // LAMMPS includes #include "lammps.h" +#include "lmptype.h" #include "atom.h" // x, v, f #include "domain.h" // for basing locations on regions #include "region.h" // region bounding box and style #include "force.h" // boltzman constant #include "group.h" // atom masks #include "memory.h" // grow atom information #include "compute.h" // computes #include "modify.h" // #include "neighbor.h" // neighbors #include "neigh_list.h" // neighbor list #include "update.h" // timestepping information #include "pair.h" // pair potentials #include "lattice.h" // lattice parameters #include "comm.h" // // ATC includes #include "ATC_Error.h" #include "MatrixLibrary.h" // Other include files #include "mpi.h" #include namespace ATC { LammpsInterface * LammpsInterface::myInstance_ = NULL; // ----------------------------------------------------------------- // instance() // ----------------------------------------------------------------- LammpsInterface * LammpsInterface::instance() { if (myInstance_ == NULL) { myInstance_ = new LammpsInterface(); } return myInstance_; } // ----------------------------------------------------------------- // constructor // ----------------------------------------------------------------- LammpsInterface::LammpsInterface() : lammps_(NULL), atomPE_(NULL), commRank_(0) { } // ----------------------------------------------------------------- // general interface methods // ----------------------------------------------------------------- MPI_Comm LammpsInterface::world() { return lammps_->world; } // ----------------------------------------------------------------- // atom interface methods // ----------------------------------------------------------------- int LammpsInterface::nlocal() { return lammps_->atom->nlocal; } int LammpsInterface::nghost() { return lammps_->atom->nghost; } double LammpsInterface::natoms() { return lammps_->atom->natoms; } int LammpsInterface::nmax() { return lammps_->atom->nmax; } int LammpsInterface::ntypes() { return lammps_->atom->ntypes; } double ** LammpsInterface::xatom() { return lammps_->atom->x; } const double ** LammpsInterface::xatom() const { return (const double**)(lammps_->atom->x); } double ** LammpsInterface::vatom() { return lammps_->atom->v; } double ** LammpsInterface::fatom() { return lammps_->atom->f; } int * LammpsInterface::atom_mask() { return lammps_->atom->mask; } int * LammpsInterface::atom_type() { return lammps_->atom->type; } int * LammpsInterface::atom_tag() { return lammps_->atom->tag; } double * LammpsInterface::atom_mass() { return lammps_->atom->mass; } double LammpsInterface::atom_mass(int iType) { return lammps_->atom->mass[iType]; } double * LammpsInterface::atom_rmass() { return lammps_->atom->rmass; } double * LammpsInterface::atom_charge() { return lammps_->atom->q; } // ----------------------------------------------------------------- // domain interface methods // ----------------------------------------------------------------- int LammpsInterface::dimension() { return lammps_->domain->dimension; } int LammpsInterface::nregion() { return lammps_->domain->nregion; } void LammpsInterface::get_box_bounds(double & boxxlo, double & boxxhi, double & boxylo, double & boxyhi, double & boxzlo, double &boxzhi) { if (lammps_->domain->triclinic == 0) { boxxlo = lammps_->domain->boxlo[0]; boxxhi = lammps_->domain->boxhi[0]; boxylo = lammps_->domain->boxlo[1]; boxyhi = lammps_->domain->boxhi[1]; boxzlo = lammps_->domain->boxlo[2]; boxzhi = lammps_->domain->boxhi[2]; } else { boxxlo = lammps_->domain->boxlo_bound[0]; boxxhi = lammps_->domain->boxhi_bound[0]; boxylo = lammps_->domain->boxlo_bound[1]; boxyhi = lammps_->domain->boxhi_bound[1]; boxzlo = lammps_->domain->boxlo_bound[2]; boxzhi = lammps_->domain->boxhi_bound[2]; } } int LammpsInterface::xperiodic() { return lammps_->domain->xperiodic; } int LammpsInterface::yperiodic() { return lammps_->domain->yperiodic; } int LammpsInterface::zperiodic() { return lammps_->domain->zperiodic; } int LammpsInterface::nperiodic() { int nprd = 0; if ( lammps_->domain->xperiodic > 0 ) { nprd++ ; } if ( lammps_->domain->yperiodic > 0 ) { nprd++ ; } if ( lammps_->domain->zperiodic > 0 ) { nprd++ ; } return nprd; } double LammpsInterface::domain_xprd() { return lammps_->domain->xprd; } double LammpsInterface::domain_yprd() { return lammps_->domain->yprd; } double LammpsInterface::domain_zprd() { return lammps_->domain->zprd; } double LammpsInterface::domain_xy() { return lammps_->domain->xy; } double LammpsInterface::domain_xz() { return lammps_->domain->xz; } double LammpsInterface::domain_yz() { return lammps_->domain->yz; } int LammpsInterface::domain_triclinic() { return lammps_->domain->triclinic; } void LammpsInterface::get_box_periodicity(int & xperiodic, int & yperiodic, int & zperiodic) { xperiodic = lammps_->domain->xperiodic; yperiodic = lammps_->domain->yperiodic; zperiodic = lammps_->domain->zperiodic; } int LammpsInterface::get_region_id(const char * regionName) { int nregion = this->nregion(); for (int iregion = 0; iregion < nregion; iregion++) { if (strcmp(regionName, region_name(iregion)) == 0) { return iregion; } } throw ATC_Error(0,"Region has not been defined"); return -1; } // ----------------------------------------------------------------- // update interface methods // ----------------------------------------------------------------- LammpsInterface::UnitsType LammpsInterface::units_style(void) { if (strcmp(lammps_->update->unit_style,"lj") == 0) return LJ; else if (strcmp(lammps_->update->unit_style,"real") == 0) return REAL; else if (strcmp(lammps_->update->unit_style,"metal") == 0) return METAL; else return UNKNOWN; } // ----------------------------------------------------------------- // lattice interface methods // ----------------------------------------------------------------- double LammpsInterface::xlattice() { return lammps_->domain->lattice->xlattice; } double LammpsInterface::ylattice() { return lammps_->domain->lattice->ylattice; } double LammpsInterface::zlattice() { return lammps_->domain->lattice->zlattice; } LammpsInterface::LatticeType LammpsInterface::lattice_style() { if (lammps_->domain->lattice) return (LammpsInterface::LatticeType)lammps_->domain->lattice->style; else throw ATC_Error(0,"Lattice has not been defined"); } //* retuns the number of basis vectors int LammpsInterface::get_n_basis() { return lammps_->domain->lattice->nbasis; } //* returns the basis vectors, transformed to the box coords void LammpsInterface::get_basis(double **basis) { LAMMPS_NS::Lattice *lattice = lammps_->domain->lattice; int i,j; double origin[3] = {0.0, 0.0, 0.0}; lattice->lattice2box(origin[0], origin[1], origin[2]); for (i=0; ibasis[i],3*sizeof(double)); lattice->lattice2box(basis[i][0], basis[i][1], basis[i][2]); for (j=0; j<3; j++) basis[i][j] -= origin[j]; } } //* gets the unit cell vectors void LammpsInterface::get_unit_cell(double *a1, double *a2, double *a3) { int i, j; double *a[3] = {a1,a2,a3}; double origin[3] = {0.0,0.0,0.0}; LAMMPS_NS::Lattice *lattice = lammps_->domain->lattice; // transform origin lattice->lattice2box(origin[0], origin[1], origin[2]); // copy reference lattice vectors memcpy(a[0], lattice->a1, 3*sizeof(double)); memcpy(a[1], lattice->a2, 3*sizeof(double)); memcpy(a[2], lattice->a3, 3*sizeof(double)); for (i=0; i<3; i++) { lattice->lattice2box(a[i][0], a[i][1], a[i][2]); for (j=0; j<3; j++) a[i][j] -= origin[j]; } } //* gets number of atoms in a unit cell int LammpsInterface::num_atoms_per_cell(void) { int naCell = 0; LatticeType type = lattice_style(); if (type == LammpsInterface::SC) naCell = 1; else if (type == LammpsInterface::BCC) naCell = 2; else if (type == LammpsInterface::FCC) naCell = 4; else if (type == LammpsInterface::DIAMOND) naCell = 8; else if (comm_rank()==0) { //{throw ATC_Error(0,"lattice style not currently supported by ATC");} cout << "ATC WARNING: Cannot get number of atoms per cell from lattice\n"; naCell = 1; //HACK to enable us to keep going since this is only used to compute volume per atom // ATC modes with a user specified atomic volume or using only volumetric quantities are fine } return naCell; } //* gets tributary volume for an atom double LammpsInterface::volume_per_atom(void) { double naCell = num_atoms_per_cell(); double volPerAtom = xlattice() * ylattice() * zlattice() / naCell; return volPerAtom; } //* gets lattice basis void LammpsInterface::get_lattice(MATRIX &N, MATRIX &B) { int nbasis = get_n_basis(); double **basis = new double*[nbasis]; N.reset(3,3); B.reset(3,nbasis); for (int i=0; iforce->boltz; } double LammpsInterface::mvv2e() { return lammps_->force->mvv2e; } double LammpsInterface::ftm2v() { return lammps_->force->ftm2v; } double LammpsInterface::nktv2p() { return lammps_->force->nktv2p; } double LammpsInterface::qqr2e() { return lammps_->force->qqr2e; } double LammpsInterface::qe2f() { return lammps_->force->qe2f; } double LammpsInterface::dielectric() { return lammps_->force->dielectric; } double LammpsInterface::qqrd2e() { return lammps_->force->qqrd2e; } double LammpsInterface::pair_force(int i, int j, double rsq, double & fmag_over_rmag) { int itype = (lammps_->atom->type)[i]; int jtype = (lammps_->atom->type)[j]; // return value is the energy if (rsq < (lammps_->force->pair->cutsq)[itype][jtype]) { return lammps_->force->pair->single(i,j,itype,jtype, rsq,1.0,1.0,fmag_over_rmag); } return 0.0; } double LammpsInterface::pair_cutoff() { return lammps_->force->pair->cutforce; } int LammpsInterface::single_enable() { return lammps_->force->pair->single_enable; } //* Boltzmann's constant in M,L,T,t units double LammpsInterface::kBoltzmann() { return (lammps_->force->boltz)/(lammps_->force->mvv2e); } //* Dulong-Petit heat capacity double LammpsInterface::heat_capacity() { double rhoCp = dimension()*kBoltzmann()/volume_per_atom(); return rhoCp; } //* reference mass density double LammpsInterface::mass_density() { const int ntypes = lammps_->atom->ntypes; const int *mass_setflag = lammps_->atom->mass_setflag; const int *type = lammps_->atom->type; const double *mass = lammps_->atom->mass; const double *rmass = lammps_->atom->rmass; // NOTE currently assumes all atoms have same mass and volume // in the future, mass and volume will be different but density should be // an atom indepedent quantity if (mass) { if (type) return mass[type[0]]/volume_per_atom(); // no type array - just use first type that has a set mass for (int i=1; i<=ntypes; i++) { if (mass_setflag[i]) return mass[i]/volume_per_atom(); } // NOTE: no masses specified in input file should we warn the user of this? return 0.0; } // NOTE is this valid - lammps likes to not use 0 index if (rmass) return rmass[0]/volume_per_atom(); return 0.0; } // ----------------------------------------------------------------- // group interface methods // ----------------------------------------------------------------- int LammpsInterface::ngroup() { return lammps_->group->ngroup; } int LammpsInterface::group_bit(int iGroup) { return lammps_->group->bitmask[iGroup]; } int LammpsInterface::find_group(const char * c) { return lammps_->group->find(c); } int LammpsInterface::group_inverse_mask(int iGroup) { return lammps_->group->inversemask[iGroup]; } char * LammpsInterface::group_name(int iGroup) { return lammps_->group->names[iGroup]; } void LammpsInterface::group_bounds(int iGroup, double * b) { lammps_->group->bounds(iGroup, b); } // ----------------------------------------------------------------- // memory interface methods // ----------------------------------------------------------------- double * LammpsInterface::create_1d_double_array(int nlo, int nhi, const char *name) { double *array; return lammps_->memory->create1d_offset(array, nlo, nhi, name); } void LammpsInterface::destroy_1d_double_array(double * d, int i) { lammps_->memory->destroy1d_offset(d, i); } double ** LammpsInterface::create_2d_double_array(int n1, int n2, const char *name) { double **array; return lammps_->memory->create(array, n1, n2, name); } void LammpsInterface::destroy_2d_double_array(double **d) { lammps_->memory->destroy(d); } double **LammpsInterface::grow_2d_double_array(double **array, int n1, int n2, const char *name) { return lammps_->memory->grow(array, n1, n2, name); } int ** LammpsInterface::create_2d_int_array(int n1, int n2, const char *name) { int **array; return lammps_->memory->create(array, n1, n2, name); } void LammpsInterface::destroy_2d_int_array(int **i) { lammps_->memory->destroy(i); } int ** LammpsInterface::grow_2d_int_array(int **array, int n1, int n2, const char *name) { return lammps_->memory->grow(array, n1, n2, name); } // ----------------------------------------------------------------- // update interface methods // ----------------------------------------------------------------- double LammpsInterface::dt() { return lammps_->update->dt; } int LammpsInterface::ntimestep() { return lammps_->update->ntimestep; } int LammpsInterface::nsteps() { return lammps_->update->nsteps; } // ----------------------------------------------------------------- // neighbor list interface methods // ----------------------------------------------------------------- void LammpsInterface::init_list(int id, LAMMPS_NS::NeighList *ptr) { list_ = ptr; } int LammpsInterface::neighbor_list_inum() { return list_->inum; } int * LammpsInterface::neighbor_list_numneigh() { return list_->numneigh; } int * LammpsInterface::neighbor_list_ilist() { return list_->ilist; } int ** LammpsInterface::neighbor_list_firstneigh() { return list_->firstneigh; } int LammpsInterface::neighbor_ago() { return lammps_->neighbor->ago; } // ----------------------------------------------------------------- // region interface methods // ----------------------------------------------------------------- char * LammpsInterface::region_name(int iRegion) { return lammps_->domain->regions[iRegion]->id; } char * LammpsInterface::region_style(int iRegion) { return lammps_->domain->regions[iRegion]->style; } double LammpsInterface::region_xlo(int iRegion) { return lammps_->domain->regions[iRegion]->extent_xlo; } double LammpsInterface::region_xhi(int iRegion) { return lammps_->domain->regions[iRegion]->extent_xhi; } double LammpsInterface::region_ylo(int iRegion) { return lammps_->domain->regions[iRegion]->extent_ylo; } double LammpsInterface::region_yhi(int iRegion) { return lammps_->domain->regions[iRegion]->extent_yhi; } double LammpsInterface::region_zlo(int iRegion) { return lammps_->domain->regions[iRegion]->extent_zlo; } double LammpsInterface::region_zhi(int iRegion) { return lammps_->domain->regions[iRegion]->extent_zhi; } double LammpsInterface::region_xscale(int iRegion) { return lammps_->domain->regions[iRegion]->xscale; } double LammpsInterface::region_yscale(int iRegion) { return lammps_->domain->regions[iRegion]->yscale; } double LammpsInterface::region_zscale(int iRegion) { return lammps_->domain->regions[iRegion]->zscale; } int LammpsInterface::region_match(int iRegion, double x, double y, double z) { return lammps_->domain->regions[iRegion]->match(x,y,z); } // ----------------------------------------------------------------- // compute methods // ----------------------------------------------------------------- int LammpsInterface::find_compute(const char* tag) { // a clunky way to safely get rid of the const int n = strlen(tag) + 1; char* tag_copy = new char[n]; strcpy(tag_copy,tag); int icompute = lammps_->modify->find_compute(tag_copy); if (icompute < 0) { string msg("Could not find compute "); msg += tag; throw ATC_Error(0,msg); } return icompute; } LAMMPS_NS::Compute* LammpsInterface::get_compute(const char* tag) { int icompute = find_compute(tag); LAMMPS_NS::Compute* cmpt = lammps_->modify->compute[icompute]; return cmpt; } double** LammpsInterface::compute_vector_data(const char* tag) { LAMMPS_NS::Compute* cmpt = get_compute(tag); if (!(cmpt->invoked_flag & INVOKED_PERATOM)) { cmpt->compute_peratom(); cmpt->invoked_flag |= INVOKED_PERATOM; } return cmpt->array_atom; } double* LammpsInterface::compute_scalar_data(const char* tag) { LAMMPS_NS::Compute* cmpt = get_compute(tag); if (!(cmpt->invoked_flag & INVOKED_PERATOM)) { cmpt->compute_peratom(); cmpt->invoked_flag |= INVOKED_PERATOM; } return cmpt->vector_atom; } int LammpsInterface::compute_ncols(const char* tag) { int icompute = find_compute(tag); int ncols = lammps_->modify->compute[icompute]->size_peratom_cols; if (ncols == 0) ncols = 1; // oddity of lammps, used as flag for scalar return ncols; } // ----------------------------------------------------------------- // compute pe/atom interface methods // ----------------------------------------------------------------- int LammpsInterface::atomPE_create(void) { //char * list[3] = {"atcPE","all","pe/atom"}; char * list[4] = {"atcPE","all","pe/atom","pair"}; int icompute = lammps_->modify->find_compute(list[0]); if (icompute < 0) { lammps_->modify->add_compute(3,list); icompute = lammps_->modify->find_compute(list[0]); } if (! atomPE_ ) { atomPE_ = lammps_->modify->compute[icompute]; } return icompute; } void LammpsInterface::atomPE_init(void) { if (atomPE_) { atomPE_->init(); } else { throw ATC_Error(0,"no atomPE compute"); } } -void LammpsInterface::atomPE_addstep(int step) +void LammpsInterface::atomPE_addstep(LAMMPS_NS::bigint step) { atomPE_->addstep(step); } double * LammpsInterface::atomPE_compute(void) { if (atomPE_) { atomPE_->compute_peratom(); return atomPE_->vector_atom; } else { return NULL; } } /* ---------------------------------------------------------------------- */ void LammpsInterface::unwrap_coordinates(int iatom, double* xatom) { double **x = lammps_->atom->x; int *mask = lammps_->atom->mask; int *image = lammps_->atom->image; int nlocal = lammps_->atom->nlocal; double *h = lammps_->domain->h; double xprd = lammps_->domain->xprd; double yprd = lammps_->domain->yprd; double zprd = lammps_->domain->zprd; int xbox,ybox,zbox; // for triclinic, need to unwrap current atom coord via h matrix // NOTE: Using current box dimensions. if (lammps_->domain->triclinic == 0) { xbox = (image[iatom] & 1023) - 512; ybox = (image[iatom] >> 10 & 1023) - 512; zbox = (image[iatom] >> 20) - 512; xatom[0] = x[iatom][0] + xbox*xprd; xatom[1] = x[iatom][1] + ybox*yprd; xatom[2] = x[iatom][2] + zbox*zprd; } else { xbox = (image[iatom] & 1023) - 512; ybox = (image[iatom] >> 10 & 1023) - 512; zbox = (image[iatom] >> 20) - 512; xatom[0] = x[iatom][0] + h[0]*xbox + h[5]*ybox + h[4]*zbox; xatom[1] = x[iatom][1] + h[1]*ybox + h[3]*zbox; xatom[2] = x[iatom][2] + h[2]*zbox; } } // ----------------------------------------------------------------- // other methods // ----------------------------------------------------------------- /** Return lammps pointer -- only as a last resort! */ LAMMPS_NS::LAMMPS * LammpsInterface::get_lammps_ptr() { return lammps_; } } diff --git a/lib/atc/Makefile.g++ b/lib/atc/Makefile.g++ index 66361ebc5..5b12e403a 100644 --- a/lib/atc/Makefile.g++ +++ b/lib/atc/Makefile.g++ @@ -1,134 +1,134 @@ SHELL = /bin/sh # which file will be copied to Makefile.lammps EXTRAMAKE = Makefile.lammps.installed # ------ FILES ------ SRC = ATC_HardyKernel.cpp \ ATC_Transfer.cpp \ ATC_TransferHardy.cpp \ ATC_TransferThermal.cpp \ ATC_TransferUtility.cpp \ AtomicRegulator.cpp \ ElasticTimeIntegrator.cpp \ ElectronFlux.cpp \ ElectronHeatCapacity.cpp \ ElectronHeatFlux.cpp \ ElectronPhononExchange.cpp \ ExtrinsicModel.cpp \ ExtrinsicModelTwoTemperature.cpp \ FE_Element.cpp \ FE_Engine.cpp \ FE_Mesh.cpp \ FieldEulerIntegrator.cpp \ ImplicitSolveOperator.cpp \ Kinetostat.cpp \ LammpsInterface.cpp \ Material.cpp \ Matrix.cpp \ OutputManager.cpp \ PhysicsModelThermal.cpp \ PhysicsModelTwoTemperature.cpp \ PrescribedDataManager.cpp \ Solver.cpp \ Thermostat.cpp \ TimeFilter.cpp \ TimeIntegrator.cpp \ Vector.cpp \ XT_Function.cpp INC = Array2D.h \ Array.h \ ATC_Error.h \ ATC_HardyKernel.h \ ATC_Transfer.h \ ATC_TransferHardy.h \ ATC_TransferThermal.h \ ATC_TypeDefs.h \ \ AtomicRegulator.h \ CG.h \ CloneVector.h \ DenseMatrix.h \ DenseVector.h \ DiagonalMatrix.h \ ElasticTimeIntegrator.h \ ElectronFlux.h \ ElectronHeatCapacity.h \ ElectronHeatFlux.h \ ElectronPhononExchange.h \ ExtrinsicModel.h \ ExtrinsicModelTwoTemperature.h \ FE_Element.h \ FE_Engine.h \ FE_Mesh.h \ FieldEulerIntegrator.h \ GMRES.h \ ImplicitSolveOperator.h \ Kinetostat.h \ LammpsInterface.h \ Material.h \ MatrixDef.h \ Matrix.h \ MatrixLibrary.h \ OutputManager.h \ PhysicsModel.h \ PhysicsModelThermal.h \ PhysicsModelTwoTemperature.h \ PrescribedDataManager.h \ Quadrature.h \ Solver.h \ SparseMatrix.h \ SparseMatrix-inl.h \ SparseVector.h \ SparseVector-inl.h \ StringManip.h \ Thermostat.h \ TimeFilter.h \ TimeIntegrator.h \ Utility.h \ Vector.h \ XT_Function.h # ------ DEFINITIONS ------ LIB = libatc.a OBJ = $(SRC:.cpp=.o) # ------ SETTINGS ------ # include any MPI settings needed for the ATC library to build with # must be the same MPI library that LAMMPS is built with CC = g++ CCFLAGS = -O -g -fPIC -I../../src -DMPICH_IGNORE_CXX_SEEK ARCHIVE = ar ARCHFLAG = -rc DEPFLAGS = -M LINK = g++ LINKFLAGS = -O USRLIB = SYSLIB = # ------ MAKE PROCEDURE ------ lib: $(OBJ) $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) @cp $(EXTRAMAKE) Makefile.lammps # ------ COMPILE RULES ------ %.o:%.cpp $(CC) $(CCFLAGS) -c $< %.d:%.cpp $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ # ------ DEPENDENCIES ------ DEPENDS = $(OBJ:.o=.d) # ------ CLEAN ------ clean: - rm *.o *.d *~ $(LIB) + -rm *.o *.d *~ $(LIB) diff --git a/lib/atc/Makefile.lammps.linalg b/lib/atc/Makefile.lammps similarity index 56% copy from lib/atc/Makefile.lammps.linalg copy to lib/atc/Makefile.lammps index 742b09f78..c8cd66af2 100644 --- a/lib/atc/Makefile.lammps.linalg +++ b/lib/atc/Makefile.lammps @@ -1,5 +1,5 @@ # Settings that the LAMMPS build will import when this package library is used user-atc_SYSINC = -user-atc_SYSLIB = -llinalg -lgfortran -user-atc_SYSPATH = -L../../lib/linalg +user-atc_SYSLIB = -lblas -llapack +user-atc_SYSPATH = diff --git a/lib/atc/Makefile.lammps.linalg b/lib/atc/Makefile.lammps.linalg index 742b09f78..5d92fd8cf 100644 --- a/lib/atc/Makefile.lammps.linalg +++ b/lib/atc/Makefile.lammps.linalg @@ -1,5 +1,6 @@ # Settings that the LAMMPS build will import when this package library is used user-atc_SYSINC = user-atc_SYSLIB = -llinalg -lgfortran -user-atc_SYSPATH = -L../../lib/linalg +user-atc_SYSPATH = -L../../lib/linalg$(LIBOBJDIR) + diff --git a/lib/atc/Makefile.g++ b/lib/atc/Makefile.mingw32-cross similarity index 73% copy from lib/atc/Makefile.g++ copy to lib/atc/Makefile.mingw32-cross index 66361ebc5..683441040 100644 --- a/lib/atc/Makefile.g++ +++ b/lib/atc/Makefile.mingw32-cross @@ -1,134 +1,149 @@ +# library build -*- makefile -*- SHELL = /bin/sh -# which file will be copied to Makefile.lammps - -EXTRAMAKE = Makefile.lammps.installed - # ------ FILES ------ SRC = ATC_HardyKernel.cpp \ ATC_Transfer.cpp \ ATC_TransferHardy.cpp \ ATC_TransferThermal.cpp \ ATC_TransferUtility.cpp \ AtomicRegulator.cpp \ ElasticTimeIntegrator.cpp \ ElectronFlux.cpp \ ElectronHeatCapacity.cpp \ ElectronHeatFlux.cpp \ ElectronPhononExchange.cpp \ ExtrinsicModel.cpp \ ExtrinsicModelTwoTemperature.cpp \ FE_Element.cpp \ FE_Engine.cpp \ FE_Mesh.cpp \ FieldEulerIntegrator.cpp \ ImplicitSolveOperator.cpp \ Kinetostat.cpp \ LammpsInterface.cpp \ Material.cpp \ Matrix.cpp \ OutputManager.cpp \ PhysicsModelThermal.cpp \ PhysicsModelTwoTemperature.cpp \ PrescribedDataManager.cpp \ Solver.cpp \ Thermostat.cpp \ TimeFilter.cpp \ TimeIntegrator.cpp \ Vector.cpp \ XT_Function.cpp INC = Array2D.h \ Array.h \ ATC_Error.h \ ATC_HardyKernel.h \ ATC_Transfer.h \ ATC_TransferHardy.h \ ATC_TransferThermal.h \ ATC_TypeDefs.h \ \ AtomicRegulator.h \ CG.h \ CloneVector.h \ DenseMatrix.h \ DenseVector.h \ DiagonalMatrix.h \ ElasticTimeIntegrator.h \ ElectronFlux.h \ ElectronHeatCapacity.h \ ElectronHeatFlux.h \ ElectronPhononExchange.h \ ExtrinsicModel.h \ ExtrinsicModelTwoTemperature.h \ FE_Element.h \ FE_Engine.h \ FE_Mesh.h \ FieldEulerIntegrator.h \ GMRES.h \ ImplicitSolveOperator.h \ Kinetostat.h \ LammpsInterface.h \ Material.h \ MatrixDef.h \ Matrix.h \ MatrixLibrary.h \ OutputManager.h \ PhysicsModel.h \ PhysicsModelThermal.h \ PhysicsModelTwoTemperature.h \ PrescribedDataManager.h \ Quadrature.h \ Solver.h \ SparseMatrix.h \ SparseMatrix-inl.h \ SparseVector.h \ SparseVector-inl.h \ StringManip.h \ Thermostat.h \ TimeFilter.h \ TimeIntegrator.h \ Utility.h \ Vector.h \ XT_Function.h # ------ DEFINITIONS ------ +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.linalg -LIB = libatc.a -OBJ = $(SRC:.cpp=.o) +DIR = Obj_mingw32/ +LIB = $(DIR)libatc.a +OBJ = $(SRC:%.cpp=$(DIR)%.o) # ------ SETTINGS ------ # include any MPI settings needed for the ATC library to build with -# must be the same MPI library that LAMMPS is built with - -CC = g++ -CCFLAGS = -O -g -fPIC -I../../src -DMPICH_IGNORE_CXX_SEEK -ARCHIVE = ar -ARCHFLAG = -rc +# the same MPI library that LAMMPS is built with + +CC = i686-w64-mingw32-g++ +CCFLAGS = -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \ + -O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ + -ffast-math -funroll-loops -fstrict-aliasing \ + -DLAMMPS_SMALLSMALL -Wno-uninitialized +ARCHIVE = i686-w64-mingw32-ar +ARCHFLAG = -rcs DEPFLAGS = -M -LINK = g++ +LINK = i686-w64-mingw32-g++ LINKFLAGS = -O USRLIB = SYSLIB = # ------ MAKE PROCEDURE ------ -lib: $(OBJ) +default: $(DIR) $(LIB) Makefile.lammps + +$(DIR): + mkdir $(DIR) + +Makefile.lammps: + @cp $(EXTRAMAKE) Makefile.lammps + +$(LIB): $(OBJ) $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) @cp $(EXTRAMAKE) Makefile.lammps # ------ COMPILE RULES ------ -%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -%.d:%.cpp +$(DIR)%.o:%.cpp + $(CC) $(CCFLAGS) -c $< -o $@ +$(DIR)%.d:%.cpp $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ # ------ DEPENDENCIES ------ DEPENDS = $(OBJ:.o=.d) # ------ CLEAN ------ clean: - rm *.o *.d *~ $(LIB) + rm $(DIR)*.o $(DIR)*.d *~ $(LIB) + +$(DEPENDS) : $(DIR) +sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.g++ b/lib/atc/Makefile.mingw32-cross-mpi similarity index 71% copy from lib/atc/Makefile.g++ copy to lib/atc/Makefile.mingw32-cross-mpi index 66361ebc5..4c372edf3 100644 --- a/lib/atc/Makefile.g++ +++ b/lib/atc/Makefile.mingw32-cross-mpi @@ -1,134 +1,150 @@ +# library build -*- makefile -*- SHELL = /bin/sh -# which file will be copied to Makefile.lammps - -EXTRAMAKE = Makefile.lammps.installed - # ------ FILES ------ SRC = ATC_HardyKernel.cpp \ ATC_Transfer.cpp \ ATC_TransferHardy.cpp \ ATC_TransferThermal.cpp \ ATC_TransferUtility.cpp \ AtomicRegulator.cpp \ ElasticTimeIntegrator.cpp \ ElectronFlux.cpp \ ElectronHeatCapacity.cpp \ ElectronHeatFlux.cpp \ ElectronPhononExchange.cpp \ ExtrinsicModel.cpp \ ExtrinsicModelTwoTemperature.cpp \ FE_Element.cpp \ FE_Engine.cpp \ FE_Mesh.cpp \ FieldEulerIntegrator.cpp \ ImplicitSolveOperator.cpp \ Kinetostat.cpp \ LammpsInterface.cpp \ Material.cpp \ Matrix.cpp \ OutputManager.cpp \ PhysicsModelThermal.cpp \ PhysicsModelTwoTemperature.cpp \ PrescribedDataManager.cpp \ Solver.cpp \ Thermostat.cpp \ TimeFilter.cpp \ TimeIntegrator.cpp \ Vector.cpp \ XT_Function.cpp INC = Array2D.h \ Array.h \ ATC_Error.h \ ATC_HardyKernel.h \ ATC_Transfer.h \ ATC_TransferHardy.h \ ATC_TransferThermal.h \ ATC_TypeDefs.h \ \ AtomicRegulator.h \ CG.h \ CloneVector.h \ DenseMatrix.h \ DenseVector.h \ DiagonalMatrix.h \ ElasticTimeIntegrator.h \ ElectronFlux.h \ ElectronHeatCapacity.h \ ElectronHeatFlux.h \ ElectronPhononExchange.h \ ExtrinsicModel.h \ ExtrinsicModelTwoTemperature.h \ FE_Element.h \ FE_Engine.h \ FE_Mesh.h \ FieldEulerIntegrator.h \ GMRES.h \ ImplicitSolveOperator.h \ Kinetostat.h \ LammpsInterface.h \ Material.h \ MatrixDef.h \ Matrix.h \ MatrixLibrary.h \ OutputManager.h \ PhysicsModel.h \ PhysicsModelThermal.h \ PhysicsModelTwoTemperature.h \ PrescribedDataManager.h \ Quadrature.h \ Solver.h \ SparseMatrix.h \ SparseMatrix-inl.h \ SparseVector.h \ SparseVector-inl.h \ StringManip.h \ Thermostat.h \ TimeFilter.h \ TimeIntegrator.h \ Utility.h \ Vector.h \ XT_Function.h # ------ DEFINITIONS ------ +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.linalg -LIB = libatc.a -OBJ = $(SRC:.cpp=.o) +DIR = Obj_mingw32-mpi/ +LIB = $(DIR)libatc.a +OBJ = $(SRC:%.cpp=$(DIR)%.o) # ------ SETTINGS ------ # include any MPI settings needed for the ATC library to build with -# must be the same MPI library that LAMMPS is built with - -CC = g++ -CCFLAGS = -O -g -fPIC -I../../src -DMPICH_IGNORE_CXX_SEEK -ARCHIVE = ar -ARCHFLAG = -rc +# the same MPI library that LAMMPS is built with + +CC = i686-w64-mingw32-g++ +CCFLAGS = -I../../tools/mingw-cross/mpich2-win32/include/ \ + -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \ + -O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ + -ffast-math -funroll-loops -fstrict-aliasing \ + -DLAMMPS_SMALLSMALL -Wno-uninitialized +ARCHIVE = i686-w64-mingw32-ar +ARCHFLAG = -rcs DEPFLAGS = -M -LINK = g++ +LINK = i686-w64-mingw32-g++ LINKFLAGS = -O USRLIB = SYSLIB = # ------ MAKE PROCEDURE ------ -lib: $(OBJ) +default: $(DIR) $(LIB) Makefile.lammps + +$(DIR): + mkdir $(DIR) + +Makefile.lammps: + @cp $(EXTRAMAKE) Makefile.lammps + +$(LIB): $(OBJ) $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) @cp $(EXTRAMAKE) Makefile.lammps # ------ COMPILE RULES ------ -%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -%.d:%.cpp +$(DIR)%.o:%.cpp + $(CC) $(CCFLAGS) -c $< -o $@ +$(DIR)%.d:%.cpp $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ # ------ DEPENDENCIES ------ DEPENDS = $(OBJ:.o=.d) # ------ CLEAN ------ clean: - rm *.o *.d *~ $(LIB) + rm $(DIR)*.o $(DIR)*.d *~ $(LIB) + +$(DEPENDS) : $(DIR) +sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.g++ b/lib/atc/Makefile.mingw64-cross similarity index 73% copy from lib/atc/Makefile.g++ copy to lib/atc/Makefile.mingw64-cross index 66361ebc5..997cbcd35 100644 --- a/lib/atc/Makefile.g++ +++ b/lib/atc/Makefile.mingw64-cross @@ -1,134 +1,149 @@ +# library build -*- makefile -*- SHELL = /bin/sh -# which file will be copied to Makefile.lammps - -EXTRAMAKE = Makefile.lammps.installed - # ------ FILES ------ SRC = ATC_HardyKernel.cpp \ ATC_Transfer.cpp \ ATC_TransferHardy.cpp \ ATC_TransferThermal.cpp \ ATC_TransferUtility.cpp \ AtomicRegulator.cpp \ ElasticTimeIntegrator.cpp \ ElectronFlux.cpp \ ElectronHeatCapacity.cpp \ ElectronHeatFlux.cpp \ ElectronPhononExchange.cpp \ ExtrinsicModel.cpp \ ExtrinsicModelTwoTemperature.cpp \ FE_Element.cpp \ FE_Engine.cpp \ FE_Mesh.cpp \ FieldEulerIntegrator.cpp \ ImplicitSolveOperator.cpp \ Kinetostat.cpp \ LammpsInterface.cpp \ Material.cpp \ Matrix.cpp \ OutputManager.cpp \ PhysicsModelThermal.cpp \ PhysicsModelTwoTemperature.cpp \ PrescribedDataManager.cpp \ Solver.cpp \ Thermostat.cpp \ TimeFilter.cpp \ TimeIntegrator.cpp \ Vector.cpp \ XT_Function.cpp INC = Array2D.h \ Array.h \ ATC_Error.h \ ATC_HardyKernel.h \ ATC_Transfer.h \ ATC_TransferHardy.h \ ATC_TransferThermal.h \ ATC_TypeDefs.h \ \ AtomicRegulator.h \ CG.h \ CloneVector.h \ DenseMatrix.h \ DenseVector.h \ DiagonalMatrix.h \ ElasticTimeIntegrator.h \ ElectronFlux.h \ ElectronHeatCapacity.h \ ElectronHeatFlux.h \ ElectronPhononExchange.h \ ExtrinsicModel.h \ ExtrinsicModelTwoTemperature.h \ FE_Element.h \ FE_Engine.h \ FE_Mesh.h \ FieldEulerIntegrator.h \ GMRES.h \ ImplicitSolveOperator.h \ Kinetostat.h \ LammpsInterface.h \ Material.h \ MatrixDef.h \ Matrix.h \ MatrixLibrary.h \ OutputManager.h \ PhysicsModel.h \ PhysicsModelThermal.h \ PhysicsModelTwoTemperature.h \ PrescribedDataManager.h \ Quadrature.h \ Solver.h \ SparseMatrix.h \ SparseMatrix-inl.h \ SparseVector.h \ SparseVector-inl.h \ StringManip.h \ Thermostat.h \ TimeFilter.h \ TimeIntegrator.h \ Utility.h \ Vector.h \ XT_Function.h # ------ DEFINITIONS ------ +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.linalg -LIB = libatc.a -OBJ = $(SRC:.cpp=.o) +DIR = Obj_mingw64/ +LIB = $(DIR)libatc.a +OBJ = $(SRC:%.cpp=$(DIR)%.o) # ------ SETTINGS ------ # include any MPI settings needed for the ATC library to build with -# must be the same MPI library that LAMMPS is built with - -CC = g++ -CCFLAGS = -O -g -fPIC -I../../src -DMPICH_IGNORE_CXX_SEEK -ARCHIVE = ar -ARCHFLAG = -rc +# the same MPI library that LAMMPS is built with + +CC = x86_64-w64-mingw32-g++ +CCFLAGS = -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \ + -O3 -march=core2 -mtune=core2 -mpc64 -msse2 \ + -ffast-math -funroll-loops -fstrict-aliasing \ + -DLAMMPS_SMALLBIG -Wno-uninitialized +ARCHIVE = x86_64-w64-mingw32-ar +ARCHFLAG = -rcs DEPFLAGS = -M -LINK = g++ +LINK = x86_64-w64-mingw32-g++ LINKFLAGS = -O USRLIB = SYSLIB = # ------ MAKE PROCEDURE ------ -lib: $(OBJ) +default: $(DIR) $(LIB) Makefile.lammps + +$(DIR): + mkdir $(DIR) + +Makefile.lammps: + @cp $(EXTRAMAKE) Makefile.lammps + +$(LIB): $(OBJ) $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) @cp $(EXTRAMAKE) Makefile.lammps # ------ COMPILE RULES ------ -%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -%.d:%.cpp +$(DIR)%.o:%.cpp + $(CC) $(CCFLAGS) -c $< -o $@ +$(DIR)%.d:%.cpp $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ # ------ DEPENDENCIES ------ DEPENDS = $(OBJ:.o=.d) # ------ CLEAN ------ clean: - rm *.o *.d *~ $(LIB) + rm $(DIR)*.o $(DIR)*.d *~ $(LIB) + +$(DEPENDS) : $(DIR) +sinclude $(DEPENDS) diff --git a/lib/atc/Makefile.g++ b/lib/atc/Makefile.mingw64-cross-mpi similarity index 71% copy from lib/atc/Makefile.g++ copy to lib/atc/Makefile.mingw64-cross-mpi index 66361ebc5..81b4ee207 100644 --- a/lib/atc/Makefile.g++ +++ b/lib/atc/Makefile.mingw64-cross-mpi @@ -1,134 +1,150 @@ +# library build -*- makefile -*- SHELL = /bin/sh -# which file will be copied to Makefile.lammps - -EXTRAMAKE = Makefile.lammps.installed - # ------ FILES ------ SRC = ATC_HardyKernel.cpp \ ATC_Transfer.cpp \ ATC_TransferHardy.cpp \ ATC_TransferThermal.cpp \ ATC_TransferUtility.cpp \ AtomicRegulator.cpp \ ElasticTimeIntegrator.cpp \ ElectronFlux.cpp \ ElectronHeatCapacity.cpp \ ElectronHeatFlux.cpp \ ElectronPhononExchange.cpp \ ExtrinsicModel.cpp \ ExtrinsicModelTwoTemperature.cpp \ FE_Element.cpp \ FE_Engine.cpp \ FE_Mesh.cpp \ FieldEulerIntegrator.cpp \ ImplicitSolveOperator.cpp \ Kinetostat.cpp \ LammpsInterface.cpp \ Material.cpp \ Matrix.cpp \ OutputManager.cpp \ PhysicsModelThermal.cpp \ PhysicsModelTwoTemperature.cpp \ PrescribedDataManager.cpp \ Solver.cpp \ Thermostat.cpp \ TimeFilter.cpp \ TimeIntegrator.cpp \ Vector.cpp \ XT_Function.cpp INC = Array2D.h \ Array.h \ ATC_Error.h \ ATC_HardyKernel.h \ ATC_Transfer.h \ ATC_TransferHardy.h \ ATC_TransferThermal.h \ ATC_TypeDefs.h \ \ AtomicRegulator.h \ CG.h \ CloneVector.h \ DenseMatrix.h \ DenseVector.h \ DiagonalMatrix.h \ ElasticTimeIntegrator.h \ ElectronFlux.h \ ElectronHeatCapacity.h \ ElectronHeatFlux.h \ ElectronPhononExchange.h \ ExtrinsicModel.h \ ExtrinsicModelTwoTemperature.h \ FE_Element.h \ FE_Engine.h \ FE_Mesh.h \ FieldEulerIntegrator.h \ GMRES.h \ ImplicitSolveOperator.h \ Kinetostat.h \ LammpsInterface.h \ Material.h \ MatrixDef.h \ Matrix.h \ MatrixLibrary.h \ OutputManager.h \ PhysicsModel.h \ PhysicsModelThermal.h \ PhysicsModelTwoTemperature.h \ PrescribedDataManager.h \ Quadrature.h \ Solver.h \ SparseMatrix.h \ SparseMatrix-inl.h \ SparseVector.h \ SparseVector-inl.h \ StringManip.h \ Thermostat.h \ TimeFilter.h \ TimeIntegrator.h \ Utility.h \ Vector.h \ XT_Function.h # ------ DEFINITIONS ------ +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.linalg -LIB = libatc.a -OBJ = $(SRC:.cpp=.o) +DIR = Obj_mingw64-mpi/ +LIB = $(DIR)libatc.a +OBJ = $(SRC:%.cpp=$(DIR)%.o) # ------ SETTINGS ------ # include any MPI settings needed for the ATC library to build with -# must be the same MPI library that LAMMPS is built with - -CC = g++ -CCFLAGS = -O -g -fPIC -I../../src -DMPICH_IGNORE_CXX_SEEK -ARCHIVE = ar -ARCHFLAG = -rc +# the same MPI library that LAMMPS is built with + +CC = x86_64-w64-mingw32-g++ +CCFLAGS = -I../../tools/mingw-cross/mpich2-win64/include/ \ + -I../../src -I../../src/STUBS -DMPICH_IGNORE_CXX_SEEK \ + -O3 -march=core2 -mtune=core2 -mpc64 -msse2 \ + -ffast-math -funroll-loops -fstrict-aliasing \ + -DLAMMPS_SMALLBIG -Wno-uninitialized +ARCHIVE = x86_64-w64-mingw32-ar +ARCHFLAG = -rcs DEPFLAGS = -M -LINK = g++ +LINK = x86_64-w64-mingw32-g++ LINKFLAGS = -O USRLIB = SYSLIB = # ------ MAKE PROCEDURE ------ -lib: $(OBJ) +default: $(DIR) $(LIB) Makefile.lammps + +$(DIR): + mkdir $(DIR) + +Makefile.lammps: + @cp $(EXTRAMAKE) Makefile.lammps + +$(LIB): $(OBJ) $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) @cp $(EXTRAMAKE) Makefile.lammps # ------ COMPILE RULES ------ -%.o:%.cpp - $(CC) $(CCFLAGS) -c $< -%.d:%.cpp +$(DIR)%.o:%.cpp + $(CC) $(CCFLAGS) -c $< -o $@ +$(DIR)%.d:%.cpp $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ # ------ DEPENDENCIES ------ DEPENDS = $(OBJ:.o=.d) # ------ CLEAN ------ clean: - rm *.o *.d *~ $(LIB) + rm $(DIR)*.o $(DIR)*.d *~ $(LIB) + +$(DEPENDS) : $(DIR) +sinclude $(DEPENDS) diff --git a/lib/awpmd/Makefile.lammps.linalg b/lib/awpmd/Makefile.lammps.linalg index a5c4e9b9f..a30f4a821 100644 --- a/lib/awpmd/Makefile.lammps.linalg +++ b/lib/awpmd/Makefile.lammps.linalg @@ -1,5 +1,5 @@ # Settings that the LAMMPS build will import when this package library is used user-awpmd_SYSINC = user-awpmd_SYSLIB = -llinalg -lgfortran -user-awpmd_SYSPATH = -L../../lib/linalg +user-awpmd_SYSPATH = -L../../lib/linalg$(LIBOBJDIR) diff --git a/lib/awpmd/Makefile.mingw32-cross b/lib/awpmd/Makefile.mingw32-cross new file mode 100644 index 000000000..af66187b8 --- /dev/null +++ b/lib/awpmd/Makefile.mingw32-cross @@ -0,0 +1,80 @@ +# library build -*- makefile -*- +SHELL = /bin/sh + +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.linalg + +# ------ FILES ------ + +SRC = logexc.cpp wpmd.cpp wpmd_split.cpp +vpath %.cpp ivutils/src +vpath %.cpp systems/interact/TCP + +INC = \ + cerf.h \ + cerf2.h \ + cerf_octave.h \ + cvector_3.h \ + lapack_inter.h \ + logexc.h \ + pairhash.h \ + refobj.h \ + tcpdefs.h \ + vector_3.h \ + wavepacket.h \ + wpmd.h \ + wpmd_split.h + +# ------ DEFINITIONS ------ +DIR = Obj_mingw32/ +LIB = $(DIR)libawpmd.a +OBJ = $(SRC:%.cpp=$(DIR)%.o) + +# ------ SETTINGS ------ + +# include any MPI settings needed for the ATC library to build with +# the same MPI library that LAMMPS is built with + +CC = i686-w64-mingw32-g++ +CCFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ + -finline-functions \ + -ffast-math -funroll-loops -fstrict-aliasing \ + -Wall -W -Wno-uninitialized -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include +ARCHIVE = i686-w64-mingw32-ar +ARCHFLAG = -rscv +DEPFLAGS = -M +#LINK = +#LINKFLAGS = +USRLIB = +SYSLIB = + +# ------ MAKE PROCEDURE ------ + +default: $(DIR) $(LIB) Makefile.lammps + +$(DIR): + mkdir $(DIR) + +Makefile.lammps: + @cp $(EXTRAMAKE) Makefile.lammps + +$(LIB): $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + @cp $(EXTRAMAKE) Makefile.lammps + +# ------ COMPILE RULES ------ + +$(DIR)%.o:%.cpp + $(CC) $(CCFLAGS) -c $< -o $@ +$(DIR)%.d:%.cpp + $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ + +# ------ DEPENDENCIES ------ + +DEPENDS = $(OBJ:.o=.d) + +# ------ CLEAN ------ + +clean: + rm *.d *~ $(OBJ) $(LIB) diff --git a/lib/awpmd/Makefile.mingw32-cross-mpi b/lib/awpmd/Makefile.mingw32-cross-mpi new file mode 100644 index 000000000..cc2a76111 --- /dev/null +++ b/lib/awpmd/Makefile.mingw32-cross-mpi @@ -0,0 +1,13 @@ +# -*- makefile -*- wrapper for non-MPI libraries + +SHELL=/bin/sh + +all: + $(MAKE) $(MFLAGS) mingw32-cross + rm -f Obj_mingw32-mpi + ln -s Obj_mingw32 Obj_mingw32-mpi + +clean: + $(MAKE) $(MFLAGS) clean-mingw32-cross + rm -f Obj_mingw32-mpi + diff --git a/lib/awpmd/Makefile.mingw64-cross b/lib/awpmd/Makefile.mingw64-cross new file mode 100644 index 000000000..f1df999ba --- /dev/null +++ b/lib/awpmd/Makefile.mingw64-cross @@ -0,0 +1,79 @@ +# library build -*- makefile -*- +SHELL = /bin/sh + +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.linalg + +# ------ FILES ------ + +SRC = logexc.cpp wpmd.cpp wpmd_split.cpp +vpath %.cpp ivutils/src +vpath %.cpp systems/interact/TCP + +INC = \ + cerf.h \ + cerf2.h \ + cerf_octave.h \ + cvector_3.h \ + lapack_inter.h \ + logexc.h \ + pairhash.h \ + refobj.h \ + tcpdefs.h \ + vector_3.h \ + wavepacket.h \ + wpmd.h \ + wpmd_split.h + +# ------ DEFINITIONS ------ +DIR = Obj_mingw64/ +LIB = $(DIR)libawpmd.a +OBJ = $(SRC:%.cpp=$(DIR)%.o) + +# ------ SETTINGS ------ + +# include any MPI settings needed for the ATC library to build with +# the same MPI library that LAMMPS is built with + +CC = x86_64-w64-mingw32-g++ +CCFLAGS = -O3 -march=core2 -mtune=core2 -mpc64 -msse2 \ + -ffast-math -funroll-loops -fstrict-aliasing \ + -Wall -W -Wno-uninitialized -Isystems/interact/TCP/ -Isystems/interact -Iivutils/include +ARCHIVE = x86_64-w64-mingw32-ar +ARCHFLAG = -rscv +DEPFLAGS = -M +#LINK = +#LINKFLAGS = +USRLIB = +SYSLIB = + +# ------ MAKE PROCEDURE ------ + +default: $(DIR) $(LIB) Makefile.lammps + +$(DIR): + mkdir $(DIR) + +Makefile.lammps: + @cp $(EXTRAMAKE) Makefile.lammps + +$(LIB): $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + @cp $(EXTRAMAKE) Makefile.lammps + +# ------ COMPILE RULES ------ + +$(DIR)%.o:%.cpp + $(CC) $(CCFLAGS) -c $< -o $@ +$(DIR)%.d:%.cpp + $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ + +# ------ DEPENDENCIES ------ + +DEPENDS = $(OBJ:.o=.d) + +# ------ CLEAN ------ + +clean: + rm *.d *~ $(OBJ) $(LIB) diff --git a/lib/awpmd/Makefile.mingw64-cross-mpi b/lib/awpmd/Makefile.mingw64-cross-mpi new file mode 100644 index 000000000..1ec1a0995 --- /dev/null +++ b/lib/awpmd/Makefile.mingw64-cross-mpi @@ -0,0 +1,13 @@ +# -*- makefile -*- wrapper for non-MPI libraries + +SHELL=/bin/sh + +all: + $(MAKE) $(MFLAGS) mingw64-cross + rm -f Obj_mingw64-mpi + ln -s Obj_mingw64 Obj_mingw64-mpi + +clean: + $(MAKE) $(MFLAGS) clean-mingw64-cross + rm -f Obj_mingw64-mpi + diff --git a/lib/awpmd/ivutils/include/lapack_inter.h b/lib/awpmd/ivutils/include/lapack_inter.h index 743c5e605..e4497fc84 100644 --- a/lib/awpmd/ivutils/include/lapack_inter.h +++ b/lib/awpmd/ivutils/include/lapack_inter.h @@ -1,53 +1,53 @@ // Interface for LAPACK function # ifndef LAPACK_INTER_H # define LAPACK_INTER_H #include typedef int lapack_int; typedef complex lapack_complex_float; typedef complex lapack_complex_double; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(__MINGW32__) //#define MKL_Complex8 lapack_complex_float //#define MKL_Complex16 lapack_complex_double #include "mkl.h" inline void ZPPTRF( char* uplo, const lapack_int* n, lapack_complex_double* ap, lapack_int* info ) { ZPPTRF(uplo, (int*)n, (MKL_Complex16*)ap, (int*)info); } inline void ZPPTRI( char* uplo, const lapack_int* n, lapack_complex_double* ap, lapack_int* info ){ ZPPTRI(uplo, (int*)n, (MKL_Complex16*)ap, (int*)info); } #else #define DGETRF dgetrf_ #define DGETRS dgetrs_ #define DGETRI dgetri_ #define ZPPTRF zpptrf_ #define ZPPTRI zpptri_ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void dgetrf_( const lapack_int* m, const lapack_int* n, double* a, const lapack_int* lda, lapack_int* ipiv, lapack_int* info ); void dgetrs_( const char* trans, const lapack_int* n, const lapack_int* nrhs, const double* a, const lapack_int* lda, const lapack_int* ipiv, double* b, const lapack_int* ldb, lapack_int* info ); void dgetri_( const lapack_int* n, double* a, const lapack_int* lda, const lapack_int* ipiv, double* work, const lapack_int* lwork, lapack_int* info ); void zpptrf_( const char* uplo, const lapack_int* n, lapack_complex_double* ap, lapack_int* info ); void zpptri_( const char* uplo, const lapack_int* n, lapack_complex_double* ap, lapack_int* info ); #ifdef __cplusplus } #endif /* __cplusplus */ #endif #endif /* lapack_intER_H */ diff --git a/lib/awpmd/ivutils/include/logexc.h b/lib/awpmd/ivutils/include/logexc.h index e8b8ab3c5..68af8cd25 100644 --- a/lib/awpmd/ivutils/include/logexc.h +++ b/lib/awpmd/ivutils/include/logexc.h @@ -1,316 +1,316 @@ # ifndef LOGEXC_H # define LOGEXC_H #include #include #include #include #include -# ifndef _WIN32 +#if !defined(_WIN32) || defined(__MINGW32__) # include -# endif +#endif /// this specifies whether to put file/line info in error messages # ifndef LINFO # define LINFO 1 # endif using namespace std; /// verbosity levels enum vbLEVELS{ vblNONE = 0, ///< completely silent vblFATAL = 0x1, ///< report fatal errors vblOERR = 0x2, ///< report other errors vblERR = vblFATAL|vblOERR, ///< report all errors vblWARN = 0x4, ///< report warnings vblALLBAD = vblWARN|vblERR, ///< report all errors and warnings vblMESS1 = 0x8, ///< report messages of level 1 (important) vblMESS2 = 0x10, ///< report messages of level 2 (less important) vblMESS3 = 0x20, ///< report messages of level 3 (not important) vblMESS4 = 0x40, ///< report messages of level 4 (anything possible) vblALLMESS = vblMESS1|vblMESS2|vblMESS3|vblMESS4, ///< report all messages vblPROGR = 0x80, ///< report progress vblALL = 0xffff }; /// traits structure to deduce exception level and name from exception class /// by default all exceptions have vblFATAL level template struct log_exception_traits{ /// exeption level according to the vbLEVELS static int level(const exc_t &signal){ return vblFATAL; } /// the string name of exception category static string name(const exc_t &signal){ return typeid(exc_t).name();} /// adds some more explanations to the description /// default behaviour: nothing done static exc_t add_words(const exc_t &orig, const char *words){ return orig; } }; /// integer exceptions have the level equal to their value template<> struct log_exception_traits{ /// exeption level according to the vbLEVELS static int level(const int &signal){ return signal; } /// the string name of exception category static string name(const int &signal){ if(signal&vblFATAL) return "fatal error"; else if(signal&vblOERR) return "error"; else if(signal&vblWARN) return "warning"; else return ""; /* else if(signal&vblALLMESS) return "message"; else if(signal&vblPROGR) return "progress report"; else return "integer exception";*/ } /// default behaviour: nothing done static int add_words(const int &orig, const char *words){ return orig; } }; /// vbLEVELS exceptions act as integers template<> struct log_exception_traits{ static int level(const enum vbLEVELS &signal){ return log_exception_traits::level(signal); } static string name(const enum vbLEVELS &signal){ return log_exception_traits::name(signal); } static enum vbLEVELS add_words(const enum vbLEVELS &orig, const char *words){ return orig; } }; /// Logger class to control (computational) function behaviour when something requiring user attention has happened. /// message(signal,errcode, text) is used to either throw an exception or return errorcode /// At first, the the level of error is determined via log_exception_traits<>::level(signal) /// For integer (enum) signals the level is the signal itself. /// Then text is printed, if signal level is listed in output levels or (or in extra outlevels, if they are set) /// via log_text() function. /// If level has vblERR bit, the behaviour is controlled by the flag specified in set_throw(flag): /// flag=0: nothing done; /// flag=1: calls add_words() for signal and throws signal; /// flag=2: throws pair<>(errcode, text); /// flag=3: throws errcode. /// Then, if the level is listed in stop_levels (or in extra stop levels, if they are set), the program is aborted, /// otherwise errcode is returned; /// The function set_levels(out_levels,stop_levels) is used to specify bitflags for the levels which /// require message output or/and program termination. Stop level has effect only when exceptions are not thrown. /// The function extra_levels(eout_levels,estop_levels) is used to temporarily set the corresponding levels, /// they are unset (the original levels are restored) by calling extra_levels(0,0). class message_logger { // global message is a friend template friend int message(const exc_t &signal, int errcode, const char *what, ...); protected: string descriptor; int throw_ex; int outlevel, eoutlevel; int stoplevel, estoplevel; static message_logger *glogp; /// used to restore the previous global logger message_logger *prev, *next; public: message_logger(const string &descriptor_="", int out_level=vblALLBAD|vblMESS1, int stop_level=vblFATAL, int throw_exceptions=0, int use_globally=0) :descriptor(descriptor_),prev(NULL),next(NULL){ set_throw(throw_exceptions); set_levels(out_level,stop_level); extra_levels(0,0); if(use_globally){ set_global(true); } } /// returns a reference to global logger /// if not set, links with default message_logger static message_logger &global(); /// sets/unsets this logger as the global logger int set_global(bool set){ if(set){ if(prev) // already set return -1; if(glogp) glogp->next=this; prev=glogp; glogp=this; } else{ if(glogp!=this) // was not set as the global return -1; glogp=prev; if(glogp) glogp->next=NULL; prev=NULL; } return 1; } virtual void set_throw(int throw_exceptions){ throw_ex=throw_exceptions; } virtual void set_levels(int out_level=vblALLBAD|vblMESS1, int stop_level=vblFATAL){ outlevel=out_level; stoplevel=stop_level; } /// nonzero extra levels are applied instead of set ones virtual void extra_levels(int out_level=vblALLBAD|vblMESS1, int stop_level=vblFATAL){ eoutlevel=out_level; estoplevel=stop_level; } template int message(const exc_t &signal, int errcode, const char *what, ...){ int level=log_exception_traits::level(signal); char buff[1024]; if(level&(eoutlevel ? eoutlevel : outlevel)){ //needs to print a message va_list args; va_start(args,what); vsnprintf(buff,1024,what,args); log_text(level,log_exception_traits::name(signal).c_str(),buff); } if(level&vblERR){ if(throw_ex==1) // throws exc_t exception throw log_exception_traits::add_words(signal,buff); else if(throw_ex==2) // throws pair<>(int,const char*) exception throw make_pair(errcode,what); else if(throw_ex==3) // throws int exception throw errcode; } if(level&(estoplevel ? estoplevel: stoplevel) ){ // needs to stop exit(errcode); } return errcode; } virtual void log_text(int level, const char *messtype, const char *messtext){ if(descriptor!="") // descriptor is used as header printf("%s:\n",descriptor.c_str()); if(messtype!="") printf("%s: ",messtype); printf("%s\n",messtext); } /// checks that the deleted one is not in global logger chain ~message_logger(){ if(prev){ prev->next=next; if(next) next->prev=prev; } set_global(false); } }; /// global message function template int message(const exc_t &signal, int errcode, const char *what, ...){ if(message_logger::glogp){ va_list args; va_start(args,what); char buff[1024]; vsnprintf(buff,1024,what,args); return message_logger::glogp->message(signal,errcode,buff); } else return -1; } /// message logger for which std and error streams may be specified class stdfile_logger: public message_logger { protected: FILE *fout, *ferr; public: stdfile_logger(const string &descriptor_="", int throw_exceptions=0, FILE *out=stdout, FILE *err=stderr, int out_level=vblALLBAD|vblMESS1,int stop_level=vblFATAL, int use_globally=0) : message_logger(descriptor_,out_level,stop_level,throw_exceptions,use_globally),fout(NULL), ferr(NULL){ set_out(out); set_err(err); } virtual void set_out(FILE *out, int close_prev=0){ if(close_prev && fout && fout!=stderr && fout !=stdout) fclose(fout); fout=out; } virtual void set_err(FILE *err, int close_prev=0){ if(close_prev && ferr && ferr!=stderr && ferr !=stdout) fclose(ferr); ferr=err; } virtual void log_text(int level, const char *messtype, const char *messtext){ FILE *f= (level&vblALLBAD ? ferr : fout); if(!f) return; if(descriptor!="") // descriptor is used as header fprintf(f,"%s:\n",descriptor.c_str()); if(string(messtype)!="") fprintf(f,"%s: ",messtype); fprintf(f,"%s\n",messtext); } }; /// format a string const char *fmt(const char *format,...); /// macros with common usage #define LOGFATAL(code,text,lineinfo) ((lineinfo) ? ::message(vblFATAL,(code)," %s at %s:%d",(text),__FILE__,__LINE__) : \ (::message(vblFATAL,(code)," %s",(text))) ) #define LOGERR(code,text,lineinfo) ((lineinfo) ? ::message(vblOERR,(code)," %s at %s:%d",(text),__FILE__,__LINE__) : \ (::message(vblOERR,(code)," %s",(text))) ) #define LOGMSG(cat,text,lineinfo) ((lineinfo) ? ::message((cat),0," %s at %s:%d",(text),__FILE__,__LINE__) : \ (::message((cat),0," %s",(text))) ) # if 0 /// did not work /// this may be used to inherit exceptions /// where level and name are defined whithin a class struct log_exception { /// exeption level according to the vbLEVELS static int level(const log_exception &signal){ return vblFATAL; } /// the string name of exception category static string name(const log_exception &signal){ return "undefined exception";} }; /// log_exceptions act as themselves template<> struct log_exception_traits{ static int level(const log_exception &signal){ return log_exception::level(signal); } static string name(const log_exception &signal){ return log_exception::name(signal); } }; # endif # endif diff --git a/lib/awpmd/ivutils/include/wavepacket.h b/lib/awpmd/ivutils/include/wavepacket.h index dc203f74b..e24ac4e23 100644 --- a/lib/awpmd/ivutils/include/wavepacket.h +++ b/lib/awpmd/ivutils/include/wavepacket.h @@ -1,242 +1,244 @@ # ifndef WAVEPACKET_H # define WAVEPACKET_H # ifndef _USE_MATH_DEFINES # define _USE_MATH_DEFINES # endif # include # include # include # include "cvector_3.h" using namespace std; /** @file wpmd.h @brief Classes to handle Gaussian Wave Packets. */ // Constants const double MIN_EXP_ARG = -15.; // Minimum noticeable argument for exp function class WavePacket; ///\en Template for v=der operation in \ref Wavepacket::int2phys_der() template struct eq_second : public binary_function { Type operator()(const Type& _Left, const Type& _Right) const{ return _Right; } }; ///\en Template for v=-der operation in \ref Wavepacket::int2phys_der() template struct eq_minus_second : public binary_function { Type operator()(const Type& _Left, const Type& _Right) const{ return -_Right; } }; ///\en Compares complex numbers on a per component basis. /// \return \retval 0 if all component differences are 0 within tolerance \a tol (EQUAL), /// \retval -1 for LESS /// \retval 2 for GREATER template< class CT > int compare_compl(const CT &a, const CT& b, double tol=0.){ double dd=real(a)-real(b); if(dd<-tol) return -1; if(dd>tol) return 1; dd=imag(a)-imag(b); if(dd<-tol) return -1; if(dd>tol) return 1; return 0; } ///\en Compares vectors on a per component basis. /// \return \retval 0 if all component differences are 0 within tolerance \a tol (EQUAL), /// \retval -1 for LESS /// \retval 2 for GREATER inline int compare_vec(const Vector_3 &a, const Vector_3& b, double tol=0.){ for(int i=0;i<3;i++){ double dd=a[i]-b[i]; if(dd<-tol) return -1; if(dd>tol) return 1; } return 0; } /// wavepacket is w(x)=exp(-a*x^2+b*x+lz) class WavePacket{ /// constructs a conjugate packet friend WavePacket conj(const WavePacket &wp); public: cdouble a; cVector_3 b; cdouble lz; WavePacket(const cdouble &sa=cdouble(1.,0.),const cVector_3 &sb=cVector_3(0.,0.), const cdouble &slz=0.): a(sa), b(sb), lz(slz){ } WavePacket operator*(const WavePacket& other) const { return WavePacket(a+other.a,b+other.b,lz+other.lz); } /// returns the integral of w(x) over 3D space cdouble integral() const { cdouble z = lz + b.norm2()/(4.*a); if(real(z) < MIN_EXP_ARG) return 0.; return pow(M_PI/a,3./2.)*exp(z); } /// init normalized packet with physical parameters: r0, p0, width, pw /// w(x)=(3/2pi width^(3/4)exp[-(3/(4 width^2)-i pw/(2*width) )(x-r)^2+i p (x-r)] void init(const double width=1., const Vector_3 &r=0., const Vector_3 &p=0., const double pw=0.){ a = (3./(2.*width) - cdouble(0.,1.)*pw)/(2.*width); b = (2.*a)*r + cdouble(0.,1.)*p; lz = log(3./(2.*M_PI*width*width))*(3./4.) + (-a*r.norm2() - cdouble(0.,1.)*(p*r)); } /// init normalized packet with complex parameters a and b /// w(x)=(3/2pi width^(3/4)exp[-(3/(4 width^2)-i pw/(2*width) )(x-r)^2+i p (x-r)] void init(const cdouble &a_, const cVector_3 &b_){ a = a_; b = b_; Vector_3 r = get_r(); double r2 = r.norm2(); lz = cdouble( log( real(a)*(2./M_PI) )*(3./4.) - r2*real(a), r2*imag(a) - r*imag(b) ); } cdouble operator()(const Vector_3 &x) const { return exp(lz - a*x.norm2() + b*x); } /// ajusts lz so that Integral[w*(conj(w))] is 1 after this operation WavePacket& normalize(){ //lz=0.; //lz=overlap(conj(*this)); //lz=(-1./2)*log(lz); Vector_3 r = get_r(); double r2 = r.norm2(); lz = cdouble( log( real(a)*(2./M_PI) )*(3./4.) - r2*real(a), r2*imag(a) - r*imag(b) ); return *this; } /// computes 3D overlap of wavepackets Inegral[w*other] cdouble overlap(const WavePacket &other) const{ WavePacket wp=(*this)*other; return wp.integral(); } /// returns translated packet to the position of r'=r+dr WavePacket translate(const Vector_3 &dr) const { WavePacket wp(a,b,lz); wp.b+=2*dr*a; Vector_3 r=get_r(); double dr2=(r+dr).norm2()-r.norm2(); wp.lz+=-a*dr2-cdouble(0.,(get_p()*dr)); return wp; } /// width double get_width() const{ return sqrt(3./4./real(a)); } /// width momentum double get_pwidth() const{ return -imag(a)*sqrt(3./real(a)); } /// both width and width momentum pair get_width_pars() const{ double c=sqrt(3./2./real(a)); return make_pair(c/2,-imag(a)*c); } /// position Vector_3 get_r() const { return real(b)/(2*real(a)); } /// momentum Vector_3 get_p() const { return imag(b) - real(b)*(imag(a)/real(a)); } ///\en Transforms derivatives of a function whith respect to WP parameters /// from internal into physical representation, i. e.:\n /// from df/d{are,aim,b0re,b0im,b1re,b1im,b2re,b2im} (8 values accessed by input iterator d_it in the given order)\n /// to df/d{x0,x1,x2}, df/d{p0,p1,p2}, df/dw, df/dpw /// The supplied inputs (val) are modified by op: val=op(val,phys_der). /// Use operation=eq_second for the supplied inputs to be replaced by new physical derivative values. /// The inpput and output locations may coinside, an internal buffer is used for transformation. template class operation, class d_it, class dfdx_it, class dfdp_it, class dfdw_it, class dfdpw_it> void int2phys_der(d_it dfdi_,dfdx_it dfdx, dfdp_it dfdp, dfdw_it dfdw, dfdpw_it dfdpw, double h_p=h_plank) const { operation op; double dfdi[8], dfn[8];// internal buffer for(int i=0;i<8;i++) dfdi[i]=*dfdi_++; double w=get_width(); Vector_3 r=get_r(); double t=3/(2*w*w*w); dfn[6]= -t*dfdi[0]-imag(a)*dfdi[1]/w; //dw dfn[7]=-dfdi[1]/(2*w*h_p); // dpw for(int i=0;i<3;i++){ dfn[i]= 2*real(a)*dfdi[2+2*i]+2*imag(a)*dfdi[2+2*i+1]; dfn[3+i]= dfdi[2+2*i+1]*(/*m_electron*/1./h_p) ; //*(h_plank/m_electron); dfn[7]+=-(r[i]*dfdi[2+2*i+1]/w)/h_p; dfn[6]+=-2*r[i]*(t*dfdi[2+2*i]+imag(a)*dfdi[2+2*i+1]/w); } int i=0; for(int k=0;k<3;k++) *dfdx++=op(*dfdx,dfn[i++]); for(int k=0;k<3;k++) *dfdp++=op(*dfdp,dfn[i++]); *dfdw=op(*dfdw,dfn[i++]); *dfdpw=op(*dfdpw,dfn[i++]); } ///\en Compares the wave packet to another on a per component basis. /// \return \retval 0 if all component differences are 0 within tolerance \a tol (EQUAL), /// \retval -1 for LESS /// \retval 2 for GREATER int compare(const WavePacket &other, double tol=0.) const { int res=compare_compl(a,other.a, tol); if(res) return res; for(int i=0;i<3;i++){ res=compare_compl(b[i],other.b[i]); if(res) return res; } return 0; } }; - /*double w=wk.get_width(); +#if 0 + double w=wk.get_width(); Vector_3 r=wk.get_r(); double t=3/(2*w*w*w); fe_w[ic1+k1]+= t*E_der[s1][indw1+8*k1]+imag(wk.a)*E_der[s1][indw1+8*k1+1]/w; fe_pw[ic1+k1]+=E_der[s1][indw1+8*k1+1]/(2*w*h_plank); for(int i=0;i<3;i++){ fe_x[ic1+k1][i]+= -2*real(wk.a)*E_der[s1][indw1+8*k1+2+2*i]-2*imag(wk.a)*E_der[s1][indw1+8*k1+2+2*i+1]; fe_p[ic1+k1][i]+= (-E_der[s1][indw1+8*k1+2+2*i+1])*(m_electron/h_plank); //*(h_plank/m_electron); fe_pw[ic1+k1]+=(r[i]*E_der[s1][indw1+8*k1+2+2*i+1]/w)/h_plank; fe_w[ic1+k1]+=2*r[i]*(t*E_der[s1][indw1+8*k1+2+2*i]+imag(wk.a)*E_der[s1][indw1+8*k1+2+2*i+1]/w); - }*/ + } +#endif /// constructs a conjugate packet inline WavePacket conj(const WavePacket &wp){ return WavePacket(conj(wp.a),conj(wp.b),conj(wp.lz)); } -# endif // WAVEPACKET_H \ No newline at end of file +# endif // WAVEPACKET_H diff --git a/lib/gpu/Makefile.lammps b/lib/gpu/Makefile.lammps new file mode 100644 index 000000000..05651c5d7 --- /dev/null +++ b/lib/gpu/Makefile.lammps @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package library is used + +gpu_SYSINC = +gpu_SYSLIB = -lcudart -lcuda +gpu_SYSPATH = -L/usr/local/cuda/lib64 diff --git a/lib/gpu/Makefile.lammps.mingw-cross b/lib/gpu/Makefile.lammps.mingw-cross new file mode 100644 index 000000000..e92c3e9d0 --- /dev/null +++ b/lib/gpu/Makefile.lammps.mingw-cross @@ -0,0 +1,6 @@ +# Settings that the LAMMPS build will import when this package library is used +# settings for OpenCL builds +gpu_SYSINC = +gpu_SYSLIB = -Wl,--enable-stdcall-fixup -L../../tools/mingw-cross$(LIBOBJDIR) -lOpenCL +gpu_SYSPATH = + diff --git a/lib/gpu/Makefile.mingw32-cross b/lib/gpu/Makefile.mingw32-cross new file mode 100644 index 000000000..3f1240af1 --- /dev/null +++ b/lib/gpu/Makefile.mingw32-cross @@ -0,0 +1,17 @@ +CUDA_HOME = ../../tools/mingw-cross/OpenCL + +OCL_CPP = i686-w64-mingw32-g++ -O2 -march=i686 -mtune=generic -mfpmath=387 \ + -mpc64 -DMPI_GERYON -DUCL_NO_EXIT -I../../src/STUBS \ + -I$(CUDA_HOME)/include +OCL_LINK = -Wl,--enable-stdcall-fixup -L$(CUDA_HOME)/../Obj_mingw32 -lOpenCL -L../../src/STUBS -lmpi_mingw32 +OCL_PREC = -D_SINGLE_DOUBLE +OCL_TUNE = -DFERMI_OCL +EXTRAMAKE = Makefile.lammps.mingw-cross + +BIN_DIR = Obj_mingw32 +OBJ_DIR = Obj_mingw32 +LIB_DIR = Obj_mingw32 +AR = i686-w64-mingw32-ar +BSH = /bin/sh + +include Opencl.makefile diff --git a/lib/gpu/Makefile.mingw32-cross-mpi b/lib/gpu/Makefile.mingw32-cross-mpi new file mode 100644 index 000000000..6dae2d060 --- /dev/null +++ b/lib/gpu/Makefile.mingw32-cross-mpi @@ -0,0 +1,19 @@ +CUDA_HOME = ../../tools/mingw-cross/OpenCL + +OCL_CPP = i686-w64-mingw32-g++ -O2 -march=i686 -mtune=generic -mfpmath=387 \ + -mpc64 -DMPI_GERYON -DUCL_NO_EXIT -I$(CUDA_HOME)/include \ + -I../../tools/mingw-cross/mpich2-win32/include/ \ + -DMPICH_IGNORE_CXX_SEEK +OCL_LINK = -Wl,--enable-stdcall-fixup -L$(CUDA_HOME)/../Obj_mingw32 -lOpenCL \ + -L../../tools/mingw-cross/mpich2-win32/lib -lmpi +OCL_PREC = -D_SINGLE_DOUBLE +OCL_TUNE = -DFERMI_OCL +EXTRAMAKE = Makefile.lammps.mingw-cross + +BIN_DIR = Obj_mingw32-mpi +OBJ_DIR = Obj_mingw32-mpi +LIB_DIR = Obj_mingw32-mpi +AR = i686-w64-mingw32-ar +BSH = /bin/sh + +include Opencl.makefile diff --git a/lib/gpu/Makefile.mingw64-cross b/lib/gpu/Makefile.mingw64-cross new file mode 100644 index 000000000..606b0309c --- /dev/null +++ b/lib/gpu/Makefile.mingw64-cross @@ -0,0 +1,18 @@ +CUDA_HOME = ../../tools/mingw-cross/OpenCL + +OCL_CPP = x86_64-w64-mingw32-g++ -O3 -march=core2 -mtune=core2 -mpc64 \ + -msse2 -DMPI_GERYON -DUCL_NO_EXIT -I../../src/STUBS \ + -I$(CUDA_HOME)/include +OCL_LINK = -Wl,--enable-stdcall-fixup -L$(CUDA_HOME)/../Obj_mingw64 -lOpenCL \ + -L../../src/STUBS -lmpi_mingw64 +OCL_PREC = -D_SINGLE_DOUBLE +OCL_TUNE = -DFERMI_OCL +EXTRAMAKE = Makefile.lammps.mingw-cross + +BIN_DIR = Obj_mingw64 +OBJ_DIR = Obj_mingw64 +LIB_DIR = Obj_mingw64 +AR = x86_64-w64-mingw32-ar +BSH = /bin/sh + +include Opencl.makefile diff --git a/lib/gpu/Makefile.mingw64-cross-mpi b/lib/gpu/Makefile.mingw64-cross-mpi new file mode 100644 index 000000000..cea8155ef --- /dev/null +++ b/lib/gpu/Makefile.mingw64-cross-mpi @@ -0,0 +1,20 @@ +CUDA_HOME = ../../tools/mingw-cross/OpenCL + +OCL_CPP = x86_64-w64-mingw32-g++ -O3 -march=core2 -mtune=core2 -mpc64 \ + -msse2 -DMPI_GERYON -DUCL_NO_EXIT -I$(CUDA_HOME)/include \ + -I../../tools/mingw-cross/mpich2-win64/include/ \ + -DMPICH_IGNORE_CXX_SEEK + +OCL_LINK = -Wl,--enable-stdcall-fixup -L$(CUDA_HOME)/../Obj_mingw64 -lOpenCL \ + -L../../tools/mingw-cross/mpich2-win64/lib -lmpi +OCL_PREC = -D_SINGLE_DOUBLE +OCL_TUNE = -DFERMI_OCL +EXTRAMAKE = Makefile.lammps.mingw-cross + +BIN_DIR = Obj_mingw64-mpi +OBJ_DIR = Obj_mingw64-mpi +LIB_DIR = Obj_mingw64-mpi +AR = x86_64-w64-mingw32-ar +BSH = /bin/sh + +include Opencl.makefile diff --git a/lib/gpu/Nvidia.makefile b/lib/gpu/Nvidia.makefile index 2a279ca0c..ce6132dd5 100644 --- a/lib/gpu/Nvidia.makefile +++ b/lib/gpu/Nvidia.makefile @@ -1,585 +1,588 @@ CUDA = $(NVCC) $(CUDA_INCLUDE) $(CUDA_OPTS) -Icudpp_mini $(CUDA_ARCH) \ $(CUDA_PRECISION) CUDR = $(CUDR_CPP) $(CUDR_OPTS) $(CUDA_PRECISION) $(CUDA_INCLUDE) \ $(CUDPP_OPT) CUDA_LINK = $(CUDA_LIB) -lcudart BIN2C = $(CUDA_HOME)/bin/bin2c GPU_LIB = $(LIB_DIR)/libgpu.a # Headers for Geryon UCL_H = $(wildcard ./geryon/ucl*.h) NVC_H = $(wildcard ./geryon/nvc*.h) $(UCL_H) NVD_H = $(wildcard ./geryon/nvd*.h) $(UCL_H) lal_preprocessor.h # Headers for Pair Stuff PAIR_H = lal_atom.h lal_answer.h lal_neighbor_shared.h \ lal_neighbor.h lal_precision.h lal_device.h \ lal_balance.h lal_pppm.h ALL_H = $(NVD_H) $(PAIR_H) EXECS = $(BIN_DIR)/nvc_get_devices ifdef CUDPP_OPT CUDPP = $(OBJ_DIR)/cudpp.o $(OBJ_DIR)/cudpp_plan.o \ $(OBJ_DIR)/cudpp_maximal_launch.o $(OBJ_DIR)/cudpp_plan_manager.o \ $(OBJ_DIR)/radixsort_app.cu_o $(OBJ_DIR)/scan_app.cu_o endif OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_ans.o \ $(OBJ_DIR)/lal_neighbor.o $(OBJ_DIR)/lal_neighbor_shared.o \ $(OBJ_DIR)/lal_device.o $(OBJ_DIR)/lal_base_atomic.o \ $(OBJ_DIR)/lal_base_charge.o $(OBJ_DIR)/lal_base_ellipsoid.o \ $(OBJ_DIR)/lal_base_dipole.o \ $(OBJ_DIR)/lal_pppm.o $(OBJ_DIR)/lal_pppm_ext.o \ $(OBJ_DIR)/lal_gayberne.o $(OBJ_DIR)/lal_gayberne_ext.o \ $(OBJ_DIR)/lal_re_squared.o $(OBJ_DIR)/lal_re_squared_ext.o \ $(OBJ_DIR)/lal_lj.o $(OBJ_DIR)/lal_lj_ext.o \ $(OBJ_DIR)/lal_lj96.o $(OBJ_DIR)/lal_lj96_ext.o \ $(OBJ_DIR)/lal_lj_expand.o $(OBJ_DIR)/lal_lj_expand_ext.o \ $(OBJ_DIR)/lal_lj_coul.o $(OBJ_DIR)/lal_lj_coul_ext.o \ $(OBJ_DIR)/lal_lj_coul_long.o $(OBJ_DIR)/lal_lj_coul_long_ext.o \ $(OBJ_DIR)/lal_lj_dsf.o $(OBJ_DIR)/lal_lj_dsf_ext.o \ $(OBJ_DIR)/lal_lj_class2_long.o $(OBJ_DIR)/lal_lj_class2_long_ext.o \ $(OBJ_DIR)/lal_coul_long.o $(OBJ_DIR)/lal_coul_long_ext.o \ $(OBJ_DIR)/lal_morse.o $(OBJ_DIR)/lal_morse_ext.o \ $(OBJ_DIR)/lal_charmm_long.o $(OBJ_DIR)/lal_charmm_long_ext.o \ $(OBJ_DIR)/lal_cg_cmm.o $(OBJ_DIR)/lal_cg_cmm_ext.o \ $(OBJ_DIR)/lal_cg_cmm_long.o $(OBJ_DIR)/lal_cg_cmm_long_ext.o \ $(OBJ_DIR)/lal_eam.o $(OBJ_DIR)/lal_eam_ext.o \ $(OBJ_DIR)/lal_buck.o $(OBJ_DIR)/lal_buck_ext.o \ $(OBJ_DIR)/lal_buck_coul.o $(OBJ_DIR)/lal_buck_coul_ext.o \ $(OBJ_DIR)/lal_buck_coul_long.o $(OBJ_DIR)/lal_buck_coul_long_ext.o \ $(OBJ_DIR)/lal_table.o $(OBJ_DIR)/lal_table_ext.o \ $(OBJ_DIR)/lal_yukawa.o $(OBJ_DIR)/lal_yukawa_ext.o \ $(OBJ_DIR)/lal_born.o $(OBJ_DIR)/lal_born_ext.o \ $(OBJ_DIR)/lal_born_coul_wolf.o $(OBJ_DIR)/lal_born_coul_wolf_ext.o \ $(OBJ_DIR)/lal_born_coul_long.o $(OBJ_DIR)/lal_born_coul_long_ext.o \ $(OBJ_DIR)/lal_dipole_lj.o $(OBJ_DIR)/lal_dipole_lj_ext.o \ $(OBJ_DIR)/lal_dipole_lj_sf.o $(OBJ_DIR)/lal_dipole_lj_sf_ext.o \ $(OBJ_DIR)/lal_colloid.o $(OBJ_DIR)/lal_colloid_ext.o \ $(OBJ_DIR)/lal_gauss.o $(OBJ_DIR)/lal_gauss_ext.o \ $(OBJ_DIR)/lal_yukawa_colloid.o $(OBJ_DIR)/lal_yukawa_colloid_ext.o \ $(OBJ_DIR)/lal_lj_coul_debye.o $(OBJ_DIR)/lal_lj_coul_debye_ext.o \ $(OBJ_DIR)/lal_coul_dsf.o $(OBJ_DIR)/lal_coul_dsf_ext.o CBNS = $(OBJ_DIR)/device.cubin $(OBJ_DIR)/device_cubin.h \ $(OBJ_DIR)/atom.cubin $(OBJ_DIR)/atom_cubin.h \ $(OBJ_DIR)/neighbor_cpu.cubin $(OBJ_DIR)/neighbor_cpu_cubin.h \ $(OBJ_DIR)/neighbor_gpu.cubin $(OBJ_DIR)/neighbor_gpu_cubin.h \ $(OBJ_DIR)/pppm_f.cubin $(OBJ_DIR)/pppm_f_cubin.h \ $(OBJ_DIR)/pppm_d.cubin $(OBJ_DIR)/pppm_d_cubin.h \ $(OBJ_DIR)/ellipsoid_nbor.cubin $(OBJ_DIR)/ellipsoid_nbor_cubin.h \ $(OBJ_DIR)/gayberne.cubin $(OBJ_DIR)/gayberne_lj.cubin \ $(OBJ_DIR)/gayberne_cubin.h $(OBJ_DIR)/gayberne_lj_cubin.h \ $(OBJ_DIR)/re_squared.cubin $(OBJ_DIR)/re_squared_lj.cubin \ $(OBJ_DIR)/re_squared_cubin.h $(OBJ_DIR)/re_squared_lj_cubin.h \ $(OBJ_DIR)/lj.cubin $(OBJ_DIR)/lj_cubin.h \ $(OBJ_DIR)/lj96.cubin $(OBJ_DIR)/lj96_cubin.h \ $(OBJ_DIR)/lj_expand.cubin $(OBJ_DIR)/lj_expand_cubin.h \ $(OBJ_DIR)/lj_coul.cubin $(OBJ_DIR)/lj_coul_cubin.h \ $(OBJ_DIR)/lj_coul_long.cubin $(OBJ_DIR)/lj_coul_long_cubin.h \ $(OBJ_DIR)/lj_dsf.cubin $(OBJ_DIR)/lj_dsf_cubin.h \ $(OBJ_DIR)/lj_class2_long.cubin $(OBJ_DIR)/lj_class2_long_cubin.h \ $(OBJ_DIR)/coul_long.cubin $(OBJ_DIR)/coul_long_cubin.h \ $(OBJ_DIR)/morse.cubin $(OBJ_DIR)/morse_cubin.h \ $(OBJ_DIR)/charmm_long.cubin $(OBJ_DIR)/charmm_long_cubin.h \ $(OBJ_DIR)/cg_cmm.cubin $(OBJ_DIR)/cg_cmm_cubin.h \ $(OBJ_DIR)/cg_cmm_long.cubin $(OBJ_DIR)/cg_cmm_long_cubin.h \ $(OBJ_DIR)/eam.cubin $(OBJ_DIR)/eam_cubin.h \ $(OBJ_DIR)/buck.cubin $(OBJ_DIR)/buck_cubin.h \ $(OBJ_DIR)/buck_coul_long.cubin $(OBJ_DIR)/buck_coul_long_cubin.h \ $(OBJ_DIR)/buck_coul.cubin $(OBJ_DIR)/buck_coul_cubin.h \ $(OBJ_DIR)/table.cubin $(OBJ_DIR)/table_cubin.h \ $(OBJ_DIR)/yukawa.cubin $(OBJ_DIR)/yukawa_cubin.h \ $(OBJ_DIR)/born.cubin $(OBJ_DIR)/born_cubin.h \ $(OBJ_DIR)/born_coul_wolf.cubin $(OBJ_DIR)/born_coul_wolf_cubin.h \ $(OBJ_DIR)/born_coul_long.cubin $(OBJ_DIR)/born_coul_long_cubin.h \ $(OBJ_DIR)/dipole_lj.cubin $(OBJ_DIR)/dipole_lj_cubin.h \ $(OBJ_DIR)/dipole_lj_sf.cubin $(OBJ_DIR)/dipole_lj_sf_cubin.h \ $(OBJ_DIR)/colloid.cubin $(OBJ_DIR)/colloid_cubin.h \ $(OBJ_DIR)/gauss.cubin $(OBJ_DIR)/gauss_cubin.h \ $(OBJ_DIR)/yukawa_colloid.cubin $(OBJ_DIR)/yukawa_colloid_cubin.h \ $(OBJ_DIR)/lj_coul_debye.cubin $(OBJ_DIR)/lj_coul_debye_cubin.h \ $(OBJ_DIR)/coul_dsf.cubin $(OBJ_DIR)/coul_dsf_cubin.h -all: $(GPU_LIB) $(EXECS) +all: $(OBJ_DIR) $(GPU_LIB) $(EXECS) + +$(OBJ_DIR): + mkdir -p $@ $(OBJ_DIR)/cudpp.o: cudpp_mini/cudpp.cpp $(CUDR) -o $@ -c cudpp_mini/cudpp.cpp -Icudpp_mini $(OBJ_DIR)/cudpp_plan.o: cudpp_mini/cudpp_plan.cpp $(CUDR) -o $@ -c cudpp_mini/cudpp_plan.cpp -Icudpp_mini $(OBJ_DIR)/cudpp_maximal_launch.o: cudpp_mini/cudpp_maximal_launch.cpp $(CUDR) -o $@ -c cudpp_mini/cudpp_maximal_launch.cpp -Icudpp_mini $(OBJ_DIR)/cudpp_plan_manager.o: cudpp_mini/cudpp_plan_manager.cpp $(CUDR) -o $@ -c cudpp_mini/cudpp_plan_manager.cpp -Icudpp_mini $(OBJ_DIR)/radixsort_app.cu_o: cudpp_mini/radixsort_app.cu $(CUDA) -o $@ -c cudpp_mini/radixsort_app.cu $(OBJ_DIR)/scan_app.cu_o: cudpp_mini/scan_app.cu $(CUDA) -o $@ -c cudpp_mini/scan_app.cu $(OBJ_DIR)/atom.cubin: lal_atom.cu lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_atom.cu $(OBJ_DIR)/atom_cubin.h: $(OBJ_DIR)/atom.cubin $(BIN2C) -c -n atom $(OBJ_DIR)/atom.cubin > $(OBJ_DIR)/atom_cubin.h $(OBJ_DIR)/lal_atom.o: lal_atom.cpp lal_atom.h $(NVD_H) $(OBJ_DIR)/atom_cubin.h $(CUDR) -o $@ -c lal_atom.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_ans.o: lal_answer.cpp lal_answer.h $(NVD_H) $(CUDR) -o $@ -c lal_answer.cpp -I$(OBJ_DIR) $(OBJ_DIR)/neighbor_cpu.cubin: lal_neighbor_cpu.cu lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_neighbor_cpu.cu $(OBJ_DIR)/neighbor_cpu_cubin.h: $(OBJ_DIR)/neighbor_cpu.cubin $(BIN2C) -c -n neighbor_cpu $(OBJ_DIR)/neighbor_cpu.cubin > $(OBJ_DIR)/neighbor_cpu_cubin.h $(OBJ_DIR)/neighbor_gpu.cubin: lal_neighbor_gpu.cu lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_neighbor_gpu.cu $(OBJ_DIR)/neighbor_gpu_cubin.h: $(OBJ_DIR)/neighbor_gpu.cubin $(BIN2C) -c -n neighbor_gpu $(OBJ_DIR)/neighbor_gpu.cubin > $(OBJ_DIR)/neighbor_gpu_cubin.h $(OBJ_DIR)/lal_neighbor_shared.o: lal_neighbor_shared.cpp lal_neighbor_shared.h $(OBJ_DIR)/neighbor_cpu_cubin.h $(OBJ_DIR)/neighbor_gpu_cubin.h $(NVD_H) $(CUDR) -o $@ -c lal_neighbor_shared.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_neighbor.o: lal_neighbor.cpp lal_neighbor.h lal_neighbor_shared.h $(NVD_H) $(CUDR) -o $@ -c lal_neighbor.cpp -I$(OBJ_DIR) $(OBJ_DIR)/device.cubin: lal_device.cu lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_device.cu $(OBJ_DIR)/device_cubin.h: $(OBJ_DIR)/device.cubin $(BIN2C) -c -n device $(OBJ_DIR)/device.cubin > $(OBJ_DIR)/device_cubin.h $(OBJ_DIR)/lal_device.o: lal_device.cpp lal_device.h $(ALL_H) $(OBJ_DIR)/device_cubin.h $(CUDR) -o $@ -c lal_device.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_base_atomic.o: $(ALL_H) lal_base_atomic.h lal_base_atomic.cpp $(CUDR) -o $@ -c lal_base_atomic.cpp $(OBJ_DIR)/lal_base_charge.o: $(ALL_H) lal_base_charge.h lal_base_charge.cpp $(CUDR) -o $@ -c lal_base_charge.cpp $(OBJ_DIR)/lal_base_ellipsoid.o: $(ALL_H) lal_base_ellipsoid.h lal_base_ellipsoid.cpp $(OBJ_DIR)/ellipsoid_nbor_cubin.h $(CUDR) -o $@ -c lal_base_ellipsoid.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_base_dipole.o: $(ALL_H) lal_base_dipole.h lal_base_dipole.cpp $(CUDR) -o $@ -c lal_base_dipole.cpp $(OBJ_DIR)/pppm_f.cubin: lal_pppm.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -Dgrdtyp=float -Dgrdtyp4=float4 -o $@ lal_pppm.cu $(OBJ_DIR)/pppm_f_cubin.h: $(OBJ_DIR)/pppm_f.cubin $(BIN2C) -c -n pppm_f $(OBJ_DIR)/pppm_f.cubin > $(OBJ_DIR)/pppm_f_cubin.h $(OBJ_DIR)/pppm_d.cubin: lal_pppm.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -Dgrdtyp=double -Dgrdtyp4=double4 -o $@ lal_pppm.cu $(OBJ_DIR)/pppm_d_cubin.h: $(OBJ_DIR)/pppm_d.cubin $(BIN2C) -c -n pppm_d $(OBJ_DIR)/pppm_d.cubin > $(OBJ_DIR)/pppm_d_cubin.h $(OBJ_DIR)/lal_pppm.o: $(ALL_H) lal_pppm.h lal_pppm.cpp $(OBJ_DIR)/pppm_f_cubin.h $(OBJ_DIR)/pppm_d_cubin.h $(CUDR) -o $@ -c lal_pppm.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_pppm_ext.o: $(ALL_H) lal_pppm.h lal_pppm_ext.cpp $(CUDR) -o $@ -c lal_pppm_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/ellipsoid_nbor.cubin: lal_ellipsoid_nbor.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_ellipsoid_nbor.cu $(OBJ_DIR)/ellipsoid_nbor_cubin.h: $(OBJ_DIR)/ellipsoid_nbor.cubin $(BIN2C) -c -n ellipsoid_nbor $(OBJ_DIR)/ellipsoid_nbor.cubin > $(OBJ_DIR)/ellipsoid_nbor_cubin.h $(OBJ_DIR)/gayberne.cubin: lal_gayberne.cu lal_precision.h lal_ellipsoid_extra.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_gayberne.cu $(OBJ_DIR)/gayberne_lj.cubin: lal_gayberne_lj.cu lal_precision.h lal_ellipsoid_extra.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_gayberne_lj.cu $(OBJ_DIR)/gayberne_cubin.h: $(OBJ_DIR)/gayberne.cubin $(BIN2C) -c -n gayberne $(OBJ_DIR)/gayberne.cubin > $(OBJ_DIR)/gayberne_cubin.h $(OBJ_DIR)/gayberne_lj_cubin.h: $(OBJ_DIR)/gayberne_lj.cubin $(BIN2C) -c -n gayberne_lj $(OBJ_DIR)/gayberne_lj.cubin > $(OBJ_DIR)/gayberne_lj_cubin.h $(OBJ_DIR)/lal_gayberne.o: $(ALL_H) lal_gayberne.h lal_gayberne.cpp $(OBJ_DIR)/gayberne_cubin.h $(OBJ_DIR)/gayberne_lj_cubin.h $(OBJ_DIR)/lal_base_ellipsoid.o $(CUDR) -o $@ -c lal_gayberne.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_gayberne_ext.o: $(ALL_H) $(OBJ_DIR)/lal_gayberne.o lal_gayberne_ext.cpp $(CUDR) -o $@ -c lal_gayberne_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/re_squared.cubin: lal_re_squared.cu lal_precision.h lal_ellipsoid_extra.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_re_squared.cu $(OBJ_DIR)/re_squared_lj.cubin: lal_re_squared_lj.cu lal_precision.h lal_ellipsoid_extra.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_re_squared_lj.cu $(OBJ_DIR)/re_squared_cubin.h: $(OBJ_DIR)/re_squared.cubin $(BIN2C) -c -n re_squared $(OBJ_DIR)/re_squared.cubin > $(OBJ_DIR)/re_squared_cubin.h $(OBJ_DIR)/re_squared_lj_cubin.h: $(OBJ_DIR)/re_squared_lj.cubin $(BIN2C) -c -n re_squared_lj $(OBJ_DIR)/re_squared_lj.cubin > $(OBJ_DIR)/re_squared_lj_cubin.h $(OBJ_DIR)/lal_re_squared.o: $(ALL_H) lal_re_squared.h lal_re_squared.cpp $(OBJ_DIR)/re_squared_cubin.h $(OBJ_DIR)/re_squared_lj_cubin.h $(OBJ_DIR)/lal_base_ellipsoid.o $(CUDR) -o $@ -c lal_re_squared.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_re_squared_ext.o: $(ALL_H) $(OBJ_DIR)/lal_re_squared.o lal_re_squared_ext.cpp $(CUDR) -o $@ -c lal_re_squared_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj.cubin: lal_lj.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj.cu $(OBJ_DIR)/lj_cubin.h: $(OBJ_DIR)/lj.cubin $(OBJ_DIR)/lj.cubin $(BIN2C) -c -n lj $(OBJ_DIR)/lj.cubin > $(OBJ_DIR)/lj_cubin.h $(OBJ_DIR)/lal_lj.o: $(ALL_H) lal_lj.h lal_lj.cpp $(OBJ_DIR)/lj_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_lj.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_ext.o: $(ALL_H) lal_lj.h lal_lj_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_lj_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_coul.cubin: lal_lj_coul.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj_coul.cu $(OBJ_DIR)/lj_coul_cubin.h: $(OBJ_DIR)/lj_coul.cubin $(OBJ_DIR)/lj_coul.cubin $(BIN2C) -c -n lj_coul $(OBJ_DIR)/lj_coul.cubin > $(OBJ_DIR)/lj_coul_cubin.h $(OBJ_DIR)/lal_lj_coul.o: $(ALL_H) lal_lj_coul.h lal_lj_coul.cpp $(OBJ_DIR)/lj_coul_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_lj_coul.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_coul_ext.o: $(ALL_H) lal_lj_coul.h lal_lj_coul_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_lj_coul_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_class2_long.cubin: lal_lj_class2_long.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj_class2_long.cu $(OBJ_DIR)/lj_class2_long_cubin.h: $(OBJ_DIR)/lj_class2_long.cubin $(OBJ_DIR)/lj_class2_long.cubin $(BIN2C) -c -n lj_class2_long $(OBJ_DIR)/lj_class2_long.cubin > $(OBJ_DIR)/lj_class2_long_cubin.h $(OBJ_DIR)/lal_lj_class2_long.o: $(ALL_H) lal_lj_class2_long.h lal_lj_class2_long.cpp $(OBJ_DIR)/lj_class2_long_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_lj_class2_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_class2_long_ext.o: $(ALL_H) lal_lj_class2_long.h lal_lj_class2_long_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_lj_class2_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/coul_long.cubin: lal_coul_long.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_coul_long.cu $(OBJ_DIR)/coul_long_cubin.h: $(OBJ_DIR)/coul_long.cubin $(OBJ_DIR)/coul_long.cubin $(BIN2C) -c -n coul_long $(OBJ_DIR)/coul_long.cubin > $(OBJ_DIR)/coul_long_cubin.h $(OBJ_DIR)/lal_coul_long.o: $(ALL_H) lal_coul_long.h lal_coul_long.cpp $(OBJ_DIR)/coul_long_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_coul_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_coul_long_ext.o: $(ALL_H) lal_coul_long.h lal_coul_long_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_coul_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_coul_long.cubin: lal_lj_coul_long.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj_coul_long.cu $(OBJ_DIR)/lj_coul_long_cubin.h: $(OBJ_DIR)/lj_coul_long.cubin $(OBJ_DIR)/lj_coul_long.cubin $(BIN2C) -c -n lj_coul_long $(OBJ_DIR)/lj_coul_long.cubin > $(OBJ_DIR)/lj_coul_long_cubin.h $(OBJ_DIR)/lal_lj_coul_long.o: $(ALL_H) lal_lj_coul_long.h lal_lj_coul_long.cpp $(OBJ_DIR)/lj_coul_long_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_lj_coul_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_coul_long_ext.o: $(ALL_H) lal_lj_coul_long.h lal_lj_coul_long_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_lj_coul_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_dsf.cubin: lal_lj_dsf.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj_dsf.cu $(OBJ_DIR)/lj_dsf_cubin.h: $(OBJ_DIR)/lj_dsf.cubin $(OBJ_DIR)/lj_dsf.cubin $(BIN2C) -c -n lj_dsf $(OBJ_DIR)/lj_dsf.cubin > $(OBJ_DIR)/lj_dsf_cubin.h $(OBJ_DIR)/lal_lj_dsf.o: $(ALL_H) lal_lj_dsf.h lal_lj_dsf.cpp $(OBJ_DIR)/lj_dsf_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_lj_dsf.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_dsf_ext.o: $(ALL_H) lal_lj_dsf.h lal_lj_dsf_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_lj_dsf_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/morse.cubin: lal_morse.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_morse.cu $(OBJ_DIR)/morse_cubin.h: $(OBJ_DIR)/morse.cubin $(OBJ_DIR)/morse.cubin $(BIN2C) -c -n morse $(OBJ_DIR)/morse.cubin > $(OBJ_DIR)/morse_cubin.h $(OBJ_DIR)/lal_morse.o: $(ALL_H) lal_morse.h lal_morse.cpp $(OBJ_DIR)/morse_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_morse.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_morse_ext.o: $(ALL_H) lal_morse.h lal_morse_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_morse_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/charmm_long.cubin: lal_charmm_long.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_charmm_long.cu $(OBJ_DIR)/charmm_long_cubin.h: $(OBJ_DIR)/charmm_long.cubin $(OBJ_DIR)/charmm_long.cubin $(BIN2C) -c -n charmm_long $(OBJ_DIR)/charmm_long.cubin > $(OBJ_DIR)/charmm_long_cubin.h $(OBJ_DIR)/lal_charmm_long.o: $(ALL_H) lal_charmm_long.h lal_charmm_long.cpp $(OBJ_DIR)/charmm_long_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_charmm_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_charmm_long_ext.o: $(ALL_H) lal_charmm_long.h lal_charmm_long_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_charmm_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj96.cubin: lal_lj96.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj96.cu $(OBJ_DIR)/lj96_cubin.h: $(OBJ_DIR)/lj96.cubin $(OBJ_DIR)/lj96.cubin $(BIN2C) -c -n lj96 $(OBJ_DIR)/lj96.cubin > $(OBJ_DIR)/lj96_cubin.h $(OBJ_DIR)/lal_lj96.o: $(ALL_H) lal_lj96.h lal_lj96.cpp $(OBJ_DIR)/lj96_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_lj96.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj96_ext.o: $(ALL_H) lal_lj96.h lal_lj96_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_lj96_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_expand.cubin: lal_lj_expand.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj_expand.cu $(OBJ_DIR)/lj_expand_cubin.h: $(OBJ_DIR)/lj_expand.cubin $(OBJ_DIR)/lj_expand.cubin $(BIN2C) -c -n lj_expand $(OBJ_DIR)/lj_expand.cubin > $(OBJ_DIR)/lj_expand_cubin.h $(OBJ_DIR)/lal_lj_expand.o: $(ALL_H) lal_lj_expand.h lal_lj_expand.cpp $(OBJ_DIR)/lj_expand_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_lj_expand.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_expand_ext.o: $(ALL_H) lal_lj_expand.h lal_lj_expand_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_lj_expand_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/cg_cmm.cubin: lal_cg_cmm.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_cg_cmm.cu $(OBJ_DIR)/cg_cmm_cubin.h: $(OBJ_DIR)/cg_cmm.cubin $(OBJ_DIR)/cg_cmm.cubin $(BIN2C) -c -n cg_cmm $(OBJ_DIR)/cg_cmm.cubin > $(OBJ_DIR)/cg_cmm_cubin.h $(OBJ_DIR)/lal_cg_cmm.o: $(ALL_H) lal_cg_cmm.h lal_cg_cmm.cpp $(OBJ_DIR)/cg_cmm_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_cg_cmm.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_cg_cmm_ext.o: $(ALL_H) lal_cg_cmm.h lal_cg_cmm_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_cg_cmm_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/cg_cmm_long.cubin: lal_cg_cmm_long.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_cg_cmm_long.cu $(OBJ_DIR)/cg_cmm_long_cubin.h: $(OBJ_DIR)/cg_cmm_long.cubin $(OBJ_DIR)/cg_cmm_long.cubin $(BIN2C) -c -n cg_cmm_long $(OBJ_DIR)/cg_cmm_long.cubin > $(OBJ_DIR)/cg_cmm_long_cubin.h $(OBJ_DIR)/lal_cg_cmm_long.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long.cpp $(OBJ_DIR)/cg_cmm_long_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_cg_cmm_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_cg_cmm_long_ext.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_cg_cmm_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/eam.cubin: lal_eam.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_eam.cu $(OBJ_DIR)/eam_cubin.h: $(OBJ_DIR)/eam.cubin $(OBJ_DIR)/eam.cubin $(BIN2C) -c -n eam $(OBJ_DIR)/eam.cubin > $(OBJ_DIR)/eam_cubin.h $(OBJ_DIR)/lal_eam.o: $(ALL_H) lal_eam.h lal_eam.cpp $(OBJ_DIR)/eam_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_eam.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_eam_ext.o: $(ALL_H) lal_eam.h lal_eam_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_eam_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/buck.cubin: lal_buck.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_buck.cu $(OBJ_DIR)/buck_cubin.h: $(OBJ_DIR)/buck.cubin $(OBJ_DIR)/buck.cubin $(BIN2C) -c -n buck $(OBJ_DIR)/buck.cubin > $(OBJ_DIR)/buck_cubin.h $(OBJ_DIR)/lal_buck.o: $(ALL_H) lal_buck.h lal_buck.cpp $(OBJ_DIR)/buck_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_buck.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_buck_ext.o: $(ALL_H) lal_buck.h lal_buck_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_buck_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/buck_coul.cubin: lal_buck_coul.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_buck_coul.cu $(OBJ_DIR)/buck_coul_cubin.h: $(OBJ_DIR)/buck_coul.cubin $(OBJ_DIR)/buck_coul.cubin $(BIN2C) -c -n buck_coul $(OBJ_DIR)/buck_coul.cubin > $(OBJ_DIR)/buck_coul_cubin.h $(OBJ_DIR)/lal_buck_coul.o: $(ALL_H) lal_buck_coul.h lal_buck_coul.cpp $(OBJ_DIR)/buck_coul_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_buck_coul.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_buck_coul_ext.o: $(ALL_H) lal_buck_coul.h lal_buck_coul_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_buck_coul_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/buck_coul_long.cubin: lal_buck_coul_long.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_buck_coul_long.cu $(OBJ_DIR)/buck_coul_long_cubin.h: $(OBJ_DIR)/buck_coul_long.cubin $(OBJ_DIR)/buck_coul_long.cubin $(BIN2C) -c -n buck_coul_long $(OBJ_DIR)/buck_coul_long.cubin > $(OBJ_DIR)/buck_coul_long_cubin.h $(OBJ_DIR)/lal_buck_coul_long.o: $(ALL_H) lal_buck_coul_long.h lal_buck_coul_long.cpp $(OBJ_DIR)/buck_coul_long_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_buck_coul_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_buck_coul_long_ext.o: $(ALL_H) lal_buck_coul_long.h lal_buck_coul_long_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_buck_coul_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/table.cubin: lal_table.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_table.cu $(OBJ_DIR)/table_cubin.h: $(OBJ_DIR)/table.cubin $(OBJ_DIR)/table.cubin $(BIN2C) -c -n table $(OBJ_DIR)/table.cubin > $(OBJ_DIR)/table_cubin.h $(OBJ_DIR)/lal_table.o: $(ALL_H) lal_table.h lal_table.cpp $(OBJ_DIR)/table_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_table.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_table_ext.o: $(ALL_H) lal_table.h lal_table_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_table_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/yukawa.cubin: lal_yukawa.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_yukawa.cu $(OBJ_DIR)/yukawa_cubin.h: $(OBJ_DIR)/yukawa.cubin $(OBJ_DIR)/yukawa.cubin $(BIN2C) -c -n yukawa $(OBJ_DIR)/yukawa.cubin > $(OBJ_DIR)/yukawa_cubin.h $(OBJ_DIR)/lal_yukawa.o: $(ALL_H) lal_yukawa.h lal_yukawa.cpp $(OBJ_DIR)/yukawa_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_yukawa.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_yukawa_ext.o: $(ALL_H) lal_yukawa.h lal_yukawa_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_yukawa_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/born.cubin: lal_born.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_born.cu $(OBJ_DIR)/born_cubin.h: $(OBJ_DIR)/born.cubin $(OBJ_DIR)/born.cubin $(BIN2C) -c -n born $(OBJ_DIR)/born.cubin > $(OBJ_DIR)/born_cubin.h $(OBJ_DIR)/lal_born.o: $(ALL_H) lal_born.h lal_born.cpp $(OBJ_DIR)/born_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_born.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_born_ext.o: $(ALL_H) lal_born.h lal_born_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_born_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/born_coul_wolf.cubin: lal_born_coul_wolf.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_born_coul_wolf.cu $(OBJ_DIR)/born_coul_wolf_cubin.h: $(OBJ_DIR)/born_coul_wolf.cubin $(OBJ_DIR)/born_coul_wolf.cubin $(BIN2C) -c -n born_coul_wolf $(OBJ_DIR)/born_coul_wolf.cubin > $(OBJ_DIR)/born_coul_wolf_cubin.h $(OBJ_DIR)/lal_born_coul_wolf.o: $(ALL_H) lal_born_coul_wolf.h lal_born_coul_wolf.cpp $(OBJ_DIR)/born_coul_wolf_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_born_coul_wolf.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_born_coul_wolf_ext.o: $(ALL_H) lal_born_coul_wolf.h lal_born_coul_wolf_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_born_coul_wolf_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/born_coul_long.cubin: lal_born_coul_long.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_born_coul_long.cu $(OBJ_DIR)/born_coul_long_cubin.h: $(OBJ_DIR)/born_coul_long.cubin $(OBJ_DIR)/born_coul_long.cubin $(BIN2C) -c -n born_coul_long $(OBJ_DIR)/born_coul_long.cubin > $(OBJ_DIR)/born_coul_long_cubin.h $(OBJ_DIR)/lal_born_coul_long.o: $(ALL_H) lal_born_coul_long.h lal_born_coul_long.cpp $(OBJ_DIR)/born_coul_long_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_born_coul_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_born_coul_long_ext.o: $(ALL_H) lal_born_coul_long.h lal_born_coul_long_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_born_coul_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/dipole_lj.cubin: lal_dipole_lj.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_dipole_lj.cu $(OBJ_DIR)/dipole_lj_cubin.h: $(OBJ_DIR)/dipole_lj.cubin $(OBJ_DIR)/dipole_lj.cubin $(BIN2C) -c -n dipole_lj $(OBJ_DIR)/dipole_lj.cubin > $(OBJ_DIR)/dipole_lj_cubin.h $(OBJ_DIR)/lal_dipole_lj.o: $(ALL_H) lal_dipole_lj.h lal_dipole_lj.cpp $(OBJ_DIR)/dipole_lj_cubin.h $(OBJ_DIR)/lal_base_dipole.o $(CUDR) -o $@ -c lal_dipole_lj.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_dipole_lj_ext.o: $(ALL_H) lal_dipole_lj.h lal_dipole_lj_ext.cpp lal_base_dipole.h $(CUDR) -o $@ -c lal_dipole_lj_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/dipole_lj_sf.cubin: lal_dipole_lj_sf.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_dipole_lj_sf.cu $(OBJ_DIR)/dipole_lj_sf_cubin.h: $(OBJ_DIR)/dipole_lj_sf.cubin $(OBJ_DIR)/dipole_lj_sf.cubin $(BIN2C) -c -n dipole_lj_sf $(OBJ_DIR)/dipole_lj_sf.cubin > $(OBJ_DIR)/dipole_lj_sf_cubin.h $(OBJ_DIR)/lal_dipole_lj_sf.o: $(ALL_H) lal_dipole_lj_sf.h lal_dipole_lj_sf.cpp $(OBJ_DIR)/dipole_lj_sf_cubin.h $(OBJ_DIR)/lal_base_dipole.o $(CUDR) -o $@ -c lal_dipole_lj_sf.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_dipole_lj_sf_ext.o: $(ALL_H) lal_dipole_lj_sf.h lal_dipole_lj_sf_ext.cpp lal_base_dipole.h $(CUDR) -o $@ -c lal_dipole_lj_sf_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/colloid.cubin: lal_colloid.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_colloid.cu $(OBJ_DIR)/colloid_cubin.h: $(OBJ_DIR)/colloid.cubin $(OBJ_DIR)/colloid.cubin $(BIN2C) -c -n colloid $(OBJ_DIR)/colloid.cubin > $(OBJ_DIR)/colloid_cubin.h $(OBJ_DIR)/lal_colloid.o: $(ALL_H) lal_colloid.h lal_colloid.cpp $(OBJ_DIR)/colloid_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_colloid.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_colloid_ext.o: $(ALL_H) lal_colloid.h lal_colloid_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_colloid_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/gauss.cubin: lal_gauss.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_gauss.cu $(OBJ_DIR)/gauss_cubin.h: $(OBJ_DIR)/gauss.cubin $(OBJ_DIR)/gauss.cubin $(BIN2C) -c -n gauss $(OBJ_DIR)/gauss.cubin > $(OBJ_DIR)/gauss_cubin.h $(OBJ_DIR)/lal_gauss.o: $(ALL_H) lal_gauss.h lal_gauss.cpp $(OBJ_DIR)/gauss_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_gauss.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_gauss_ext.o: $(ALL_H) lal_gauss.h lal_gauss_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_gauss_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/yukawa_colloid.cubin: lal_yukawa_colloid.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_yukawa_colloid.cu $(OBJ_DIR)/yukawa_colloid_cubin.h: $(OBJ_DIR)/yukawa_colloid.cubin $(OBJ_DIR)/yukawa_colloid.cubin $(BIN2C) -c -n yukawa_colloid $(OBJ_DIR)/yukawa_colloid.cubin > $(OBJ_DIR)/yukawa_colloid_cubin.h $(OBJ_DIR)/lal_yukawa_colloid.o: $(ALL_H) lal_yukawa_colloid.h lal_yukawa_colloid.cpp $(OBJ_DIR)/yukawa_colloid_cubin.h $(OBJ_DIR)/lal_base_atomic.o $(CUDR) -o $@ -c lal_yukawa_colloid.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_yukawa_colloid_ext.o: $(ALL_H) lal_yukawa_colloid.h lal_yukawa_colloid_ext.cpp lal_base_atomic.h $(CUDR) -o $@ -c lal_yukawa_colloid_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_coul_debye.cubin: lal_lj_coul_debye.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_lj_coul_debye.cu $(OBJ_DIR)/lj_coul_debye_cubin.h: $(OBJ_DIR)/lj_coul_debye.cubin $(OBJ_DIR)/lj_coul_debye.cubin $(BIN2C) -c -n lj_coul_debye $(OBJ_DIR)/lj_coul_debye.cubin > $(OBJ_DIR)/lj_coul_debye_cubin.h $(OBJ_DIR)/lal_lj_coul_debye.o: $(ALL_H) lal_lj_coul_debye.h lal_lj_coul_debye.cpp $(OBJ_DIR)/lj_coul_debye_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_lj_coul_debye.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_coul_debye_ext.o: $(ALL_H) lal_lj_coul_debye.h lal_lj_coul_debye_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_lj_coul_debye_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/coul_dsf.cubin: lal_coul_dsf.cu lal_precision.h lal_preprocessor.h $(CUDA) --cubin -DNV_KERNEL -o $@ lal_coul_dsf.cu $(OBJ_DIR)/coul_dsf_cubin.h: $(OBJ_DIR)/coul_dsf.cubin $(OBJ_DIR)/coul_dsf.cubin $(BIN2C) -c -n coul_dsf $(OBJ_DIR)/coul_dsf.cubin > $(OBJ_DIR)/coul_dsf_cubin.h $(OBJ_DIR)/lal_coul_dsf.o: $(ALL_H) lal_coul_dsf.h lal_coul_dsf.cpp $(OBJ_DIR)/coul_dsf_cubin.h $(OBJ_DIR)/lal_base_charge.o $(CUDR) -o $@ -c lal_coul_dsf.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_coul_dsf_ext.o: $(ALL_H) lal_coul_dsf.h lal_coul_dsf_ext.cpp lal_base_charge.h $(CUDR) -o $@ -c lal_coul_dsf_ext.cpp -I$(OBJ_DIR) $(BIN_DIR)/nvc_get_devices: ./geryon/ucl_get_devices.cpp $(NVD_H) $(CUDR) -o $@ ./geryon/ucl_get_devices.cpp -DUCL_CUDADR $(CUDA_LIB) -lcuda $(GPU_LIB): $(OBJS) $(CUDPP) $(AR) -crusv $(GPU_LIB) $(OBJS) $(CUDPP) @cp $(EXTRAMAKE) Makefile.lammps clean: rm -f $(EXECS) $(GPU_LIB) $(OBJS) $(CUDPP) $(CBNS) *.linkinfo veryclean: clean rm -rf *~ *.linkinfo cleanlib: rm -f $(EXECS) $(GPU_LIB) $(OBJS) $(CBNS) *.linkinfo diff --git a/lib/gpu/Opencl.makefile b/lib/gpu/Opencl.makefile index e66accfe7..b476003ec 100644 --- a/lib/gpu/Opencl.makefile +++ b/lib/gpu/Opencl.makefile @@ -1,419 +1,422 @@ OCL = $(OCL_CPP) $(OCL_PREC) $(OCL_TUNE) -DUSE_OPENCL OCL_LIB = $(LIB_DIR)/libgpu.a # Headers for Geryon UCL_H = $(wildcard ./geryon/ucl*.h) OCL_H = $(wildcard ./geryon/ocl*.h) $(UCL_H) # Headers for Pair Stuff PAIR_H = lal_atom.h lal_answer.h lal_neighbor_shared.h \ lal_neighbor.h lal_precision.h lal_device.h \ lal_balance.h lal_pppm.h # Headers for Preprocessor/Auxiliary Functions PRE1_H = lal_preprocessor.h lal_aux_fun1.h ALL_H = $(OCL_H) $(PAIR_H) EXECS = $(BIN_DIR)/ocl_get_devices OBJS = $(OBJ_DIR)/lal_atom.o $(OBJ_DIR)/lal_answer.o \ $(OBJ_DIR)/lal_neighbor_shared.o $(OBJ_DIR)/lal_neighbor.o \ $(OBJ_DIR)/lal_device.o $(OBJ_DIR)/lal_base_atomic.o \ $(OBJ_DIR)/lal_base_charge.o $(OBJ_DIR)/lal_base_ellipsoid.o \ $(OBJ_DIR)/lal_base_dipole.o \ $(OBJ_DIR)/lal_pppm.o $(OBJ_DIR)/lal_pppm_ext.o \ $(OBJ_DIR)/lal_gayberne.o $(OBJ_DIR)/lal_gayberne_ext.o \ $(OBJ_DIR)/lal_re_squared.o $(OBJ_DIR)/lal_re_squared_ext.o \ $(OBJ_DIR)/lal_lj.o $(OBJ_DIR)/lal_lj_ext.o \ $(OBJ_DIR)/lal_lj96.o $(OBJ_DIR)/lal_lj96_ext.o \ $(OBJ_DIR)/lal_lj_expand.o $(OBJ_DIR)/lal_lj_expand_ext.o \ $(OBJ_DIR)/lal_lj_coul.o $(OBJ_DIR)/lal_lj_coul_ext.o \ $(OBJ_DIR)/lal_lj_coul_long.o $(OBJ_DIR)/lal_lj_coul_long_ext.o \ $(OBJ_DIR)/lal_lj_dsf.o $(OBJ_DIR)/lal_lj_dsf_ext.o \ $(OBJ_DIR)/lal_lj_class2_long.o $(OBJ_DIR)/lal_lj_class2_long_ext.o \ $(OBJ_DIR)/lal_coul_long.o $(OBJ_DIR)/lal_coul_long_ext.o \ $(OBJ_DIR)/lal_morse.o $(OBJ_DIR)/lal_morse_ext.o \ $(OBJ_DIR)/lal_charmm_long.o $(OBJ_DIR)/lal_charmm_long_ext.o \ $(OBJ_DIR)/lal_cg_cmm.o $(OBJ_DIR)/lal_cg_cmm_ext.o \ $(OBJ_DIR)/lal_cg_cmm_long.o $(OBJ_DIR)/lal_cg_cmm_long_ext.o \ $(OBJ_DIR)/lal_eam.o $(OBJ_DIR)/lal_eam_ext.o \ $(OBJ_DIR)/lal_buck.o $(OBJ_DIR)/lal_buck_ext.o \ $(OBJ_DIR)/lal_buck_coul.o $(OBJ_DIR)/lal_buck_coul_ext.o \ $(OBJ_DIR)/lal_buck_coul_long.o $(OBJ_DIR)/lal_buck_coul_long_ext.o \ $(OBJ_DIR)/lal_table.o $(OBJ_DIR)/lal_table_ext.o \ $(OBJ_DIR)/lal_yukawa.o $(OBJ_DIR)/lal_yukawa_ext.o \ $(OBJ_DIR)/lal_born.o $(OBJ_DIR)/lal_born_ext.o \ $(OBJ_DIR)/lal_born_coul_wolf.o $(OBJ_DIR)/lal_born_coul_wolf_ext.o \ $(OBJ_DIR)/lal_born_coul_long.o $(OBJ_DIR)/lal_born_coul_long_ext.o \ $(OBJ_DIR)/lal_dipole_lj.o $(OBJ_DIR)/lal_dipole_lj_ext.o \ $(OBJ_DIR)/lal_dipole_lj_sf.o $(OBJ_DIR)/lal_dipole_lj_sf_ext.o \ $(OBJ_DIR)/lal_colloid.o $(OBJ_DIR)/lal_colloid_ext.o \ $(OBJ_DIR)/lal_gauss.o $(OBJ_DIR)/lal_gauss_ext.o \ $(OBJ_DIR)/lal_yukawa_colloid.o $(OBJ_DIR)/lal_yukawa_colloid_ext.o \ $(OBJ_DIR)/lal_lj_coul_debye.o $(OBJ_DIR)/lal_lj_coul_debye_ext.o \ $(OBJ_DIR)/lal_coul_dsf.o $(OBJ_DIR)/lal_coul_dsf_ext.o KERS = $(OBJ_DIR)/device_cl.h $(OBJ_DIR)/atom_cl.h \ $(OBJ_DIR)/neighbor_cpu_cl.h $(OBJ_DIR)/pppm_cl.h \ $(OBJ_DIR)/ellipsoid_nbor_cl.h $(OBJ_DIR)/gayberne_cl.h \ $(OBJ_DIR)/gayberne_lj_cl.h $(OBJ_DIR)/re_squared_cl.h \ $(OBJ_DIR)/re_squared_lj_cl.h $(OBJ_DIR)/lj_cl.h $(OBJ_DIR)/lj96_cl.h \ $(OBJ_DIR)/lj_expand_cl.h $(OBJ_DIR)/lj_coul_cl.h \ $(OBJ_DIR)/lj_coul_long_cl.h $(OBJ_DIR)/lj_dsf_cl.h \ $(OBJ_DIR)/lj_class2_long_cl.h \ $(OBJ_DIR)/coul_long_cl.h $(OBJ_DIR)/morse_cl.h \ $(OBJ_DIR)/charmm_long_cl.h $(OBJ_DIR)/cg_cmm_cl.h \ $(OBJ_DIR)/cg_cmm_long_cl.h $(OBJ_DIR)/neighbor_gpu_cl.h \ $(OBJ_DIR)/eam_cl.h $(OBJ_DIR)/buck_cl.h \ $(OBJ_DIR)/buck_coul_cl.h $(OBJ_DIR)/buck_coul_long_cl.h \ $(OBJ_DIR)/table_cl.h $(OBJ_DIR)/yukawa_cl.h \ $(OBJ_DIR)/born_cl.h $(OBJ_DIR)/born_coul_wolf_cl.h \ $(OBJ_DIR)/born_coul_long_cl.h $(OBJ_DIR)/dipole_lj_cl.h \ $(OBJ_DIR)/dipole_lj_sf_cl.h $(OBJ_DIR)/colloid_cl.h \ $(OBJ_DIR)/gauss_cl.h $(OBJ_DIR)/yukawa_colloid_cl.h \ $(OBJ_DIR)/lj_coul_debye_cl.h $(OBJ_DIR)/coul_dsf_cl.h OCL_EXECS = $(BIN_DIR)/ocl_get_devices -all: $(OCL_LIB) $(EXECS) +all: $(OBJ_DIR) $(OCL_LIB) $(EXECS) + +$(OBJ_DIR): + mkdir -p $@ $(OBJ_DIR)/atom_cl.h: lal_atom.cu lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh atom lal_preprocessor.h lal_atom.cu $(OBJ_DIR)/atom_cl.h $(OBJ_DIR)/lal_atom.o: lal_atom.cpp lal_atom.h $(OCL_H) $(OBJ_DIR)/atom_cl.h $(OCL) -o $@ -c lal_atom.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_answer.o: lal_answer.cpp lal_answer.h $(OCL_H) $(OCL) -o $@ -c lal_answer.cpp -I$(OBJ_DIR) $(OBJ_DIR)/neighbor_cpu_cl.h: lal_neighbor_cpu.cu lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh neighbor_cpu lal_preprocessor.h lal_neighbor_cpu.cu $(OBJ_DIR)/neighbor_cpu_cl.h $(OBJ_DIR)/neighbor_gpu_cl.h: lal_neighbor_gpu.cu lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh neighbor_gpu lal_preprocessor.h lal_neighbor_gpu.cu $(OBJ_DIR)/neighbor_gpu_cl.h $(OBJ_DIR)/lal_neighbor_shared.o: lal_neighbor_shared.cpp lal_neighbor_shared.h $(OCL_H) $(OBJ_DIR)/neighbor_cpu_cl.h $(OBJ_DIR)/neighbor_gpu_cl.h $(OCL) -o $@ -c lal_neighbor_shared.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_neighbor.o: lal_neighbor.cpp lal_neighbor.h $(OCL_H) lal_neighbor_shared.h $(OCL) -o $@ -c lal_neighbor.cpp -I$(OBJ_DIR) $(OBJ_DIR)/device_cl.h: lal_device.cu lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh device lal_preprocessor.h lal_device.cu $(OBJ_DIR)/device_cl.h $(OBJ_DIR)/lal_device.o: lal_device.cpp lal_device.h $(ALL_H) $(OBJ_DIR)/device_cl.h $(OCL) -o $@ -c lal_device.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_base_atomic.o: $(OCL_H) lal_base_atomic.h lal_base_atomic.cpp $(OCL) -o $@ -c lal_base_atomic.cpp $(OBJ_DIR)/lal_base_charge.o: $(OCL_H) lal_base_charge.h lal_base_charge.cpp $(OCL) -o $@ -c lal_base_charge.cpp $(OBJ_DIR)/lal_base_ellipsoid.o: $(OCL_H) lal_base_ellipsoid.h lal_base_ellipsoid.cpp $(OBJ_DIR)/ellipsoid_nbor_cl.h $(OCL) -o $@ -c lal_base_ellipsoid.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_base_dipole.o: $(OCL_H) lal_base_dipole.h lal_base_dipole.cpp $(OCL) -o $@ -c lal_base_dipole.cpp -I$(OBJ_DIR) $(OBJ_DIR)/pppm_cl.h: lal_pppm.cu lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh pppm lal_preprocessor.h lal_pppm.cu $(OBJ_DIR)/pppm_cl.h; $(OBJ_DIR)/lal_pppm.o: $(ALL_H) lal_pppm.h lal_pppm.cpp $(OBJ_DIR)/pppm_cl.h $(OBJ_DIR)/pppm_cl.h $(OCL) -o $@ -c lal_pppm.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_pppm_ext.o: $(ALL_H) lal_pppm.h lal_pppm_ext.cpp $(OCL) -o $@ -c lal_pppm_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/ellipsoid_nbor_cl.h: lal_ellipsoid_nbor.cu lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh ellipsoid_nbor lal_preprocessor.h lal_ellipsoid_nbor.cu $(OBJ_DIR)/ellipsoid_nbor_cl.h $(OBJ_DIR)/gayberne_cl.h: lal_gayberne.cu lal_ellipsoid_extra.h lal_aux_fun1.h lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh gayberne lal_preprocessor.h lal_aux_fun1.h lal_ellipsoid_extra.h lal_gayberne.cu $(OBJ_DIR)/gayberne_cl.h; $(OBJ_DIR)/gayberne_lj_cl.h: lal_gayberne_lj.cu lal_ellipsoid_extra.h lal_aux_fun1.h lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh gayberne_lj lal_preprocessor.h lal_aux_fun1.h lal_ellipsoid_extra.h lal_gayberne_lj.cu $(OBJ_DIR)/gayberne_lj_cl.h; $(OBJ_DIR)/lal_gayberne.o: $(ALL_H) lal_gayberne.h lal_gayberne.cpp $(OBJ_DIR)/gayberne_cl.h $(OBJ_DIR)/gayberne_lj_cl.h $(OBJ_DIR)/lal_base_ellipsoid.o $(OCL) -o $@ -c lal_gayberne.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_gayberne_ext.o: $(ALL_H) $(OBJ_DIR)/lal_gayberne.o lal_gayberne_ext.cpp $(OCL) -o $@ -c lal_gayberne_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/re_squared_cl.h: lal_re_squared.cu lal_ellipsoid_extra.h lal_aux_fun1.h lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh re_squared lal_preprocessor.h lal_aux_fun1.h lal_ellipsoid_extra.h lal_re_squared.cu $(OBJ_DIR)/re_squared_cl.h; $(OBJ_DIR)/re_squared_lj_cl.h: lal_re_squared_lj.cu lal_ellipsoid_extra.h lal_aux_fun1.h lal_preprocessor.h $(BSH) ./geryon/file_to_cstr.sh re_squared_lj lal_preprocessor.h lal_aux_fun1.h lal_ellipsoid_extra.h lal_re_squared_lj.cu $(OBJ_DIR)/re_squared_lj_cl.h; $(OBJ_DIR)/lal_re_squared.o: $(ALL_H) lal_re_squared.h lal_re_squared.cpp $(OBJ_DIR)/re_squared_cl.h $(OBJ_DIR)/re_squared_lj_cl.h $(OBJ_DIR)/lal_base_ellipsoid.o $(OCL) -o $@ -c lal_re_squared.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_re_squared_ext.o: $(ALL_H) $(OBJ_DIR)/lal_re_squared.o lal_re_squared_ext.cpp $(OCL) -o $@ -c lal_re_squared_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_cl.h: lal_lj.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh lj $(PRE1_H) lal_lj.cu $(OBJ_DIR)/lj_cl.h; $(OBJ_DIR)/lal_lj.o: $(ALL_H) lal_lj.h lal_lj.cpp $(OBJ_DIR)/lj_cl.h $(OBJ_DIR)/lj_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_lj.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_ext.o: $(ALL_H) lal_lj.h lal_lj_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_lj_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_coul_cl.h: lal_lj_coul.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh lj_coul $(PRE1_H) lal_lj_coul.cu $(OBJ_DIR)/lj_coul_cl.h; $(OBJ_DIR)/lal_lj_coul.o: $(ALL_H) lal_lj_coul.h lal_lj_coul.cpp $(OBJ_DIR)/lj_coul_cl.h $(OBJ_DIR)/lj_coul_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_lj_coul.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_coul_ext.o: $(ALL_H) lal_lj_coul.h lal_lj_coul_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_lj_coul_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_coul_long_cl.h: lal_lj_coul_long.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh lj_coul_long $(PRE1_H) lal_lj_coul_long.cu $(OBJ_DIR)/lj_coul_long_cl.h; $(OBJ_DIR)/lal_lj_coul_long.o: $(ALL_H) lal_lj_coul_long.h lal_lj_coul_long.cpp $(OBJ_DIR)/lj_coul_long_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_lj_coul_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_coul_long_ext.o: $(ALL_H) lal_lj_coul_long.h lal_lj_coul_long_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_lj_coul_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_dsf_cl.h: lal_lj_dsf.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh lj_dsf $(PRE1_H) lal_lj_dsf.cu $(OBJ_DIR)/lj_dsf_cl.h; $(OBJ_DIR)/lal_lj_dsf.o: $(ALL_H) lal_lj_dsf.h lal_lj_dsf.cpp $(OBJ_DIR)/lj_dsf_cl.h $(OBJ_DIR)/lj_dsf_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_lj_dsf.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_dsf_ext.o: $(ALL_H) lal_lj_dsf.h lal_lj_dsf_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_lj_dsf_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_class2_long_cl.h: lal_lj_class2_long.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh lj_class2_long $(PRE1_H) lal_lj_class2_long.cu $(OBJ_DIR)/lj_class2_long_cl.h; $(OBJ_DIR)/lal_lj_class2_long.o: $(ALL_H) lal_lj_class2_long.h lal_lj_class2_long.cpp $(OBJ_DIR)/lj_class2_long_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_lj_class2_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_class2_long_ext.o: $(ALL_H) lal_lj_class2_long.h lal_lj_class2_long_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_lj_class2_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/coul_long_cl.h: lal_coul_long.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh coul_long $(PRE1_H) lal_coul_long.cu $(OBJ_DIR)/coul_long_cl.h; $(OBJ_DIR)/lal_coul_long.o: $(ALL_H) lal_coul_long.h lal_coul_long.cpp $(OBJ_DIR)/coul_long_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_coul_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_coul_long_ext.o: $(ALL_H) lal_coul_long.h lal_coul_long_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_coul_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/morse_cl.h: lal_morse.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh morse $(PRE1_H) lal_morse.cu $(OBJ_DIR)/morse_cl.h; $(OBJ_DIR)/lal_morse.o: $(ALL_H) lal_morse.h lal_morse.cpp $(OBJ_DIR)/morse_cl.h $(OBJ_DIR)/morse_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_morse.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_morse_ext.o: $(ALL_H) lal_morse.h lal_morse_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_morse_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/charmm_long_cl.h: lal_charmm_long.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh charmm_long $(PRE1_H) lal_charmm_long.cu $(OBJ_DIR)/charmm_long_cl.h; $(OBJ_DIR)/lal_charmm_long.o: $(ALL_H) lal_charmm_long.h lal_charmm_long.cpp $(OBJ_DIR)/charmm_long_cl.h $(OBJ_DIR)/charmm_long_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_charmm_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_charmm_long_ext.o: $(ALL_H) lal_charmm_long.h lal_charmm_long_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_charmm_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj96_cl.h: lal_lj96.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh lj96 $(PRE1_H) lal_lj96.cu $(OBJ_DIR)/lj96_cl.h; $(OBJ_DIR)/lal_lj96.o: $(ALL_H) lal_lj96.h lal_lj96.cpp $(OBJ_DIR)/lj96_cl.h $(OBJ_DIR)/lj96_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_lj96.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj96_ext.o: $(ALL_H) lal_lj96.h lal_lj96_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_lj96_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_expand_cl.h: lal_lj_expand.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh lj_expand $(PRE1_H) lal_lj_expand.cu $(OBJ_DIR)/lj_expand_cl.h; $(OBJ_DIR)/lal_lj_expand.o: $(ALL_H) lal_lj_expand.h lal_lj_expand.cpp $(OBJ_DIR)/lj_expand_cl.h $(OBJ_DIR)/lj_expand_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_lj_expand.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_expand_ext.o: $(ALL_H) lal_lj_expand.h lal_lj_expand_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_lj_expand_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/cg_cmm_cl.h: lal_cg_cmm.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh cg_cmm $(PRE1_H) lal_cg_cmm.cu $(OBJ_DIR)/cg_cmm_cl.h; $(OBJ_DIR)/lal_cg_cmm.o: $(ALL_H) lal_cg_cmm.h lal_cg_cmm.cpp $(OBJ_DIR)/cg_cmm_cl.h $(OBJ_DIR)/cg_cmm_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_cg_cmm.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_cg_cmm_ext.o: $(ALL_H) lal_cg_cmm.h lal_cg_cmm_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_cg_cmm_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/cg_cmm_long_cl.h: lal_cg_cmm_long.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh cg_cmm_long $(PRE1_H) lal_cg_cmm_long.cu $(OBJ_DIR)/cg_cmm_long_cl.h; $(OBJ_DIR)/lal_cg_cmm_long.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long.cpp $(OBJ_DIR)/cg_cmm_long_cl.h $(OBJ_DIR)/cg_cmm_long_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_cg_cmm_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_cg_cmm_long_ext.o: $(ALL_H) lal_cg_cmm_long.h lal_cg_cmm_long_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_cg_cmm_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/eam_cl.h: lal_eam.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh eam $(PRE1_H) lal_eam.cu $(OBJ_DIR)/eam_cl.h; $(OBJ_DIR)/lal_eam.o: $(ALL_H) lal_eam.h lal_eam.cpp $(OBJ_DIR)/eam_cl.h $(OBJ_DIR)/eam_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_eam.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_eam_ext.o: $(ALL_H) lal_eam.h lal_eam_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_eam_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/buck_cl.h: lal_buck.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh buck $(PRE1_H) lal_buck.cu $(OBJ_DIR)/buck_cl.h; $(OBJ_DIR)/lal_buck.o: $(ALL_H) lal_buck.h lal_buck.cpp $(OBJ_DIR)/buck_cl.h $(OBJ_DIR)/buck_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_buck.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_buck_ext.o: $(ALL_H) lal_buck.h lal_buck_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_buck_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/buck_coul_cl.h: lal_buck_coul.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh buck_coul $(PRE1_H) lal_buck_coul.cu $(OBJ_DIR)/buck_coul_cl.h; $(OBJ_DIR)/lal_buck_coul.o: $(ALL_H) lal_buck_coul.h lal_buck_coul.cpp $(OBJ_DIR)/buck_coul_cl.h $(OBJ_DIR)/buck_coul_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_buck_coul.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_buck_coul_ext.o: $(ALL_H) lal_buck_coul.h lal_buck_coul_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_buck_coul_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/buck_coul_long_cl.h: lal_buck_coul_long.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh buck_coul_long $(PRE1_H) lal_buck_coul_long.cu $(OBJ_DIR)/buck_coul_long_cl.h; $(OBJ_DIR)/lal_buck_coul_long.o: $(ALL_H) lal_buck_coul_long.h lal_buck_coul_long.cpp $(OBJ_DIR)/buck_coul_long_cl.h $(OBJ_DIR)/buck_coul_long_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_buck_coul_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_buck_coul_long_ext.o: $(ALL_H) lal_buck_coul_long.h lal_buck_coul_long_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_buck_coul_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/table_cl.h: lal_table.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh table $(PRE1_H) lal_table.cu $(OBJ_DIR)/table_cl.h; $(OBJ_DIR)/lal_table.o: $(ALL_H) lal_table.h lal_table.cpp $(OBJ_DIR)/table_cl.h $(OBJ_DIR)/table_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_table.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_table_ext.o: $(ALL_H) lal_table.h lal_table_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_table_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/yukawa_cl.h: lal_yukawa.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh yukawa $(PRE1_H) lal_yukawa.cu $(OBJ_DIR)/yukawa_cl.h; $(OBJ_DIR)/lal_yukawa.o: $(ALL_H) lal_yukawa.h lal_yukawa.cpp $(OBJ_DIR)/yukawa_cl.h $(OBJ_DIR)/yukawa_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_yukawa.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_yukawa_ext.o: $(ALL_H) lal_yukawa.h lal_yukawa_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_yukawa_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/born_cl.h: lal_born.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh born $(PRE1_H) lal_born.cu $(OBJ_DIR)/born_cl.h; $(OBJ_DIR)/lal_born.o: $(ALL_H) lal_born.h lal_born.cpp $(OBJ_DIR)/born_cl.h $(OBJ_DIR)/born_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_born.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_born_ext.o: $(ALL_H) lal_born.h lal_born_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_born_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/born_coul_wolf_cl.h: lal_born_coul_wolf.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh born_coul_wolf $(PRE1_H) lal_born_coul_wolf.cu $(OBJ_DIR)/born_coul_wolf_cl.h; $(OBJ_DIR)/lal_born_coul_wolf.o: $(ALL_H) lal_born_coul_wolf.h lal_born_coul_wolf.cpp $(OBJ_DIR)/born_coul_wolf_cl.h $(OBJ_DIR)/born_coul_wolf_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_born_coul_wolf.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_born_coul_wolf_ext.o: $(ALL_H) lal_born_coul_wolf.h lal_born_coul_wolf_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_born_coul_wolf_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/born_coul_long_cl.h: lal_born_coul_long.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh born_coul_long $(PRE1_H) lal_born_coul_long.cu $(OBJ_DIR)/born_coul_long_cl.h; $(OBJ_DIR)/lal_born_coul_long.o: $(ALL_H) lal_born_coul_long.h lal_born_coul_long.cpp $(OBJ_DIR)/born_coul_long_cl.h $(OBJ_DIR)/born_coul_long_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_born_coul_long.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_born_coul_long_ext.o: $(ALL_H) lal_born_coul_long.h lal_born_coul_long_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_born_coul_long_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/dipole_lj_cl.h: lal_dipole_lj.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh dipole_lj $(PRE1_H) lal_dipole_lj.cu $(OBJ_DIR)/dipole_lj_cl.h; $(OBJ_DIR)/lal_dipole_lj.o: $(ALL_H) lal_dipole_lj.h lal_dipole_lj.cpp $(OBJ_DIR)/dipole_lj_cl.h $(OBJ_DIR)/dipole_lj_cl.h $(OBJ_DIR)/lal_base_dipole.o $(OCL) -o $@ -c lal_dipole_lj.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_dipole_lj_ext.o: $(ALL_H) lal_dipole_lj.h lal_dipole_lj_ext.cpp lal_base_dipole.h $(OCL) -o $@ -c lal_dipole_lj_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/dipole_lj_sf_cl.h: lal_dipole_lj_sf.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh dipole_lj_sf $(PRE1_H) lal_dipole_lj_sf.cu $(OBJ_DIR)/dipole_lj_sf_cl.h; $(OBJ_DIR)/lal_dipole_lj_sf.o: $(ALL_H) lal_dipole_lj_sf.h lal_dipole_lj_sf.cpp $(OBJ_DIR)/dipole_lj_sf_cl.h $(OBJ_DIR)/dipole_lj_sf_cl.h $(OBJ_DIR)/lal_base_dipole.o $(OCL) -o $@ -c lal_dipole_lj_sf.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_dipole_lj_sf_ext.o: $(ALL_H) lal_dipole_lj_sf.h lal_dipole_lj_sf_ext.cpp lal_base_dipole.h $(OCL) -o $@ -c lal_dipole_lj_sf_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/colloid_cl.h: lal_colloid.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh colloid $(PRE1_H) lal_colloid.cu $(OBJ_DIR)/colloid_cl.h; $(OBJ_DIR)/lal_colloid.o: $(ALL_H) lal_colloid.h lal_colloid.cpp $(OBJ_DIR)/colloid_cl.h $(OBJ_DIR)/colloid_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_colloid.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_colloid_ext.o: $(ALL_H) lal_colloid.h lal_colloid_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_colloid_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/gauss_cl.h: lal_gauss.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh gauss $(PRE1_H) lal_gauss.cu $(OBJ_DIR)/gauss_cl.h; $(OBJ_DIR)/lal_gauss.o: $(ALL_H) lal_gauss.h lal_gauss.cpp $(OBJ_DIR)/gauss_cl.h $(OBJ_DIR)/gauss_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_gauss.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_gauss_ext.o: $(ALL_H) lal_gauss.h lal_gauss_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_gauss_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/yukawa_colloid_cl.h: lal_yukawa_colloid.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh yukawa_colloid $(PRE1_H) lal_yukawa_colloid.cu $(OBJ_DIR)/yukawa_colloid_cl.h; $(OBJ_DIR)/lal_yukawa_colloid.o: $(ALL_H) lal_yukawa_colloid.h lal_yukawa_colloid.cpp $(OBJ_DIR)/yukawa_colloid_cl.h $(OBJ_DIR)/yukawa_colloid_cl.h $(OBJ_DIR)/lal_base_atomic.o $(OCL) -o $@ -c lal_yukawa_colloid.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_yukawa_colloid_ext.o: $(ALL_H) lal_yukawa_colloid.h lal_yukawa_colloid_ext.cpp lal_base_atomic.h $(OCL) -o $@ -c lal_yukawa_colloid_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lj_coul_debye_cl.h: lal_lj_coul_debye.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh lj_coul_debye $(PRE1_H) lal_lj_coul_debye.cu $(OBJ_DIR)/lj_coul_debye_cl.h; $(OBJ_DIR)/lal_lj_coul_debye.o: $(ALL_H) lal_lj_coul_debye.h lal_lj_coul_debye.cpp $(OBJ_DIR)/lj_coul_debye_cl.h $(OBJ_DIR)/lj_coul_debye_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_lj_coul_debye.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_lj_coul_debye_ext.o: $(ALL_H) lal_lj_coul_debye.h lal_lj_coul_debye_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_lj_coul_debye_ext.cpp -I$(OBJ_DIR) $(OBJ_DIR)/coul_dsf_cl.h: lal_coul_dsf.cu $(PRE1_H) $(BSH) ./geryon/file_to_cstr.sh coul_dsf $(PRE1_H) lal_coul_dsf.cu $(OBJ_DIR)/coul_dsf_cl.h; $(OBJ_DIR)/lal_coul_dsf.o: $(ALL_H) lal_coul_dsf.h lal_coul_dsf.cpp $(OBJ_DIR)/coul_dsf_cl.h $(OBJ_DIR)/coul_dsf_cl.h $(OBJ_DIR)/lal_base_charge.o $(OCL) -o $@ -c lal_coul_dsf.cpp -I$(OBJ_DIR) $(OBJ_DIR)/lal_coul_dsf_ext.o: $(ALL_H) lal_coul_dsf.h lal_coul_dsf_ext.cpp lal_base_charge.h $(OCL) -o $@ -c lal_coul_dsf_ext.cpp -I$(OBJ_DIR) $(BIN_DIR)/ocl_get_devices: ./geryon/ucl_get_devices.cpp $(OCL) -o $@ ./geryon/ucl_get_devices.cpp -DUCL_OPENCL $(OCL_LINK) $(OCL_LIB): $(OBJS) $(PTXS) $(AR) -crusv $(OCL_LIB) $(OBJS) @cp $(EXTRAMAKE) Makefile.lammps opencl: $(OCL_EXECS) clean: rm -rf $(EXECS) $(OCL_EXECS) $(OCL_LIB) $(OBJS) $(KERS) *.linkinfo veryclean: clean rm -rf *~ *.linkinfo diff --git a/lib/linalg/Makefile.mingw32-cross b/lib/linalg/Makefile.mingw32-cross new file mode 100755 index 000000000..3facd2b00 --- /dev/null +++ b/lib/linalg/Makefile.mingw32-cross @@ -0,0 +1,85 @@ +# * +# *_________________________________________________________________________* +# * Minimal BLAS/LAPACK Library for ATC and AWPMD + +# To compile and link LAMMPS to the linalg library generated by this Makefile, +# adjust the corresponding definitions in the library's Makefile.lammps file. +# +# for lib/atc/Makefile.lammps use: +# user-atc_SYSINC = +# user-atc_SYSLIB = ../../lib/linalg/$(LIBOBJDIR)liblinalg.a -lgfortran +# user-atc_SYSPATH = +# +# for lib/awpmd/Makefile.lammps use: +# user-awpmd_SYSINC = +# user-awpmd_SYSLIB = ../../lib/linalg/$(LIBOBJDIR)liblinalg.a -lgfortran +# user-awpmd_SYSPATH = + +SHELL = /bin/sh + +# ------ FILES ------ + +SRC = dasum.f daxpy.f dcopy.f ddot.f dgecon.f dgemm.f dgemv.f dger.f \ + dgetf2.f dgetrf.f dgetri.f disnan.f dlabad.f dlaisnan.f dlamch.f\ + dlacn2.f dlange.f dlassq.f dlaswp.f dlatrs.f drscl.f dscal.f \ + dswap.f dtrmm.f dtrmv.f dtrsm.f dtrsv.f dtrti2.f dtrtri.f \ + idamax.f ieeeck.f ilaenv.f iparmq.f lsame.f xerbla.f zdotc.f \ + zdscal.f zhpr.f zpptrf.f zpptri.f zscal.f ztpmv.f ztpsv.f ztptri.f + +FILES = $(SRC) Makefile.* README + +# ------ DEFINITIONS ------ + +DIR = Obj_mingw32/ +LIB = $(DIR)liblinalg.a +OBJ = $(SRC:%.f=$(DIR)%.o) + +# ------ SETTINGS ------ + +FC = i686-w64-mingw32-gfortran +FFLAGS = -O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ + -ffast-math -funroll-loops -fstrict-aliasing -Wall -W \ + -Wno-uninitialized -fno-second-underscore +FFLAGS0 = -O0 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ + -Wall -W -Wno-uninitialized -fno-second-underscore +ARCHIVE = i686-w64-mingw32-ar +AR = i686-w64-mingw32-ar +ARCHFLAG = -rcs +USRLIB = +SYSLIB = + +.PHONY: default clean tar + +.SUFFIXES: +.SUFFIXES: .F .f .o + +# ------ MAKE PROCEDURE ------ + +default: $(DIR) $(LIB) + +$(LIB): $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + +$(DIR): + mkdir $(DIR) + +# ------ COMPILE RULES ------ + +$(DIR)%.o:%.F + $(F90) $(F90FLAGS) -c $< -o $@ + +$(DIR)%.o:%.f + $(FC) $(FFLAGS) -c $< -o $@ + +$(DIR)dlamch.o: dlamch.f + $(FC) $(FFLAGS0) -c $< -o $@ + +# ------ CLEAN ------ + +clean: + -rm $(DIR)*.o $(DIR)*.mod *~ $(LIB) + -rmdir $(DIR) + +tar: + -tar -czvf ../linalg.tar.gz $(FILES) + diff --git a/lib/linalg/Makefile.mingw32-cross-mpi b/lib/linalg/Makefile.mingw32-cross-mpi new file mode 100644 index 000000000..cc2a76111 --- /dev/null +++ b/lib/linalg/Makefile.mingw32-cross-mpi @@ -0,0 +1,13 @@ +# -*- makefile -*- wrapper for non-MPI libraries + +SHELL=/bin/sh + +all: + $(MAKE) $(MFLAGS) mingw32-cross + rm -f Obj_mingw32-mpi + ln -s Obj_mingw32 Obj_mingw32-mpi + +clean: + $(MAKE) $(MFLAGS) clean-mingw32-cross + rm -f Obj_mingw32-mpi + diff --git a/lib/linalg/Makefile.mingw64-cross b/lib/linalg/Makefile.mingw64-cross new file mode 100755 index 000000000..fa918a228 --- /dev/null +++ b/lib/linalg/Makefile.mingw64-cross @@ -0,0 +1,85 @@ +# * +# *_________________________________________________________________________* +# * Minimal BLAS/LAPACK Library for ATC and AWPMD + +# To compile and link LAMMPS to the linalg library generated by this Makefile, +# adjust the corresponding definitions in the library's Makefile.lammps file. +# +# for lib/atc/Makefile.lammps use: +# user-atc_SYSINC = +# user-atc_SYSLIB = ../../lib/linalg/$(LIBOBJDIR)liblinalg.a -lgfortran +# user-atc_SYSPATH = +# +# for lib/awpmd/Makefile.lammps use: +# user-awpmd_SYSINC = +# user-awpmd_SYSLIB = ../../lib/linalg/$(LIBOBJDIR)liblinalg.a -lgfortran +# user-awpmd_SYSPATH = + +SHELL = /bin/sh + +# ------ FILES ------ + +SRC = dasum.f daxpy.f dcopy.f ddot.f dgecon.f dgemm.f dgemv.f dger.f \ + dgetf2.f dgetrf.f dgetri.f disnan.f dlabad.f dlaisnan.f dlamch.f\ + dlacn2.f dlange.f dlassq.f dlaswp.f dlatrs.f drscl.f dscal.f \ + dswap.f dtrmm.f dtrmv.f dtrsm.f dtrsv.f dtrti2.f dtrtri.f \ + idamax.f ieeeck.f ilaenv.f iparmq.f lsame.f xerbla.f zdotc.f \ + zdscal.f zhpr.f zpptrf.f zpptri.f zscal.f ztpmv.f ztpsv.f ztptri.f + +FILES = $(SRC) Makefile.* README + +# ------ DEFINITIONS ------ + +DIR = Obj_mingw64/ +LIB = $(DIR)liblinalg.a +OBJ = $(SRC:%.f=$(DIR)%.o) + +# ------ SETTINGS ------ + +FC = x86_64-w64-mingw32-gfortran +FFLAGS = -O3 -march=core2 -mtune=generic -msse2 -mpc64 \ + -ffast-math -funroll-loops -fstrict-aliasing -Wall -W \ + -Wno-uninitialized -fno-second-underscore +FFLAGS0 = -O0 -march=core2 -mtune=generic -msse2 -mpc64 \ + -Wall -W -Wno-uninitialized -fno-second-underscore +ARCHIVE = x86_64-w64-mingw32-ar +AR = x86_64-w64-mingw32-ar +ARCHFLAG = -rcs +USRLIB = +SYSLIB = + +.PHONY: default clean tar + +.SUFFIXES: +.SUFFIXES: .F .f .o + +# ------ MAKE PROCEDURE ------ + +default: $(DIR) $(LIB) + +$(LIB): $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + +$(DIR): + mkdir $(DIR) + +# ------ COMPILE RULES ------ + +$(DIR)%.o:%.F + $(F90) $(F90FLAGS) -c $< -o $@ + +$(DIR)%.o:%.f + $(FC) $(FFLAGS) -c $< -o $@ + +$(DIR)dlamch.o: dlamch.f + $(FC) $(FFLAGS0) -c $< -o $@ + +# ------ CLEAN ------ + +clean: + -rm $(DIR)*.o $(DOR)*.mod *~ $(LIB) + -rmdir $(DIR) + +tar: + -tar -czvf ../linalg.tar.gz $(FILES) + diff --git a/lib/linalg/Makefile.mingw64-cross-mpi b/lib/linalg/Makefile.mingw64-cross-mpi new file mode 100644 index 000000000..1ec1a0995 --- /dev/null +++ b/lib/linalg/Makefile.mingw64-cross-mpi @@ -0,0 +1,13 @@ +# -*- makefile -*- wrapper for non-MPI libraries + +SHELL=/bin/sh + +all: + $(MAKE) $(MFLAGS) mingw64-cross + rm -f Obj_mingw64-mpi + ln -s Obj_mingw64 Obj_mingw64-mpi + +clean: + $(MAKE) $(MFLAGS) clean-mingw64-cross + rm -f Obj_mingw64-mpi + diff --git a/lib/meam/Makefile.mingw32-cross b/lib/meam/Makefile.mingw32-cross new file mode 100644 index 000000000..ee6516d20 --- /dev/null +++ b/lib/meam/Makefile.mingw32-cross @@ -0,0 +1,65 @@ +# * -*- makefile -*- +# *_________________________________________________________________________* +# * MEAM: MODEFIED EMBEDDED ATOM METHOD * +# * DESCRIPTION: SEE READ-ME * +# * FILE NAME: Makefile * +# * AUTHORS: Greg Wagner, Sandia National Laboratories * +# * CONTACT: gjwagne@sandia.gov * +# *_________________________________________________________________________*/ + +SHELL = /bin/sh + +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.gfortran + +# ------ FILES ------ + +SRC = meam_data.F meam_setup_done.F meam_setup_global.F meam_setup_param.F meam_dens_init.F meam_dens_final.F meam_force.F meam_cleanup.F + +FILES = $(SRC) Makefile + +# ------ DEFINITIONS ------ + +DIR = Obj_mingw32/ +LIB = $(DIR)libmeam.a +OBJ = $(SRC:%.F=$(DIR)%.o) + +# ------ SETTINGS ------ + +F90 = i686-w64-mingw32-gfortran +F90FLAGS = -O3 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ + -ffast-math -funroll-loops -fstrict-aliasing -J$(DIR) \ + -Wall -W -Wno-uninitialized -fno-second-underscore +#F90FLAGS = -O +ARCHIVE = i686-w64-mingw32-ar +ARCHFLAG = -rcs +LINK = i686-w64-mingw32-g++ +LINKFLAGS = -O +USRLIB = +SYSLIB = + +# ------ MAKE PROCEDURE ------ + +default: $(DIR) $(LIB) + +$(DIR): + -mkdir $(DIR) + +$(LIB): $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + @cp $(EXTRAMAKE) Makefile.lammps + +# ------ COMPILE RULES ------ + +$(DIR)%.o:%.F + $(F90) $(F90FLAGS) -c $< -o $@ + +# ------ CLEAN ------ + +clean: + -rm $(DIR)*.o $(DIR)*.mod *~ $(LIB) + -rmdir $(DIR) + +tar: + -tar -cvf ../MEAM.tar $(FILES) diff --git a/lib/meam/Makefile.mingw32-cross-mpi b/lib/meam/Makefile.mingw32-cross-mpi new file mode 100644 index 000000000..cc2a76111 --- /dev/null +++ b/lib/meam/Makefile.mingw32-cross-mpi @@ -0,0 +1,13 @@ +# -*- makefile -*- wrapper for non-MPI libraries + +SHELL=/bin/sh + +all: + $(MAKE) $(MFLAGS) mingw32-cross + rm -f Obj_mingw32-mpi + ln -s Obj_mingw32 Obj_mingw32-mpi + +clean: + $(MAKE) $(MFLAGS) clean-mingw32-cross + rm -f Obj_mingw32-mpi + diff --git a/lib/meam/Makefile.mingw64-cross b/lib/meam/Makefile.mingw64-cross new file mode 100644 index 000000000..4cfccc80c --- /dev/null +++ b/lib/meam/Makefile.mingw64-cross @@ -0,0 +1,65 @@ +# * -*- makefile -*- +# *_________________________________________________________________________* +# * MEAM: MODEFIED EMBEDDED ATOM METHOD * +# * DESCRIPTION: SEE READ-ME * +# * FILE NAME: Makefile * +# * AUTHORS: Greg Wagner, Sandia National Laboratories * +# * CONTACT: gjwagne@sandia.gov * +# *_________________________________________________________________________*/ + +SHELL = /bin/sh + +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.gfortran + +# ------ FILES ------ + +SRC = meam_data.F meam_setup_done.F meam_setup_global.F meam_setup_param.F meam_dens_init.F meam_dens_final.F meam_force.F meam_cleanup.F + +FILES = $(SRC) Makefile + +# ------ DEFINITIONS ------ + +DIR = Obj_mingw64/ +LIB = $(DIR)libmeam.a +OBJ = $(SRC:%.F=$(DIR)%.o) + +# ------ SETTINGS ------ + +F90 = x86_64-w64-mingw32-gfortran +F90FLAGS = -O3 -march=core2 -mtune=core2 -msse2 -mpc64 \ + -ffast-math -funroll-loops -fstrict-aliasing -J$(DIR) \ + -Wall -W -Wno-uninitialized -fno-second-underscore +#F90FLAGS = -O +ARCHIVE = x86_64-w64-mingw32-ar +ARCHFLAG = -rcs +LINK = x86_64-w64-mingw32-g++ +LINKFLAGS = -O +USRLIB = +SYSLIB = + +# ------ MAKE PROCEDURE ------ + +default: $(DIR) $(LIB) + +$(DIR): + -mkdir $(DIR) + +$(LIB): $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + @cp $(EXTRAMAKE) Makefile.lammps + +# ------ COMPILE RULES ------ + +$(DIR)%.o:%.F + $(F90) $(F90FLAGS) -c $< -o $@ + +# ------ CLEAN ------ + +clean: + -rm $(DIR)*.o $(DIR)*.mod *~ $(LIB) + -rmdir $(DIR) + +tar: + -tar -cvf ../MEAM.tar $(FILES) diff --git a/lib/meam/Makefile.mingw64-cross-mpi b/lib/meam/Makefile.mingw64-cross-mpi new file mode 100644 index 000000000..1ec1a0995 --- /dev/null +++ b/lib/meam/Makefile.mingw64-cross-mpi @@ -0,0 +1,13 @@ +# -*- makefile -*- wrapper for non-MPI libraries + +SHELL=/bin/sh + +all: + $(MAKE) $(MFLAGS) mingw64-cross + rm -f Obj_mingw64-mpi + ln -s Obj_mingw64 Obj_mingw64-mpi + +clean: + $(MAKE) $(MFLAGS) clean-mingw64-cross + rm -f Obj_mingw64-mpi + diff --git a/lib/poems/Makefile.mingw32-cross b/lib/poems/Makefile.mingw32-cross new file mode 100644 index 000000000..3a32f0595 --- /dev/null +++ b/lib/poems/Makefile.mingw32-cross @@ -0,0 +1,113 @@ +# * +# *_________________________________________________________________________* +# * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * +# * DESCRIPTION: SEE READ-ME * +# * FILE NAME: Makefile * +# * AUTHORS: See Author List * +# * GRANTS: See Grants List * +# * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * +# * LICENSE: Please see License Agreement * +# * DOWNLOAD: Free at www.rpi.edu/~anderk5 * +# * ADMINISTRATOR: Prof. Kurt Anderson * +# * Computational Dynamics Lab * +# * Rensselaer Polytechnic Institute * +# * 110 8th St. Troy NY 12180 * +# * CONTACT: anderk5@rpi.edu * +# *_________________________________________________________________________*/ + +SHELL = /bin/sh + +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.empty + +# ------ FILES ------ + +SRC_MAIN = workspace.cpp system.cpp poemsobject.cpp +INC_MAIN = workspace.h system.h poemsobject.h + +SRC_BODY = body.cpp rigidbody.cpp particle.cpp inertialframe.cpp +INC_BODY = bodies.h body.h rigidbody.h particle.h inertialframe.h + + +SRC_JOINT = joint.cpp revolutejoint.cpp prismaticjoint.cpp sphericaljoint.cpp \ + freebodyjoint.cpp body23joint.cpp mixedjoint.cpp +INC_JOINT = joints.h joint.h revolutejoint.h prismaticjoint.h sphericaljoint.h \ + freebodyjoint.h body23joint.h mixedjoint.h + +SRC_POINT = point.cpp fixedpoint.cpp +INC_POINT = points.h point.h fixedpoint.h + +SRC_SOLVE = solver.cpp +INC_SOLVE = solver.h + +SRC_ORDERN = onsolver.cpp onfunctions.cpp onbody.cpp +INC_ORDERN = onsolver.h onfunctions.h onbody.h + +SRC_MAT = virtualmatrix.cpp matrix.cpp matrixfun.cpp mat3x3.cpp virtualcolmatrix.cpp \ + colmatrix.cpp vect3.cpp virtualrowmatrix.cpp rowmatrix.cpp mat6x6.cpp vect6.cpp \ + fastmatrixops.cpp colmatmap.cpp eulerparameters.cpp vect4.cpp norm.cpp mat4x4.cpp \ + +INC_MAT = matrices.h virtualmatrix.h matrix.h matrixfun.h mat3x3.h virtualcolmatrix.h \ + colmatrix.h vect3.h virtualrowmatrix.h rowmatrix.h mat6x6.h vect6.h \ + fastmatrixops.h colmatmap.h eulerparameters.h vect4.h norm.h mat4x4.h + +SRC_MISC = poemstreenode.cpp +INC_MISC = poemslist.h poemstreenode.h poemstree.h poemsnodelib.h SystemProcessor.h defines.h POEMSChain.h + +SRC = $(SRC_MAIN) $(SRC_BODY) $(SRC_JOINT) $(SRC_POINT) $(SRC_SOLVE) $(SRC_ORDERN) $(SRC_MAT) $(SRC_MISC) +INC = $(INC_MAIN) $(INC_BODY) $(INC_JOINT) $(INC_POINT) $(INC_SOLVE) $(INC_ORDERN) $(INC_MAT) $(INC_MISC) + +FILES = $(SRC) $(INC) Makefile Authors_List.txt Grants_List.txt POEMS_License.txt README Copyright_Notice + +# ------ DEFINITIONS ------ + +DIR = Obj_mingw32/ +LIB = $(DIR)libpoems.a +OBJ = $(SRC:%.cpp=$(DIR)%.o) + +# ------ SETTINGS ------ + +CC = i686-w64-mingw32-g++ +CCFLAGS = -O2 -march=i686 -mtune=generic -mfpmath=387 -mpc64 \ + -ffast-math -funroll-loops -finline-functions -fno-rtti \ + -fno-exceptions -fstrict-aliasing \ + -Wall -W -Wno-uninitialized +ARCHIVE = i686-w64-mingw32-ar +ARCHFLAG = -rcs +DEPFLAGS = -M +LINK = i686-w64-mingw32-g++ +LINKFLAGS = -O +USRLIB = +SYSLIB = + +# ------ MAKE PROCEDURE ------ + +default: $(DIR) $(LIB) + +$(DIR): + -mkdir $(DIR) + +$(LIB): $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + @cp $(EXTRAMAKE) Makefile.lammps + +# ------ COMPILE RULES ------ + +$(DIR)%.o:%.cpp + $(CC) $(CCFLAGS) -c $< -o $@ + +$(DIR)%.d:%.cpp + $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ + +# ------ DEPENDENCIES ------ + +DEPENDS = $(OBJ:.o=.d) + +# ------ CLEAN ------ + +clean: + -rm $(DIR)*.o $(DIR)*.d *~ $(LIB) + +tar: + -tar -cvf ../POEMS.tar $(FILES) diff --git a/lib/poems/Makefile.mingw32-cross-mpi b/lib/poems/Makefile.mingw32-cross-mpi new file mode 100644 index 000000000..cc2a76111 --- /dev/null +++ b/lib/poems/Makefile.mingw32-cross-mpi @@ -0,0 +1,13 @@ +# -*- makefile -*- wrapper for non-MPI libraries + +SHELL=/bin/sh + +all: + $(MAKE) $(MFLAGS) mingw32-cross + rm -f Obj_mingw32-mpi + ln -s Obj_mingw32 Obj_mingw32-mpi + +clean: + $(MAKE) $(MFLAGS) clean-mingw32-cross + rm -f Obj_mingw32-mpi + diff --git a/lib/poems/Makefile.mingw64-cross b/lib/poems/Makefile.mingw64-cross new file mode 100644 index 000000000..4fcbe1d23 --- /dev/null +++ b/lib/poems/Makefile.mingw64-cross @@ -0,0 +1,113 @@ +# * +# *_________________________________________________________________________* +# * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * +# * DESCRIPTION: SEE READ-ME * +# * FILE NAME: Makefile * +# * AUTHORS: See Author List * +# * GRANTS: See Grants List * +# * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * +# * LICENSE: Please see License Agreement * +# * DOWNLOAD: Free at www.rpi.edu/~anderk5 * +# * ADMINISTRATOR: Prof. Kurt Anderson * +# * Computational Dynamics Lab * +# * Rensselaer Polytechnic Institute * +# * 110 8th St. Troy NY 12180 * +# * CONTACT: anderk5@rpi.edu * +# *_________________________________________________________________________*/ + +SHELL = /bin/sh + +# which file will be copied to Makefile.lammps + +EXTRAMAKE = Makefile.lammps.empty + +# ------ FILES ------ + +SRC_MAIN = workspace.cpp system.cpp poemsobject.cpp +INC_MAIN = workspace.h system.h poemsobject.h + +SRC_BODY = body.cpp rigidbody.cpp particle.cpp inertialframe.cpp +INC_BODY = bodies.h body.h rigidbody.h particle.h inertialframe.h + + +SRC_JOINT = joint.cpp revolutejoint.cpp prismaticjoint.cpp sphericaljoint.cpp \ + freebodyjoint.cpp body23joint.cpp mixedjoint.cpp +INC_JOINT = joints.h joint.h revolutejoint.h prismaticjoint.h sphericaljoint.h \ + freebodyjoint.h body23joint.h mixedjoint.h + +SRC_POINT = point.cpp fixedpoint.cpp +INC_POINT = points.h point.h fixedpoint.h + +SRC_SOLVE = solver.cpp +INC_SOLVE = solver.h + +SRC_ORDERN = onsolver.cpp onfunctions.cpp onbody.cpp +INC_ORDERN = onsolver.h onfunctions.h onbody.h + +SRC_MAT = virtualmatrix.cpp matrix.cpp matrixfun.cpp mat3x3.cpp virtualcolmatrix.cpp \ + colmatrix.cpp vect3.cpp virtualrowmatrix.cpp rowmatrix.cpp mat6x6.cpp vect6.cpp \ + fastmatrixops.cpp colmatmap.cpp eulerparameters.cpp vect4.cpp norm.cpp mat4x4.cpp \ + +INC_MAT = matrices.h virtualmatrix.h matrix.h matrixfun.h mat3x3.h virtualcolmatrix.h \ + colmatrix.h vect3.h virtualrowmatrix.h rowmatrix.h mat6x6.h vect6.h \ + fastmatrixops.h colmatmap.h eulerparameters.h vect4.h norm.h mat4x4.h + +SRC_MISC = poemstreenode.cpp +INC_MISC = poemslist.h poemstreenode.h poemstree.h poemsnodelib.h SystemProcessor.h defines.h POEMSChain.h + +SRC = $(SRC_MAIN) $(SRC_BODY) $(SRC_JOINT) $(SRC_POINT) $(SRC_SOLVE) $(SRC_ORDERN) $(SRC_MAT) $(SRC_MISC) +INC = $(INC_MAIN) $(INC_BODY) $(INC_JOINT) $(INC_POINT) $(INC_SOLVE) $(INC_ORDERN) $(INC_MAT) $(INC_MISC) + +FILES = $(SRC) $(INC) Makefile Authors_List.txt Grants_List.txt POEMS_License.txt README Copyright_Notice + +# ------ DEFINITIONS ------ + +DIR = Obj_mingw64/ +LIB = $(DIR)libpoems.a +OBJ = $(SRC:%.cpp=$(DIR)%.o) + +# ------ SETTINGS ------ + +CC = x86_64-w64-mingw32-g++ +CCFLAGS = -O2 -march=core2 -mtune=core2 -msse2 -mpc64 \ + -ffast-math -funroll-loops -finline-functions -fno-rtti \ + -fno-exceptions -fstrict-aliasing \ + -Wall -W -Wno-uninitialized +ARCHIVE = x86_64-w64-mingw32-ar +ARCHFLAG = -rcs +DEPFLAGS = -M +LINK = x86_64-w64-mingw32-g++ +LINKFLAGS = -O +USRLIB = +SYSLIB = + +# ------ MAKE PROCEDURE ------ + +default: $(DIR) $(LIB) + +$(DIR): + -mkdir $(DIR) + +$(LIB): $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(LIB) $(OBJ) + @cp $(EXTRAMAKE) Makefile.lammps + +# ------ COMPILE RULES ------ + +$(DIR)%.o:%.cpp + $(CC) $(CCFLAGS) -c $< -o $@ + +$(DIR)%.d:%.cpp + $(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@ + +# ------ DEPENDENCIES ------ + +DEPENDS = $(OBJ:.o=.d) + +# ------ CLEAN ------ + +clean: + -rm $(DIR)*.o $(DIR)*.d *~ $(LIB) + +tar: + -tar -cvf ../POEMS.tar $(FILES) diff --git a/lib/poems/Makefile.mingw64-cross-mpi b/lib/poems/Makefile.mingw64-cross-mpi new file mode 100644 index 000000000..1ec1a0995 --- /dev/null +++ b/lib/poems/Makefile.mingw64-cross-mpi @@ -0,0 +1,13 @@ +# -*- makefile -*- wrapper for non-MPI libraries + +SHELL=/bin/sh + +all: + $(MAKE) $(MFLAGS) mingw64-cross + rm -f Obj_mingw64-mpi + ln -s Obj_mingw64 Obj_mingw64-mpi + +clean: + $(MAKE) $(MFLAGS) clean-mingw64-cross + rm -f Obj_mingw64-mpi +