From 3f50902915232cb2fe18bdcbfca5d1a4d7152479 Mon Sep 17 00:00:00 2001 From: Travis Mitchell Date: Mon, 18 Sep 2023 11:47:20 +0800 Subject: [PATCH 1/2] + fix compile to grab c string from cpp string --- src/Handlers/cbRunR.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handlers/cbRunR.cpp b/src/Handlers/cbRunR.cpp index fcf1a72a3..ec62e7885 100644 --- a/src/Handlers/cbRunR.cpp +++ b/src/Handlers/cbRunR.cpp @@ -358,7 +358,7 @@ class rGeometry : public rWrapper { } } if (some_na) { - ERROR("Some NA in Geometry (%s) assignment", it.name); + ERROR("Some NA in Geometry (%s) assignment", it.name.c_str()); } } solver->lattice->FlagOverwrite(NodeType, reg); From 3fd87e7db85b7815414f2b90b36a14ef93c91627 Mon Sep 17 00:00:00 2001 From: "Travis Mitchell (qris-uq)" Date: Wed, 10 Jan 2024 16:14:23 +1000 Subject: [PATCH 2/2] + minor update so that compile works when nlopt is found --- src/Handlers/acOptimize.cpp.Rt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Handlers/acOptimize.cpp.Rt b/src/Handlers/acOptimize.cpp.Rt index 6e02c0729..087b563a0 100644 --- a/src/Handlers/acOptimize.cpp.Rt +++ b/src/Handlers/acOptimize.cpp.Rt @@ -7,7 +7,7 @@ int acOptimize::OptimizerInit () { pugi::xml_attribute attr; nlopt_result res; material=0.0; - if (solver->mpi.rank == 0) { + if (solver->mpi_rank == 0) { if (Pars == 0) { ERROR("Error: No parameters defined!\n"); return -1; @@ -18,7 +18,7 @@ int acOptimize::OptimizerInit () { } GetParameters(start); DEBUG_M; - if (solver->mpi.rank == 0) { + if (solver->mpi_rank == 0) { method="MMA"; attr = node.attribute("method"); if (attr) { @@ -40,15 +40,15 @@ int acOptimize::OptimizerInit () { } } double * bound = NULL; - if (solver->mpi.rank == 0) bound = new double[Pars]; + if (solver->mpi_rank == 0) bound = new double[Pars]; Parameters(PAR_LOWER, bound); - if (solver->mpi.rank == 0) { + if (solver->mpi_rank == 0) { output("lower set to %lf\n", bound[0]); nlopt_set_lower_bounds(opt, bound); for (int i=0;impi.rank == 0) { + if (solver->mpi_rank == 0) { output("upper set to %lf\n", bound[0]); nlopt_set_upper_bounds(opt, bound); for (int i=0;i bound[i]) start[i] = bound[i];