OP2/OP2-Common — pull request #19 by reguly (2012-05-26 02:34:50+00:00)
Title: Aero

1. Support for vector maps
Syntax: op_arg(data, -1*range, map, ...) where range corresponds to the index interval [0 ... range-1] and no more than map->dim
User's kernel: type **data, array of pointers to the different element of the vector
Changes in: code generator (expanding the arg list in the host stub, packing pointers in the wrapper kernel), op_lib_core.c when checking args, op_seq.h allocating pointer arrays and populating them

2. Support for SoA
Syntax: type specification should include ":soa" at the end, e.g. "double:soa". This has to be indicated when declaring the the dat (op_decl_dat) and when passing it to a kernel (op_arg_dat).
User's kernel: data stored as SoA should be accessed differently as normal data: when using the pointer to access values, instead of x[m], x[m*op2_stride] has to be used.
Changes: code generator, op_seq.h (declaring op2_stride=1), op_lib_core.h checking for valid op_args

3. Compressed args list
loc_maps and ind_maps stored in a contiguous chunk of memory (loc_map and ind_map). The loc_maps and ind_maps pointer arrays are still populated for backwards compatibility
Changes: code generator, op_plan (both op_plan_core and op_plan struct)

4. Shared memory calculation on a per-block colour basis
Calculating the amount of shared memory required by blocks on a per block colour basis to help occupancy.
Changes: code generator, op_plan (both op_plan_core and op_plan struct, adding nsharedCol[] array)

5. Memory management
If the user allocates the memory and hands it to OP2, we do not free it. If op_decl_dat_hdf5 is called, we do free it.
Changes: op_dat and op_map now have user_managed flags, in op_exit() we only free them if the flag is true. op_decl_dat/map_core set these flags to true, op_decl_dat/map_hdf5 set them to false.

6. Aero
Aero is a new finite element based application for OP2, that uses all the new features added above (vector maps and SoA). The res_calc loops assembles the FE matrix in the LMA format, then a CG iteration does at most 200 iterations on it. There are 20 N-R iterations doing both of these steps each.
There is a plain double precision version running on one node, that includes no MPI code. There is an MPI-based code without hdf5, and there is an MPI based code with hdf5.