Skip to content

Commit

Permalink
Merge pull request #1736 from ComputationalRadiationPhysics/release-0…
Browse files Browse the repository at this point in the history
….2.2

Release 0.2.2: Bug Fixes
  • Loading branch information
psychocoderHPC authored Jan 4, 2017
2 parents 0172594 + 43d8655 commit aabd50e
Show file tree
Hide file tree
Showing 9 changed files with 441 additions and 274 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
Change Log / Release Log for PIConGPU
================================================================

0.2.2
-----
**Date:** 2017-01-04

Laser wavepacket, vacuum openPMD & icc

This release fixes a broken laser profile (wavepacket), allows to use
icc as the host compiler, fixes a bug when writing openPMD files in
simulations without particle species ("vacuum") and a problem with
GPU device selection on shared node usage via `CUDA_VISIBLE_DEVICES`.

### Changes to "0.2.1"

**Bug Fixes:**
- add missing minus sign wavepacket laser transversal #1722
- write openPMD meta data without species #1718
- device selection: guard valid range #1665
- PMacc icc compatibility:
- `MapTuple` #1648
- `AllCombinations` #1646

**Misc:**
- refactor `InheritLinearly` #1647

Thanks to René Widera and Richard Pausch for spotting the issues and
providing fixes!


0.2.1
-----
**Date:** 2016-11-29
Expand Down
2 changes: 1 addition & 1 deletion src/libPMacc/include/Environment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Environment
{
throw std::runtime_error("no CUDA capable devices detected");
}
else if (num_gpus < deviceNumber) //check if device can be selected by deviceNumber
else if (deviceNumber >= num_gpus) //check if device can be selected by deviceNumber
{
std::cerr << "no CUDA device " << deviceNumber << ", only " << num_gpus << " devices found" << std::endl;
throw std::runtime_error("CUDA capable devices can't be selected");
Expand Down
58 changes: 32 additions & 26 deletions src/libPMacc/include/compileTime/AllCombinations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,6 @@ namespace PMacc
{
namespace bmpl = boost::mpl;

/** Assign to each element in a sequence of CT::Vector(s) a type at a given
* component position
*
* @tparam T_InVector sequence with CT::Vector
* @tparam T_ComponentPos position of the component to be changed (type must be bmpl::integral_c<uint32_t,X>)
* @tparam T_Element value (type) which should replace the component at position T_Component
* in the CT::Vector elements
*/
template<typename T_InVector,
typename T_ComponentPos,
typename T_Element
>
struct AssignToAnyElementInVector
{
typedef T_InVector InVector;
typedef T_Element Element;

typedef typename bmpl::transform<
InVector,
PMacc::math::CT::Assign<bmpl::_1, T_ComponentPos, Element>
>::type type;
};

namespace detail
{
/** Create tuples out of the elements of N sequences
Expand Down Expand Up @@ -101,10 +78,39 @@ struct AllCombinations<T_MplSeq, T_TmpResult, false >
*/
typedef typename bmpl::copy<LastElementAsSequence, bmpl::back_inserter< bmpl::vector0<> > >::type TmpVector;

typedef typename bmpl::transform< TmpVector,
AssignToAnyElementInVector<TmpResult,
bmpl::integral_c<uint32_t, rangeVectorSize - 1 >, bmpl::_1 > >::type NestedSeq;
/** Assign to each element in a sequence of CT::Vector(s) a type at a given
* component position
*
* @tparam T_ComponentPos position of the component to be changed (type must be bmpl::integral_c<uint32_t,X>)
* @tparam T_Element value (type) which should replace the component at position T_Component
* in the CT::Vector elements
*/
template<
typename T_ComponentPos,
typename T_Element
>
struct AssignToAnyElementInVector
{
typedef TmpResult InVector;
typedef T_Element Element;

typedef typename bmpl::transform<
InVector,
PMacc::math::CT::Assign<
bmpl::_1,
T_ComponentPos,
Element
>
>::type type;
};

typedef typename bmpl::transform<
TmpVector,
AssignToAnyElementInVector<
bmpl::integral_c<uint32_t, rangeVectorSize - 1 >,
bmpl::_1
>
>::type NestedSeq;

typedef typename MakeSeqFromNestedSeq<NestedSeq>::type OneSeq;

Expand Down
Loading

0 comments on commit aabd50e

Please sign in to comment.