Skip to content

Commit

Permalink
Create testing for development of coordinator
Browse files Browse the repository at this point in the history
  • Loading branch information
ahurta92 committed Jul 1, 2024
1 parent 80d1a98 commit eaccee5
Show file tree
Hide file tree
Showing 121 changed files with 108 additions and 1,743 deletions.
3 changes: 2 additions & 1 deletion src/apps/molresponse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

if(CMAKE_CXX_STANDARD GREATER_EQUAL 17)
# C++ standard is 17 or higher
add_subdirectory(response_coordinator_v2)
add_subdirectory(response_coordinator)
add_subdirectory(response_coordinator2)
# Add your code or configurations here
else()
# C++ standard is below 17
Expand Down
4 changes: 2 additions & 2 deletions src/apps/molresponse/molresponse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ int main(int argc, char **argv) {
commandlineparser parser(argc, argv);

if (parser.key_exists("help")) {
ExcitedResponse::help();
FrequencyResponse::help();
} else if (parser.key_exists("print_parameters")) {
ExcitedResponse::print_parameters();
FrequencyResponse::print_parameters();
} else {

molresponse::start_timer(world);
Expand Down
28 changes: 28 additions & 0 deletions src/apps/molresponse/response_coordinator2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# src/apps/molresponse/testing


set(MY_EXECUTABLES
mad-freq2
)


foreach (EXECUTABLE ${MY_EXECUTABLES})
add_mad_executable(${EXECUTABLE} "${EXECUTABLE}.cpp" "MADall_response;MADchem;")
target_compile_features(${EXECUTABLE} PRIVATE cxx_std_17)
endforeach ()


# For testing script add MADGtest library



# The list of unit test source files
set(RESPONSE_TEST_SOURCES test_coordinator
)

foreach (EXECUTABLE ${RESPONSE_TEST_SOURCES})
add_mad_executable(${EXECUTABLE} "${EXECUTABLE}.cpp" "MADall_response;MADchem")
target_compile_features(${EXECUTABLE} PRIVATE cxx_std_17)
endforeach ()


Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// Created by adrianhurtado on 1/1/22.
//
#include "ResponseExceptions.hpp"
#include "coordinator.hpp"
#include "madness/tensor/tensor_json.hpp"
#include "madness/world/worldmem.h"
#include "response_functions.h"
#include "runners.hpp"

#if defined(HAVE_SYS_TYPES_H) && defined(HAVE_SYS_STAT_H) && defined(HAVE_UNISTD_H)

Expand Down
75 changes: 75 additions & 0 deletions src/apps/molresponse/response_coordinator2/test_coordinator.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
//
// Created by adrianhurtado on 1/1/22.
//
#define CATCH_CONFIG_RUNNER

#include "ExcitedResponse.hpp"
#include "FrequencyResponse.hpp"
#include "ResponseExceptions.hpp"
#include "coordinator.hpp"
#include "madness/external/catch/catch.hpp"
#include "madness/tensor/tensor_json.hpp"
#include "response_functions.h"
#include "string"
#include "x_space.h"


using path = std::filesystem::path;

int main(int argc, char *argv[]) {
World &world = madness::initialize(argc, argv);
int result = 0;
world.gop.fence();
startup(world, argc, argv);
{ result = Catch::Session().run(argc, argv); }

return result;

// print_meminfo(world.rank(), "startup");
// std::cout.precision(6);
// print_stats(world);
}

TEST_CASE("Hash Generation Test") {
// Set up the run directories
using namespace madness;

World &world = World::get_default();
std::cout.precision(6);

// step 1 is to read molecule from molecule file or
// to read in the molecule directory from geometry input
Molecule molecule = Molecule();
molecule.read(world, "molecule.in");

std::string filename = "response.in";

commandlineparser parser(argc, argv);

if (parser.key_exists("help")) {
FrequencyResponse::help();
} else if (parser.key_exists("print_parameters")) {
FrequencyResponse::print_parameters();
} else {
molresponse::start_timer(world);

}



const std::string molecule_name{argv[1]};
const std::string xc{argv[2]};
const std::string op{argv[3]};
const std::string precision{argv[4]};
const std::string static_calc{argv[5]};
if (precision != "high" && precision != "low" && precision != "super") {
if (world.rank() == 0) { std::cout << "Set precision to low high super" << std::endl; }
return 1;
}
auto schema = runSchema(world, xc);

// read in


}

26 changes: 0 additions & 26 deletions src/apps/molresponse/response_coordinator_v2/CMakeLists.txt

This file was deleted.

This file was deleted.

61 changes: 0 additions & 61 deletions src/apps/molresponse/response_coordinator_v2/frequency_calc.cpp

This file was deleted.

94 changes: 0 additions & 94 deletions src/apps/molresponse/response_coordinator_v2/full_excited_test.cpp

This file was deleted.

Loading

0 comments on commit eaccee5

Please sign in to comment.