git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@10165 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2013-06-28 19:30:58 +00:00
parent f1fec72c71
commit bfbe995a9c
36 changed files with 1499 additions and 12 deletions

View File

@ -2,4 +2,4 @@
user-awpmd_SYSINC =
user-awpmd_SYSLIB = -llinalg -lgfortran
user-awpmd_SYSPATH = -L../../lib/linalg
user-awpmd_SYSPATH = -L../../lib/linalg$(LIBOBJDIR)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -8,7 +8,7 @@ typedef int lapack_int;
typedef complex<float> lapack_complex_float;
typedef complex<double> lapack_complex_double;
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW32__)
//#define MKL_Complex8 lapack_complex_float
//#define MKL_Complex16 lapack_complex_double

View File

@ -7,9 +7,9 @@
#include <stdexcept>
#include <string>
# ifndef _WIN32
#if !defined(_WIN32) || defined(__MINGW32__)
# include <typeinfo>
# endif
#endif
/// this specifies whether to put file/line info in error messages

View File

@ -220,7 +220,8 @@ public:
};
/*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;
@ -230,7 +231,8 @@ public:
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
@ -239,4 +241,4 @@ inline WavePacket conj(const WavePacket &wp){
}
# endif // WAVEPACKET_H
# endif // WAVEPACKET_H