Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • OPAL/src
  • zheng_d/src
  • ext-rogers_c/src
  • ext-wang_c/src
  • cortes_c/src
  • ext-calvo_p/src
  • ext-edelen_a/src
  • albajacas_a/src
  • kraus/src
  • snuverink_j/OPAL-src
  • adelmann/src
  • muralikrishnan/src
  • wyssling_t/src
  • gsell/src
  • ext-piot_p/src
  • OPAL/opal-src-4-opalx-debug
  • winkle_m/src
17 results
Show changes
Showing
with 71 additions and 73 deletions
......@@ -33,8 +33,6 @@ Build:
#include <iostream>
#include <set>
using namespace std;
// dimension of our positions
const unsigned Dim = 3;
......@@ -289,7 +287,7 @@ public:
k2 -= nr_m[2];
kk=(int)nint(sqrt(ii*ii+jj*jj+k2*k2));
kk = min(kmax_m, (int)kk);
kk = std::min(kmax_m, (int)kk);
spectra1D_m[kk] += real(rho_m.localElement(loop));
Nk_m[kk]++;
}
......
......@@ -77,7 +77,6 @@ target_link_libraries (
${MPI_CXX_LIBRARIES}
${H5Hut_LIBRARY}
${HDF5_LIBRARIES}
z
boost_timer
)
......@@ -91,4 +90,9 @@ add_executable (salman-1 salman-1.cpp)
target_link_libraries (salman-1 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
add_executable (test-scatter-1 test-scatter-1.cpp)
target_link_libraries (test-scatter-1 ${IPPL_LIBS} ${MPI_CXX_LIBRARIES} boost_timer)
target_link_libraries (
test-scatter-1
${IPPL_LIBS}
${MPI_CXX_LIBRARIES}
boost_timer
)
......@@ -422,7 +422,7 @@ public:
std::ofstream ostr;
std::string Fn;
char numbuf[6];
sprintf(numbuf, "%05d", idx);
snprintf(numbuf, sizeof(numbuf), "%05d", idx);
Fn = fn + std::string(numbuf) + ".dat";
ostr.open(Fn.c_str(), std::ios::out );
ostr.precision(15);
......@@ -682,4 +682,4 @@ int main(int argc, char *argv[]){
* $RCSfile: addheaderfooter,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:17 $
* IPPL_VERSION_ID: $Id: addheaderfooter,v 1.1.1.1 2003/01/23 07:40:17 adelmann Exp $
***************************************************************************/
\ No newline at end of file
***************************************************************************/
......@@ -474,9 +474,8 @@ public:
h5_prop_t props = H5CreateFileProp ();
MPI_Comm comm = Ippl::getComm();
h5_err_t h5err = H5SetPropFileMPIOCollective (props, &comm);
#if defined (NDEBUG)
// suppress unused warning if we compile for production
(void)h5err;
#endif
PAssert (h5err != H5_ERR);
H5f_m = H5OpenFile (fn.c_str(), H5_O_RDONLY, props);
PAssert (H5f_m != (h5_file_t)H5_ERR);
......@@ -705,7 +704,7 @@ int main(int argc, char *argv[]){
unsigned printid=1;
msg << "Starting iterations ..." << endl;
P->compute_temperature();
//P->compute_temperature();
// calculate initial space charge forces
P->calculateGridForces(interaction_radius,alpha,0,0,0);
P->calculatePairForces(interaction_radius,eps,alpha);
......@@ -726,6 +725,15 @@ int main(int argc, char *argv[]){
IpplTimings::TimerRef gridTimer = IpplTimings::getTimer("GridTimer");
IpplTimings::TimerRef particleTimer = IpplTimings::getTimer("ParticleTimer");
P->calcMoments();
P->computeBeamStatistics();
writeBeamStatisticsVelocity(P,0);
P->calc_field_energy();
P->calc_kinetic_energy();
P->calc_potential_energy();
writeEnergy(P,0);
for (int it=0; it<iterations; it++) {
/*
P->calcMoments();
......@@ -769,14 +777,15 @@ int main(int argc, char *argv[]){
P->compute_temperature();
if (it%print_every==0){
//dumpConservedQuantities(P,printid);
//compute quantities
/*
P->calc_field_energy();
P->calc_kinetic_energy();
P->calc_potential_energy();
writeEnergy(P,printid);
*/
P->calcMoments();
P->computeBeamStatistics();
writeBeamStatisticsVelocity(P,it+1);
P->calc_field_energy();
P->calc_kinetic_energy();
P->calc_potential_energy();
writeEnergy(P,it+1);
P->compute_temperature();
writeTemperature(P,it+1);
......@@ -787,7 +796,7 @@ int main(int argc, char *argv[]){
}
Ippl::Comm->barrier();
P->closeH5();
//P->closeH5();
Ippl::Comm->barrier();
IpplTimings::stopTimer(allTimer);
......
......@@ -465,6 +465,8 @@ class ChargedParticles : public IpplParticleBase<PL> {
MPI_Comm comm = Ippl::getComm();
h5_err_t h5err = H5SetPropFileMPIOCollective (props, &comm);
PAssert (h5err != H5_ERR);
// suppress unused warning if we compile for production
(void) h5err;
H5f_m = H5OpenFile(fn.c_str(), H5_O_WRONLY, props);
}
......
......@@ -33,7 +33,6 @@ typedef ParticleSpatialLayout<Real,Dim> playout_t;
int main(int argc, char *argv[])
{
unsigned int i, j;
Ippl ippl(argc, argv);
Inform testmsg(argv[0]);
......@@ -59,6 +58,8 @@ int main(int argc, char *argv[])
testmsg << "Start of initialization ..." << endl;
if (P.singleInitNode()) {
unsigned int j;
P.create(20); // makes new particles at end of current array
// put ten particles near right edge, and ten near left edge
for (j=0; j < 10; j++) { // initialize new values
......@@ -74,13 +75,12 @@ int main(int argc, char *argv[])
}
testmsg << "Performing initial update ..." << endl;
P.update(); // do update to move particles to proper loc
testmsg << "End of initialization" << i << ": localnum=";
testmsg << P.getLocalNum() << ", totalnum=";
testmsg << P.getTotalNum() << endl;
// Just print out the contents of node 0's data
testmsg << "------------------" << endl;
for (i=0; i < P.getLocalNum(); i++) {
for (unsigned int i=0; i < P.getLocalNum(); i++) {
testmsg << "LID=" << i << ", GID=" << P.ID[i] << ", data[0]=";
testmsg << P.data[0][i] << ", data[1]=" << P.data[1][i] << ", R=";
testmsg << P.R[i] << endl;
......@@ -93,14 +93,14 @@ int main(int argc, char *argv[])
//
testmsg << "Testing open boundary conditions ... moving by (5,-1,10):" << endl;
for (i=0; i < 2*Dim; ++i)
for (unsigned int i=0; i < 2*Dim; ++i)
P.getBConds()[i] = ParticleNoBCond;
Vektor<Real,Dim> offset1(5,-1,10);
assign(P.R, P.R + offset1);
P.update();
testmsg << "------------------" << endl;
for (i=0; i < P.getLocalNum(); i++) {
for (unsigned int i=0; i < P.getLocalNum(); i++) {
testmsg << "LID=" << i << ", GID=" << P.ID[i] << ", data[0]=";
testmsg << P.data[0][i] << ", data[1]=" << P.data[1][i] << ", R=";
testmsg << P.R[i] << endl;
......@@ -121,7 +121,7 @@ int main(int argc, char *argv[])
assign(P.R, P.R + offset2);
P.update();
testmsg << "------------------" << endl;
for (i=0; i < P.getLocalNum(); i++) {
for (unsigned int i=0; i < P.getLocalNum(); i++) {
testmsg << "LID=" << i << ", GID=" << P.ID[i] << ", data[0]=";
testmsg << P.data[0][i] << ", data[1]=" << P.data[1][i] << ", R=";
testmsg << P.R[i] << endl;
......
#-----------------------------------------------------------------------------
# options
option (ARCH_BG "Set architecture to BlueGene" OFF)
#-----------------------------------------------------------------------------
# Common sources and libs
......@@ -55,19 +50,3 @@ if (BUILD_OPAL_UNIT_TESTS)
enable_testing()
add_subdirectory(Tests)
endif ()
#-----------------------------------------------------------------------------
# Doxygen
if (ENABLE_DOXYDOC)
find_package(Doxygen)
if (DOXYGEN_FOUND)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY
)
add_custom_target (optpilot-doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
endif ()
endif ()
......@@ -50,7 +50,7 @@ struct _stat_sum {
double step = boost::get<double>(args[2]);
std::string name = boost::get<std::string>(args[3]);
boost::scoped_ptr<SDDSReader> sim_stats(new SDDSReader(stat_filename_));
const std::unique_ptr<SDDSReader> sim_stats(new SDDSReader(stat_filename_));
try {
sim_stats->parseFile();
} catch (OptPilotException &ex) {
......
......@@ -60,8 +60,8 @@ struct MaxNormRadialPeak {
bool is_valid = true;
boost::scoped_ptr<PeakReader> meas_peaks(new PeakReader(meas_filename_));
boost::scoped_ptr<PeakReader> sim_peaks(new PeakReader(sim_filename_));
const std::unique_ptr<PeakReader> meas_peaks(new PeakReader(meas_filename_));
const std::unique_ptr<PeakReader> sim_peaks(new PeakReader(sim_filename_));
try {
sim_peaks->parseFile();
meas_peaks->parseFile();
......
......@@ -52,7 +52,7 @@ struct NumberOfPeaks {
bool is_valid = true;
boost::scoped_ptr<PeakReader> sim_peaks(new PeakReader(sim_filename_));
const std::unique_ptr<PeakReader> sim_peaks(new PeakReader(sim_filename_));
std::size_t nPeaks = 0;
try {
......
......@@ -100,13 +100,13 @@ namespace client { namespace ast
operand first;
std::list<operation> rest;
};
#if 0
// print functions for debugging
inline std::ostream& operator<<(std::ostream& out, nil)
{
out << "nil"; return out;
}
#endif
inline std::ostream& operator<<(std::ostream& out, identifier const& id)
{
out << id.name; return out;
......
......@@ -14,9 +14,9 @@
#include <boost/assert.hpp>
#include <boost/variant/get.hpp>
#include <boost/variant/variant.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/phoenix/core.hpp>
#include <boost/phoenix/function.hpp>
#include <boost/phoenix/operator.hpp>
#include "ast.hpp"
#include "function.hpp"
......
......@@ -4,11 +4,21 @@
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
/*
with boost 1.81 and newer we get multiple definition of
`boost::phoenix::placeholders::uargX` errors. A solution
suggested in https://github.com/boostorg/phoenix/issues/111
is to define BOOST_PHOENIX_STL_TUPLE_H_ so that
boost/stl/tuple.h is not included in boost/phoenix.hpp
*/
#define BOOST_PHOENIX_STL_TUPLE_H_
#include "expression.hpp"
#include "error_handler.hpp"
#include "annotation.hpp"
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include <boost/phoenix/function.hpp>
#include <boost/phoenix.hpp>
#include <boost/fusion/adapted.hpp>
//#include <boost/spirit/include/qi_lit.hpp>
......@@ -190,4 +200,4 @@ namespace client { namespace parser
on_success(primary_expr,
annotation_function(error_handler.iters)(_val, _1));
}
}}
\ No newline at end of file
}}
......@@ -11,10 +11,9 @@
#include "error_handler.hpp"
#include <set>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/spirit/include/phoenix_core.hpp>
#include <boost/spirit/include/phoenix_function.hpp>
#include <boost/spirit/include/phoenix_operator.hpp>
#include <boost/phoenix/core.hpp>
#include <boost/phoenix/function.hpp>
#include <boost/phoenix/operator.hpp>
namespace client { namespace code_gen
{
......
......@@ -47,7 +47,7 @@ struct ProbeVariable {
bool is_valid = true;
boost::scoped_ptr<ProbeReader> sim_probe(new ProbeReader(probe_filename_));
const std::unique_ptr<ProbeReader> sim_probe(new ProbeReader(probe_filename_));
try {
sim_probe->parseFile();
......
......@@ -6,7 +6,6 @@
#include "boost/type_traits/remove_cv.hpp"
#include "boost/variant/get.hpp"
#include "boost/variant/variant.hpp"
#include "boost/smart_ptr.hpp"
#include "Util/Types.h"
#include "Util/PeakReader.h"
......@@ -31,7 +30,7 @@ struct RadialPeak {
bool is_valid = true;
boost::scoped_ptr<PeakReader> sim_peaks(new PeakReader(peak_filename_));
const std::unique_ptr<PeakReader> sim_peaks(new PeakReader(peak_filename_));
try {
sim_peaks->parseFile();
} catch (OptPilotException &ex) {
......
......@@ -31,7 +31,6 @@
#include "boost/variant/get.hpp"
#include "boost/variant/variant.hpp"
#include "boost/smart_ptr.hpp"
#include "Util/Types.h"
#include "Util/SDDSReader.h"
......@@ -68,7 +67,7 @@ struct SDDSVariable {
bool is_valid = true;
boost::scoped_ptr<SDDSReader> sim_stats(new SDDSReader(stat_filename_));
const std::unique_ptr<SDDSReader> sim_stats(new SDDSReader(stat_filename_));
try {
sim_stats->parseFile();
} catch (SDDSParserException &ex) {
......
......@@ -51,10 +51,10 @@ struct SeptumExpr {
double result = 0.0;
try {
boost::scoped_ptr<PeakReader> sim_peaks(new PeakReader(probe + std::string(".peaks")));
const std::unique_ptr<PeakReader> sim_peaks(new PeakReader(probe + std::string(".peaks")));
sim_peaks->parseFile();
boost::scoped_ptr<ProbeHistReader> sim_hist(new ProbeHistReader(probe + std::string(".hist")));
const std::unique_ptr<ProbeHistReader> sim_hist(new ProbeHistReader(probe + std::string(".hist")));
sim_hist->parseFile();
double upperBound = 0.0;
......
......@@ -69,7 +69,7 @@ struct SumErrSq {
parseMeasurements(measurement_filename);
bool is_valid = true;
boost::scoped_ptr<SDDSReader> sim_stats(new SDDSReader(stat_filename_));
const std::unique_ptr<SDDSReader> sim_stats(new SDDSReader(stat_filename_));
try {
sim_stats->parseFile();
} catch (OptPilotException &ex) {
......
......@@ -35,7 +35,6 @@
#include "boost/type_traits/remove_cv.hpp"
#include "boost/variant/get.hpp"
#include "boost/variant/variant.hpp"
#include "boost/smart_ptr.hpp"
#include "Util/Types.h"
#include "Util/PeakReader.h"
......@@ -58,8 +57,8 @@ struct SumErrSqRadialPeak {
bool is_valid = true;
boost::scoped_ptr<PeakReader> meas_peaks(new PeakReader(meas_filename_));
boost::scoped_ptr<PeakReader> sim_peaks(new PeakReader(sim_filename_));
const std::unique_ptr<PeakReader> meas_peaks(new PeakReader(meas_filename_));
const std::unique_ptr<PeakReader> sim_peaks(new PeakReader(sim_filename_));
try {
sim_peaks->parseFile();
meas_peaks->parseFile();
......