2 Writing Charm++ Interface File

In this step, you need to write a Charm++ interface file with extension of .ci. In this file you can declare parallel Chare Arrays and their entry functions. The syntax is same as in Charm++.
      ## Just replace Hello throughout with your chare's name. ##
      ## and add your chare's entry points below where indicated ##
      ## Everything else remains the same ##
      mainmodule hello {
        // declare readonly variables which once set is available to all
        // Chares across processors.      
        readonly int chunkSize;

        array [1D] Hello {
          entry Hello();

          // Note how your Fortran function takes the above defined
          // message instead of a list of parameters.
          entry void SayHi(int a, double b, int n, int arr[n]);

          // Other entry points go here

        };              
      };
Note, you cannot declare main chare in the interface file, you also are not supposed to declare messages. Furthermore, the entry functions must be declared with explicit parameters instead of using messages.



February 13, 2012
Charm Homepage