Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:ttadano/alamode into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ttadano committed Sep 19, 2018
2 parents 0eafea5 + 5a9b69c commit 241009f
Show file tree
Hide file tree
Showing 63 changed files with 5,349 additions and 3,864 deletions.
2 changes: 1 addition & 1 deletion alm/Makefile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Use gcc >= 4.8 to use OpenMP
# OpenMP-enabled gcc can be installed via homebrew
CXX = g++-7
CXX = g++-8
CXXFLAGS = -O2 -fopenmp -std=c++11
INCLUDE = -I../include

Expand Down
21 changes: 11 additions & 10 deletions alm/constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,21 @@ void Constraint::setup()
nparam = fcs->nequiv[order].size();
memory->allocate(arr_tmp, nparam);

if (const_symmetry[order].size() > 0) {
for (it_const = const_symmetry[order].begin();
it_const != const_symmetry[order].end(); ++it_const) {
for (i = 0; i < nparam; ++i) arr_tmp[i] = (*it_const).w_const[i];
const_self[order].push_back(ConstraintClass(nparam, arr_tmp));
}
// remove_redundant_rows(nparam, const_self[order], eps8);
}

for (it_const = const_translation[order].begin();
it_const != const_translation[order].end(); ++it_const) {
for (i = 0; i < nparam; ++i) arr_tmp[i] = (*it_const).w_const[i];
const_self[order].push_back(ConstraintClass(nparam, arr_tmp));
}
remove_redundant_rows(nparam, const_self[order], eps8);

if (const_rotation_self[order].size() > 0) {
for (it_const = const_rotation_self[order].begin();
Expand All @@ -211,15 +221,6 @@ void Constraint::setup()
remove_redundant_rows(nparam, const_self[order], eps8);
}

if (const_symmetry[order].size() > 0) {
for (it_const = const_symmetry[order].begin();
it_const != const_symmetry[order].end(); ++it_const) {
for (i = 0; i < nparam; ++i) arr_tmp[i] = (*it_const).w_const[i];
const_self[order].push_back(ConstraintClass(nparam, arr_tmp));
}
remove_redundant_rows(nparam, const_self[order], eps8);
}

memory->deallocate(arr_tmp);
const_translation[order].clear();
const_rotation_self[order].clear();
Expand Down Expand Up @@ -1724,7 +1725,7 @@ void Constraint::rref(int nrows,

if (icol == ncols) break;

if (std::abs(mat[pivot][icol]) > tolerance) ++nrank;
if (std::abs(mat[pivot][icol]) >= tolerance) ++nrank;

if (pivot != irow) {
//#pragma omp parallel for private(tmp)
Expand Down
4 changes: 2 additions & 2 deletions anphon/Makefile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ PROG = anphon

CXXSRC= phonons.cpp error.cpp fcs_phonon.cpp parsephon.cpp dynamical.cpp \
main.cpp memory.cpp system.cpp timer.cpp write_phonons.cpp kpoint.cpp \
phonon_dos.cpp phonon_velocity.cpp integration.cpp relaxation.cpp \
thermodynamics.cpp conductivity.cpp symmetry_core.cpp \
phonon_dos.cpp phonon_velocity.cpp integration.cpp anharmonic_core.cpp \
thermodynamics.cpp conductivity.cpp symmetry_core.cpp mode_analysis.cpp \
mpi_common.cpp gruneisen.cpp isotope.cpp selfenergy.cpp \
scph.cpp ewald.cpp

Expand Down
6 changes: 3 additions & 3 deletions anphon/Makefile.osx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#-----------------------------------------------

MPICXX = mpic++
CXXFLAGS = -O3 -std=c++11
CXXFLAGS = -O3 -std=c++11 -fopenmp
INCLUDE = -I../include -I$(HOME)/include

LINKER = ${MPICXX}
Expand All @@ -30,8 +30,8 @@ PROG = anphon

CXXSRC= phonons.cpp error.cpp fcs_phonon.cpp parsephon.cpp dynamical.cpp \
main.cpp memory.cpp system.cpp timer.cpp write_phonons.cpp kpoint.cpp \
phonon_dos.cpp phonon_velocity.cpp integration.cpp relaxation.cpp \
thermodynamics.cpp conductivity.cpp symmetry_core.cpp \
phonon_dos.cpp phonon_velocity.cpp integration.cpp anharmonic_core.cpp \
thermodynamics.cpp conductivity.cpp symmetry_core.cpp mode_analysis.cpp \
mpi_common.cpp gruneisen.cpp isotope.cpp selfenergy.cpp \
scph.cpp ewald.cpp

Expand Down
55 changes: 55 additions & 0 deletions anphon/Makefile.osx_gcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.SUFFIXES: .h .cpp
#-----------------------------------------------
# Makefile for the program 'ANPHON'.
# Please modify the variables properly.
# We recommend to use Intel c++ compiler.
#-----------------------------------------------

MPICXX = g++-8
CXXFLAGS = -O3 -std=c++11 -fopenmp
INCLUDE = -I../include -I$(HOME)/include -I/usr/local/opt/openmpi/include

LINKER = ${MPICXX}

## Mavericks
#LDFLAGS = -framework vecLib
## Yosemite
LDFLAGS = -framework Accelerate

LAPACK = -llapack -L/usr/local/opt/openmpi/lib -lmpi_cxx -lmpi -lgomp
LIBS = ${LAPACK} -lfftw3

#----------------------------------------------
# General rules
#----------------------------------------------

.cpp.o:
${MPICXX} ${CXXFLAGS} ${INCLUDE} -c $<

PROG = anphon

CXXSRC= phonons.cpp error.cpp fcs_phonon.cpp parsephon.cpp dynamical.cpp \
main.cpp memory.cpp system.cpp timer.cpp write_phonons.cpp kpoint.cpp \
phonon_dos.cpp phonon_velocity.cpp integration.cpp anharmonic_core.cpp \
thermodynamics.cpp conductivity.cpp symmetry_core.cpp mode_analysis.cpp \
mpi_common.cpp gruneisen.cpp isotope.cpp selfenergy.cpp \
scph.cpp ewald.cpp

OBJS= ${CXXSRC:.cpp=.o}

default: anphon

all: ${PROG}

anphon: ${OBJS}
${LINKER} ${LDFLAGS} -o $@ ${OBJS} ${LIBS}

clean:
rm -f ${OBJS}

.PHONY: clean

depend:
gcc -MM *.cpp > .depend

-include .depend

0 comments on commit 241009f

Please sign in to comment.