Project

General

Profile

Bug #1692

Charmxi dies on Array Indices with Template Parameters

Added by Nils Deppe 10 months ago. Updated 3 months ago.

Status:
Merged
Priority:
Normal
Assignee:
Category:
Charmxi
Target version:
Start date:
09/26/2017
Due date:
% Done:

0%

Tags:

Description

If the index to a chare array has template parameters then charmc chokes. A workaround is defining a type alias to the type with the template parameters substituted in. However, it would be nice if this worked directly. Here is a simply CI file that demonstrates the issue:

module Array {
  array [MyIndex<1>] MyArray {
    entry MyArray();
  }
}

The error is:

STDIN:2:14-17: error: invalid construct
  array [MyIndex<1>] MyArray {
             ^^^^
Fatal Error by charmc in directory ./spectre
   Command ../charm/bin/charmxi -orig-file ./dummy.ci returned error code 1
charmc exiting...

History

#1 Updated by Phil Miller 10 months ago

  • Category set to Charmxi

The long-range direction on this is to get away from .ci files entirely, so we don't need to run on the 'parsing C++' treadmill.

If it turns out to be straightforward, we may teach the .ci file parser to handle this in the meantime.

#2 Updated by Eric Bohm 9 months ago

  • Assignee set to Eric Mikida

#3 Updated by Sam White 3 months ago

Nils pointed out that they have a templated array index type in Spectre that that allows users to define custom indices at compile-time, which we could absorb into Charm++: https://github.com/nilsdeppe/spectre/blob/develop/src/Parallel/ArrayIndex.hpp

#4 Updated by Sam White 3 months ago

  • Subject changed from charmc Dies on Array Indices with Template Parameters to Charmxi dies on Array Indices with Template Parameters
  • Target version set to 6.9.0

Spectre currently has to work around .ci file parsing limitations for this.

Changes in here to support ci file changes: build/src/Parallel/ConstGlobalCache.def.h

Class for templated array indices here. Nils encouraged us to absorb this class into charm: spectre/src/Parallel/ArrayIndex.hpp

#5 Updated by Sam White 3 months ago

  • Tags set to #spectre

#6 Updated by Evan Ramos 3 months ago

  • Assignee changed from Eric Mikida to Evan Ramos

#7 Updated by Evan Ramos 3 months ago

  • Status changed from New to Implemented

The underlying deficiency in parsing is fixed in: https://charm.cs.illinois.edu/gerrit/4006

This does not integrate ArrayIndex.hpp from SpECTRE. A separate feature request/reminder issue can be created for that task.

#8 Updated by Sam White 3 months ago

  • Status changed from Implemented to Merged

Also available in: Atom PDF