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 114 additions and 149 deletions
......@@ -68,11 +68,3 @@ SUB_ASSIGNMENT_OPERATORS(maxeq,OpMaxAssign)
#include "SubField/SubFieldAssign.hpp"
#endif // SUB_FIELD_ASSIGN_H
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
......@@ -17,12 +17,3 @@ add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/SubParticle)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# require-final-newline: nil
# End:
......@@ -13,7 +13,7 @@
// include files
#include "SubField/SubFieldAssignDefs.h"
#include "SubParticle/SubParticleAssign.h"
#include "SubParticle/SubParticleAttrib.h"
//////////////////////////////////////////////////////////////////////
//
......
......@@ -74,12 +74,3 @@ add_ippl_sources (${_SRCS})
add_ippl_headers (${_HDRS})
install (FILES ${_HDRS} DESTINATION include/Utility)
# vi: set et ts=4 sw=4 sts=4:
# Local Variables:
# mode: cmake
# cmake-tab-width: 4
# indent-tabs-mode: nil
# require-final-newline: nil
# End:
......@@ -197,7 +197,7 @@ string DiscConfig::replace_wildcards(const string& s,
token = machine;
} else if (token == "node" || token == "n" || token == "N") {
char buf[32];
sprintf(buf, "%d", Ippl::myNode());
snprintf(buf, sizeof(buf), "%d", Ippl::myNode());
token = buf;
} else {
// look for an env var with this name
......@@ -377,7 +377,7 @@ bool DiscConfig::parse_config(const char *BaseFile, bool WritingFile) {
PAssert(msg);
string nodename;
::getMessage(*msg,nodename);
sprintf(name, " %s %d", nodename.c_str(), node);
snprintf(name, sizeof(name), " %s %d", nodename.c_str(), node);
NodeNameItems += name;
delete msg;
}
......@@ -489,7 +489,7 @@ bool DiscConfig::parse_config(const char *BaseFile, bool WritingFile) {
// (this is needed in find_processors). But if an SMP has 0 nodes,
// it is an error since the configuration file lists an SMP on which
// we are not running.
if (smpdata->NodeList.size() > 0) {
if (!smpdata->NodeList.empty()) {
sort(smpdata->NodeList.begin(), smpdata->NodeList.end());
smpdata->Box0Node = smpdata->NodeList[0];
} else {
......@@ -571,4 +571,4 @@ void DiscConfig::printDebug(Inform& msg) {
* $RCSfile: DiscConfig.cpp,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
* IPPL_VERSION_ID: $Id: DiscConfig.cpp,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
***************************************************************************/
***************************************************************************/
\ No newline at end of file
......@@ -14,7 +14,6 @@
// include files
#include "Index/NDIndex.h"
#include "Field/BrickExpression.h"
#include "Field/Field.h"
#include "Utility/DiscBuffer.h"
#include "Utility/DiscConfig.h"
#include "Utility/Inform.h"
......@@ -24,8 +23,6 @@
#include <cstdlib>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <vector>
#include <iostream>
......
......@@ -27,7 +27,6 @@
#include "Utility/DiscField.h"
#include "Utility/DiscConfig.h"
#include "Utility/DiscMeta.h"
#include "Field/BrickIterator.h"
#include "Message/Tags.h"
#include "Utility/PAssert.h"
......
......@@ -30,6 +30,7 @@
#include "Utility/IpplInfo.h"
#include "Utility/Inform.h"
#include <cstring>
///////////////////////////////////////////////////////////////////////////
// Constructor: read and parse the given meta file
......
......@@ -15,9 +15,9 @@
#include "Utility/DiscConfig.h"
#include "Utility/IpplInfo.h"
#include "Utility/PAssert.h"
#include "Message/Communicate.h"
#include "Message/Message.h"
#include "Message/Tags.h"
#include <vector>
#include <iostream>
......@@ -26,7 +26,6 @@
// forward declarations
template<class T> class IpplParticleBase;
template<class T> class ParticleAttrib;
class Message;
class DiscParticle {
......
......@@ -21,7 +21,6 @@
#include "AppTypes/Vektor.h"
#include "AppTypes/Tenzor.h"
#include "AppTypes/SymTenzor.h"
#include "AppTypes/AntiSymTenzor.h"
////////////////////////////////////////////////////////////////////////////
// a base class for all DiscType's, that provides common routines to
......
......@@ -34,6 +34,7 @@
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#define INFORM_ALL_NODES (-1)
......
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
* This program was prepared by PSI.
* All rights in the program are reserved by PSI.
* Neither PSI nor the author(s)
* makes any warranty, express or implied, or assumes any liability or
* responsibility for the use of this software
*
* Visit www.amas.web.psi for more details
*
***************************************************************************/
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
// include files
//
// IpplInfo has the following capabilities:
// 1) It initializes all globally-used Ippl variables, such as the
// Communicate class and other manager classes;
// 2) It parses command-line arguments to determine how to configure the
// global state of the Ippl application;
// 3) It properly selects and configures the Communicate class, generally
// resulting in initialization of the parallel machine;
// 4) It offers to the user a single class with access member functions to
// query for information about the Ippl application (such as what is
// the Communicate class instance to use, how many processors are there
// in the current run, etc.)
//
// Copyright (c) 2008 - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
//
// All rights reserved
//
// This file is part of OPAL.
//
// OPAL is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// You should have received a copy of the GNU General Public License
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
//
#include "Utility/IpplInfo.h"
#include "Utility/Inform.h"
#include "Utility/IpplStats.h"
#include "Utility/PAssert.h"
#include "Utility/RandomNumberGen.h"
......@@ -464,7 +466,9 @@ IpplInfo::IpplInfo(int& argc, char**& argv, int removeargs, MPI_Comm mpicomm) {
( strcmp(argv[i], "-h") == 0 ) ||
( strcmp(argv[i], "-?") == 0 ) ) {
// print out summary of command line switches and exit
printHelp(argv);
INFOMSG("Usage: " << argv[0] << " [<option> <option> ...]\n");
INFOMSG(" The possible values for <option> are:\n");
printHelp();
INFOMSG(" --ipplversion : Print a brief version summary.\n");
INFOMSG(" --ipplversionall : Print a detailed version summary.\n");
INFOMSG(" --ipplhelp : Display this command-line summary.\n");
......@@ -737,25 +741,23 @@ void IpplInfo::printVersion(void) {
}
void IpplInfo::printHelp(char** argv) {
INFOMSG("Usage: " << argv[0] << " [<option> <option> ...]\n");
INFOMSG(" The possible values for <option> are:\n");
INFOMSG(" --summary : Print IPPL lib summary at start.\n");
INFOMSG(" --processes <n> : Number of parallel nodes to use.\n");
INFOMSG(" --commlib <x> : Selects a parallel comm. library.\n");
INFOMSG(" <x> = ");
void IpplInfo::printHelp() {
INFOMSG(" --summary : Print IPPL lib summary at start.\n");
INFOMSG(" --processes <n> : Number of parallel nodes to use.\n");
INFOMSG(" --commlib <x> : Selects a parallel comm. library.\n");
INFOMSG(" <x> = ");
INFOMSG(CommCreator::getAllLibraryNames() << "\n");
INFOMSG(" --nocomminit : IPPL does not do communication\n");
INFOMSG(" initialization, assume already done.\n");
INFOMSG(" --connect <x> : Select external connection method.\n");
INFOMSG(" <x> = ");
INFOMSG(" --nocomminit : IPPL does not do communication\n");
INFOMSG(" initialization, assume already done.\n");
INFOMSG(" --connect <x> : Select external connection method.\n");
INFOMSG(" <x> = ");
INFOMSG(DataConnectCreator::getAllMethodNames() << "\n");
INFOMSG(" --time : Show total time used in execution.\n");
INFOMSG(" --notime : Do not show timing info (default).\n");
INFOMSG(" --info <n> : Set info message level. 0 = off.\n");
INFOMSG(" --warn <n> : Set warning message level. 0 = off.\n");
INFOMSG(" --error <n> : Set error message level. 0 = off.\n");
INFOMSG(" --debug <n> : Set debug message level. 0 = off.\n");
INFOMSG(" --time : Show total time used in execution.\n");
INFOMSG(" --notime : Do not show timing info (default).\n");
INFOMSG(" --info <n> : Set info message level. 0 = off.\n");
INFOMSG(" --warn <n> : Set warning message level. 0 = off.\n");
INFOMSG(" --error <n> : Set error message level. 0 = off.\n");
INFOMSG(" --debug <n> : Set debug message level. 0 = off.\n");
/*#ifdef PROFILING_ON
INFOMSG(" --profile <gr> : Enable profiling for groups (e.g., M+P+io) \n");
INFOMSG(" M - Message, P - Pete, V - Viz, A - Assign, I - IO\n");
......@@ -764,16 +766,16 @@ void IpplInfo::printHelp(char** argv) {
INFOMSG(" U - User, 1 - User1, 2 - User2, 3 - User3, 4 - User4\n");
#endif*/ //PROFILING_ON
INFOMSG(" --defergcfill : Turn on deferred guard cell fills.\n");
INFOMSG(" --nofieldcompression: Turn off compression in the Field classes.\n");
INFOMSG(" --offsetstorage : Turn on random LField storage offsets.\n");
INFOMSG(" --extracompcheck : Turn on extra compression checks in evaluator.\n");
INFOMSG(" --checksums : Turn on CRC checksums for messages.\n");
INFOMSG(" --retransmit : Resent messages if a CRC error occurs.\n");
INFOMSG(" --maxfftnodes <n> : Limit the nodes that work on FFT's.\n");
INFOMSG(" --chunksize <n> : Set I/O chunk size. Can end w/K,M,G.\n");
INFOMSG(" --persmppario : Enable on-SMP parallel IO option.\n");
INFOMSG(" --nopersmppario : Disable on-SMP parallel IO option (default).\n");
INFOMSG(" --defergcfill : Turn on deferred guard cell fills.\n");
INFOMSG(" --nofieldcompression : Turn off compression in the Field classes.\n");
INFOMSG(" --offsetstorage : Turn on random LField storage offsets.\n");
INFOMSG(" --extracompcheck : Turn on extra compression checks in evaluator.\n");
INFOMSG(" --checksums : Turn on CRC checksums for messages.\n");
INFOMSG(" --retransmit : Resent messages if a CRC error occurs.\n");
INFOMSG(" --maxfftnodes <n> : Limit the nodes that work on FFT's.\n");
INFOMSG(" --chunksize <n> : Set I/O chunk size. Can end w/K,M,G.\n");
INFOMSG(" --persmppario : Enable on-SMP parallel IO option.\n");
INFOMSG(" --nopersmppario : Disable on-SMP parallel IO option (default).\n");
}
/////////////////////////////////////////////////////////////////////
......@@ -1092,4 +1094,4 @@ void IpplInfo::pop() {
MaxFFTNodes = obj.MaxFFTNodes;
ChunkSize = obj.ChunkSize;
PerSMPParallelIO = obj.PerSMPParallelIO;
}
}
\ No newline at end of file
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
//
// IpplInfo has the following capabilities:
// 1) It initializes all globally-used Ippl variables, such as the
// Communicate class and other manager classes;
// 2) It parses command-line arguments to determine how to configure the
// global state of the Ippl application;
// 3) It properly selects and configures the Communicate class, generally
// resulting in initialization of the parallel machine;
// 4) It offers to the user a single class with access member functions to
// query for information about the Ippl application (such as what is
// the Communicate class instance to use, how many processors are there
// in the current run, etc.)
//
// Copyright (c) 2008 - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
//
// All rights reserved
//
// This file is part of OPAL.
//
// OPAL is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// You should have received a copy of the GNU General Public License
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
//
#ifndef IPPL_INFO_H
#define IPPL_INFO_H
/*
* IpplInfo.has the following capabilities:
* 1) It initializes all globally-used Ippl variables, such as the
* Communicate class and other manager classes;
* 2) It parses command-line arguments to determine how to configure the
* global state of the Ippl application;
* 3) It properly selects and configures the Communicate class, generally
* resulting in initialization of the parallel machine;
* 4) It offers to the user a single class with access member functions to
* query for information about the Ippl application (such as what is
* the Communicate class instance to use, how many processors are there
* in the current run, etc.)
*
* The globally-available Ippl objects are (available via IpplInfo::variable)
* Communicate *Comm ....... parallel communication object
* Inform *Info ............ used to print out informative messages
......@@ -43,9 +48,8 @@
*/
// include files
#include "Utility/Inform.h"
#include "Message/Communicate.h"
#include "Utility/StaticIpplInfo.h"
#include "Utility/Inform.h"
#include <iostream>
#include <stack>
......@@ -56,6 +60,7 @@
#include <mpi.h>
// forward declarations
class Communicate;
class IpplStats;
class IpplInfo;
std::ostream& operator<<(std::ostream&, const IpplInfo&);
......@@ -213,7 +218,7 @@ public:
// print out a detailed listing, otherwise a summary.
static void printVersion(void);
static void printHelp(char** argv);
static void printHelp();
// version: return the name of this version of Ippl, as a string
// (from IpplVersions.h)
......@@ -348,10 +353,4 @@ private:
typedef IpplInfo Ippl;
#endif // IPPL_INFO_H
/***************************************************************************
* $RCSfile: IpplInfo.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
* IPPL_VERSION_ID: $Id: IpplInfo.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
***************************************************************************/
#endif // IPPL_INFO_H
\ No newline at end of file
......@@ -40,6 +40,9 @@
//
#include "Utility/IpplMemoryUsage.h"
#include "Message/GlobalComm.h"
#include "Utility/IpplInfo.h"
//////////////////////////////////////////////////////////////////////
IpplMemoryUsage::IpplMemoryUsage()
{ }
......
......@@ -38,11 +38,11 @@
// You should have received a copy of the GNU General Public License
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
//
#ifndef IPPL_MEMPRYUSAGE_H
#define IPPL_MEMPRYUSAGE_H
#ifndef IPPL_MEMORYUSAGE_H
#define IPPL_MEMORYUSAGE_H
#include "Ippl.h"
#include <memory>
#include <string>
#include <sys/resource.h>
#include <sys/time.h> // not required but increases portability
......
......@@ -38,10 +38,11 @@
// include files
#include "Utility/IpplInfo.h"
#include "Utility/Timer.h"
#include "Utility/Inform.h"
#include <vector>
class Inform;
class IpplStats {
public:
......
......@@ -7,7 +7,6 @@
#include "Utility/IpplTimings.h"
#include "Utility/Inform.h"
#include "Utility/IpplInfo.h"
#include "Message/GlobalComm.h"
#include "PETE/IpplExpressions.h"
......@@ -173,7 +172,7 @@ void Timing::print(const std::string &fn, const std::map<std::string, unsigned i
*msg << "\n";
*/
if (problemSize.size() > 0) {
if (!problemSize.empty()) {
*msg << "Problem size:\n";
for (auto it: problemSize) {
*msg << " " << std::setw(10) << it.first << ": " << it.second << "\n";
......@@ -264,4 +263,4 @@ void IpplTimings::pop() {
delete instance;
instance = stashedInstance.top();
stashedInstance.pop();
}
}
\ No newline at end of file
......@@ -45,8 +45,9 @@ using namespace std;
assertion::assertion( const char *cond, const char *file, int line ):
std::runtime_error(cond)
{
msg = new char[ strlen(cond) + strlen(file) + 500 ];
sprintf( msg, "Assertion: %s, failed in %s, line %8d.",
size_t size = strlen(cond) + strlen(file) + 500;
msg = new char[size];
snprintf( msg, size, "Assertion: %s, failed in %s, line %8d.",
cond, file, line );
}
......@@ -90,8 +91,9 @@ void toss_cookies( const char *cond, const char *file, int line )
void insist( const char *cond, const char *msg, const char *file, int line )
{
char* fullmsg = new char[ strlen(cond) + strlen(msg) + strlen(file) + 500 ];
sprintf( fullmsg, "%s\nAssertion '%s' failed in \n%s on line %8d.",
size_t size = strlen(cond) + strlen(msg) + strlen(file) + 500;
char* fullmsg = new char[size];
snprintf( fullmsg, size, "%s\nAssertion '%s' failed in \n%s on line %8d.",
msg, cond, file, line );
throw assertion( fullmsg );
......
......@@ -6,7 +6,6 @@
#ifndef PASSERT_H
#define PASSERT_H
#include "Utility/IpplInfo.h"
#include <exception>
#include <stdexcept>
......@@ -132,11 +131,3 @@ void insist( const char *cond, const char *msg, const char *file, int line );
//---------------------------------------------------------------------------//
#endif // PASSERT_H
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
......@@ -63,10 +63,8 @@ public:
typedef Key key_type;
typedef std::pair<Key, T> value_type;
typedef Compare key_compare;
class value_compare : public
std::binary_function<value_type, value_type, bool>
class value_compare
{
private:
Compare comp;
......