修訂 | d5aaabf08476d189af41a0424e72174b0f903285 (tree) |
---|---|
時間 | 2013-07-12 10:51:39 |
作者 | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
Makefir for GNU is updated. #31588
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/mpi-cis@1383 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -17,26 +17,29 @@ | ||
17 | 17 | #// You should have received a copy of the GNU General Public License // |
18 | 18 | #// along with MolDS. If not, see <http://www.gnu.org/licenses/>. // |
19 | 19 | #//************************************************************************// |
20 | -CC = g++ | |
21 | -LIBS = -lpthread | |
20 | +CC = mpicxx | |
22 | 21 | CFLAGS = -O0 |
23 | 22 | override CFLAGS += -fopenmp |
24 | 23 | BOOST_TOP_DIR = /usr/local/boost/ |
25 | 24 | BOOST_INC_DIR = $(BOOST_TOP_DIR)include/ |
25 | +BOOST_LIB_DIR = $(BOOST_TOP_DIR)lib/ | |
26 | +BOOST_LIBS = -lboost_mpi | |
26 | 27 | OPENBLAS_TOP_DIR = /usr/local/openblas/ |
27 | 28 | OPENBLAS_INC_DIR = $(OPENBLAS_TOP_DIR)include/ |
28 | 29 | OPENBLAS_LIB_DIR = $(OPENBLAS_TOP_DIR)lib/ |
29 | -OPENBLAS_LIBS = -lopenblas | |
30 | +OPENBLAS_LIBS = -lopenblas | |
31 | +LIBSBASE = -lpthread | |
32 | +LIBS = $(LIBSBASE) $(BOOST_LIBS) $(OPENBLAS_LIBS) | |
30 | 33 | EXENAME = MolDS.out |
31 | 34 | DEPFILE = obj/objfile.dep |
32 | 35 | LDFLAGS = |
33 | 36 | |
34 | -ALL_CPP_FILES = Main.cpp base/MolDSException.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/Enums.cpp base/MathUtilities.cpp base/MallocerFreer.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp | |
35 | -ALL_HEAD_FILES = base/PrintController.h base/MolDSException.h base/Uncopyable.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/Enums.h base/MathUtilities.h base/MallocerFreer.h base/EularAngle.h base/Parameters.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/RealSphericalHarmonicsIndex.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h base/factories/OptimizerFactory.h base/MolDS.h | |
36 | -ALL_OBJ_FILES = obj/Main.o obj/MolDSException.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/Enums.o obj/MathUtilities.o obj/MallocerFreer.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/OptimizerFactory.o obj/MolDS.o | |
37 | +ALL_CPP_FILES = Main.cpp mpi/MpiProcess.cpp base/MolDSException.cpp wrappers/Blas.cpp wrappers/Lapack.cpp base/Utilities.cpp base/Enums.cpp base/MathUtilities.cpp base/MallocerFreer.cpp base/EularAngle.cpp base/Parameters.cpp base/atoms/Atom.cpp base/atoms/Hatom.cpp base/atoms/Liatom.cpp base/atoms/Catom.cpp base/atoms/Natom.cpp base/atoms/Oatom.cpp base/atoms/Satom.cpp base/factories/AtomFactory.cpp base/Molecule.cpp base/InputParser.cpp base/GTOExpansionSTO.cpp base/RealSphericalHarmonicsIndex.cpp base/loggers/MOLogger.cpp base/loggers/DensityLogger.cpp base/loggers/HoleDensityLogger.cpp base/loggers/ParticleDensityLogger.cpp cndo/Cndo2.cpp indo/Indo.cpp zindo/ZindoS.cpp mndo/Mndo.cpp am1/Am1.cpp am1/Am1D.cpp pm3/Pm3.cpp pm3/Pm3D.cpp pm3/Pm3Pddg.cpp base/factories/ElectronicStructureFactory.cpp md/MD.cpp mc/MC.cpp rpmd/RPMD.cpp nasco/NASCO.cpp optimization/Optimizer.cpp optimization/ConjugateGradient.cpp optimization/SteepestDescent.cpp optimization/BFGS.cpp base/factories/OptimizerFactory.cpp base/MolDS.cpp | |
38 | +ALL_HEAD_FILES = base/Uncopyable.h mpi/MpiProcess.h base/PrintController.h base/MolDSException.h wrappers/Blas.h wrappers/Lapack.h base/Utilities.h base/Enums.h base/MathUtilities.h base/MallocerFreer.h base/EularAngle.h base/Parameters.h base/atoms/Atom.h base/atoms/Hatom.h base/atoms/Liatom.h base/atoms/Catom.h base/atoms/Natom.h base/atoms/Oatom.h base/atoms/Satom.h base/factories/AtomFactory.h base/Molecule.h base/InputParser.h base/GTOExpansionSTO.h base/RealSphericalHarmonicsIndex.h base/loggers/MOLogger.h base/loggers/DensityLogger.h base/loggers/HoleDensityLogger.h base/loggers/ParticleDensityLogger.h base/ElectronicStructure.h cndo/Cndo2.h cndo/ReducedOverlapAOsParameters.h indo/Indo.h zindo/ZindoS.h mndo/Mndo.h am1/Am1.h am1/Am1D.h pm3/Pm3.h pm3/Pm3D.h pm3/Pm3Pddg.h base/factories/ElectronicStructureFactory.h md/MD.h mc/MC.h rpmd/RPMD.h nasco/NASCO.h optimization/Optimizer.h optimization/ConjugateGradient.h optimization/SteepestDescent.h optimization/BFGS.h base/factories/OptimizerFactory.h base/MolDS.h | |
39 | +ALL_OBJ_FILES = obj/MpiProcess.o obj/Main.o obj/MolDSException.o obj/Blas.o obj/Lapack.o obj/Utilities.o obj/Enums.o obj/MathUtilities.o obj/MallocerFreer.o obj/EularAngle.o obj/Parameters.o obj/Atom.o obj/Hatom.o obj/Liatom.o obj/Catom.o obj/Natom.o obj/Oatom.o obj/Satom.o obj/AtomFactory.o obj/Molecule.o obj/InputParser.o obj/GTOExpansionSTO.o obj/RealSphericalHarmonicsIndex.o obj/MOLogger.o obj/DensityLogger.o obj/HoleDensityLogger.o obj/ParticleDensityLogger.o obj/Cndo2.o obj/Indo.o obj/ZindoS.o obj/Mndo.o obj/Am1.o obj/Am1D.o obj/Pm3.o obj/Pm3D.o obj/Pm3Pddg.o obj/ElectronicStructureFactory.o obj/MD.o obj/MC.o obj/RPMD.o obj/NASCO.o obj/Optimizer.o obj/ConjugateGradient.o obj/SteepestDescent.o obj/BFGS.o obj/OptimizerFactory.o obj/MolDS.o | |
37 | 40 | |
38 | 41 | $(EXENAME): $(ALL_OBJ_FILES) |
39 | - $(CC) -o $@ $(LDFLAGS) -Wl,-rpath=$(OPENBLAS_LIB_DIR) $(ALL_OBJ_FILES) -L$(OPENBLAS_LIB_DIR) $(LIBS) $(OPENBLAS_LIBS) | |
42 | + $(CC) -o $@ $(LDFLAGS) -Wl,-rpath=$(BOOST_LIB_DIR) -Wl,-rpath=$(OPENBLAS_LIB_DIR) $(LDFLAGS) $(ALL_OBJ_FILES) -L$(BOOST_LIB_DIR) -L$(OPENBLAS_LIB_DIR) $(LIBS) | |
40 | 43 | |
41 | 44 | -include $(DEPFILE) |
42 | 45 |
@@ -25,17 +25,19 @@ | ||
25 | 25 | #include<string> |
26 | 26 | #include<stdexcept> |
27 | 27 | #include<boost/format.hpp> |
28 | -#ifdef __INTEL_COMPILER | |
29 | -#include"mkl.h" | |
30 | -#else | |
31 | -#include"cblas.h" | |
32 | -#endif | |
33 | 28 | #include"../base/Uncopyable.h" |
34 | 29 | #include"../mpi/MpiProcess.h" |
35 | 30 | #include"../base/PrintController.h" |
36 | 31 | #include"../base/MolDSException.h" |
37 | 32 | #include"../base/MallocerFreer.h" |
38 | 33 | #include"Blas.h" |
34 | + | |
35 | +#ifdef __INTEL_COMPILER | |
36 | +#include"mkl.h" | |
37 | +#else | |
38 | +#include"cblas.h" | |
39 | +#endif | |
40 | + | |
39 | 41 | using namespace std; |
40 | 42 | using namespace MolDS_base; |
41 | 43 |
@@ -24,6 +24,12 @@ | ||
24 | 24 | #include<string> |
25 | 25 | #include<stdexcept> |
26 | 26 | #include<boost/format.hpp> |
27 | +#include"../base/Uncopyable.h" | |
28 | +#include"../mpi/MpiProcess.h" | |
29 | +#include"../base/PrintController.h" | |
30 | +#include"../base/MolDSException.h" | |
31 | +#include"Lapack.h" | |
32 | + | |
27 | 33 | #ifdef __INTEL_COMPILER |
28 | 34 | #include"mkl.h" |
29 | 35 | #else |
@@ -34,11 +40,6 @@ | ||
34 | 40 | #endif |
35 | 41 | #include"lapacke.h" |
36 | 42 | #endif |
37 | -#include"../base/Uncopyable.h" | |
38 | -#include"../mpi/MpiProcess.h" | |
39 | -#include"../base/PrintController.h" | |
40 | -#include"../base/MolDSException.h" | |
41 | -#include"Lapack.h" | |
42 | 43 | |
43 | 44 | #ifdef __INTEL_COMPILER |
44 | 45 | #define MOLDS_LAPACK_malloc(a,b) mkl_malloc(a,b) |