-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rom-fpmd driver and librom dependency in cmake. librom must be compil…
…ed before mgmol cmake.
- Loading branch information
1 parent
abedba9
commit 6149020
Showing
5 changed files
with
141 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
if(NOT LIBROM_PATH) | ||
message(FATAL_ERROR "LIBROM_PATH not specified.") | ||
endif(NOT LIBROM_PATH) | ||
|
||
find_library(LIBROM_LIB libROM.so HINTS "${LIBROM_PATH}/build/lib") | ||
find_path(LIBROM_INCLUDES librom.h HINTS "${LIBROM_PATH}/lib") | ||
|
||
mark_as_advanced(LIBROM_LIB LIBROM_INCLUDES) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(libROM REQUIRED_VARS LIBROM_LIB LIBROM_INCLUDES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
// Copyright (c) 2017, Lawrence Livermore National Security, LLC and | ||
// UT-Battelle, LLC. | ||
// Produced at the Lawrence Livermore National Laboratory and the Oak Ridge | ||
// National Laboratory. | ||
// LLNL-CODE-743438 | ||
// All rights reserved. | ||
// This file is part of MGmol. For details, see https://github.com/llnl/mgmol. | ||
// Please also read this link https://github.com/llnl/mgmol/LICENSE | ||
|
||
// | ||
// main.cc | ||
// | ||
// Description: | ||
// Real grid, finite difference, molecular dynamics program | ||
// for with nonorthogonal localized orbitals. | ||
// | ||
// Uses Mehrstellen operators, multigrid accelerations, and | ||
// non-local pseudopotentials. | ||
// | ||
// Includes LDA and PBE exchange and correlation functionals. | ||
// | ||
// Units: | ||
// Potentials, eigenvalues and operators in Rydberg | ||
// Energies in Hartree | ||
// | ||
#include <cassert> | ||
#include <iostream> | ||
#include <iterator> | ||
#include <vector> | ||
using namespace std; | ||
|
||
#ifdef _OPENMP | ||
#include <omp.h> | ||
#endif | ||
|
||
#ifdef USE_CNR | ||
#include <mkl.h> | ||
#endif | ||
|
||
#include <mpi.h> | ||
|
||
#include "Control.h" | ||
#include "DistMatrix.h" | ||
#include "ExtendedGridOrbitals.h" | ||
#include "LocGridOrbitals.h" | ||
#include "MGmol.h" | ||
#include "MGmol_MPI.h" | ||
#include "MPIdata.h" | ||
#include "MatricesBlacsContext.h" | ||
#include "Mesh.h" | ||
#include "PackedCommunicationBuffer.h" | ||
#include "ReplicatedWorkSpace.h" | ||
#include "SparseDistMatrix.h" | ||
#include "magma_singleton.h" | ||
#include "tools.h" | ||
|
||
#include <fenv.h> | ||
#include <sys/cdefs.h> | ||
#include <time.h> | ||
|
||
#include <boost/program_options.hpp> | ||
namespace po = boost::program_options; | ||
|
||
#include "librom.h" | ||
|
||
//#include "MemTrack.h" | ||
|
||
int main(int argc, char** argv) | ||
{ | ||
// change handling of memory allocation errors | ||
set_new_handler(noMoreMemory); | ||
|
||
cout.sync_with_stdio(); | ||
|
||
int mpirc = MPI_Init(&argc, &argv); | ||
if (mpirc != MPI_SUCCESS) | ||
{ | ||
cerr << "MPI Initialization failed!!!" << endl; | ||
MPI_Abort(MPI_COMM_WORLD, 0); | ||
} | ||
MPI_Comm_rank(MPI_COMM_WORLD, &mype); | ||
assert(mype > -1); | ||
onpe0 = (mype == 0); | ||
|
||
CAROM::Vector librom_vector(10, false); | ||
|
||
mpirc = MPI_Finalize(); | ||
if (mpirc != MPI_SUCCESS) | ||
{ | ||
cerr << "MPI Finalize failed!!!" << endl; | ||
} | ||
|
||
time_t tt; | ||
time(&tt); | ||
if (onpe0) cout << " Run ended at " << ctime(&tt) << endl; | ||
|
||
// MemTrack::TrackDumpBlocks(); | ||
|
||
// MemTrack::TrackListMemoryUsage(); | ||
|
||
return 0; | ||
} |