Add brkfix to goma, feedback needed

Looking for feedback on brkfix integration

Here is a better diff of what was modified in goma https://gist.github.com/wortiz/3f673e874a3f6f1fa80f

Documentation describing the interface can be found here: https://github.com/wortiz/goma/blob/brkfix-fb/docs/parallel_integration.md

I added a new file called `brk_utils.c`

I also added `brk_exo_file.c` and `fix_exo_file.c` under brkfix which are mostly copies of brk.c and fix.c but with an easier to use function interface for goma.

I haven't broken any backwards functionality as far as I know, my input file additions are optional and goma will still run in the same fashion if run without the new options

Basic usage:

```
goma -a -i input -brk brkfile
```

or specify brkfile in input file with `Brk file`

goma must be run in serial to create a brkfile and will exit if run on parallel with -brk or `Brk file` specified.

If the brkfile exists then goma can be run in parallel

```
mpirun -np 4 goma -a -i input -brk brkfile
```

`-brk brkfile` again can be specified in the input file, and goma will "fix" the output exodus file based on the `Fix Frequency` card, if the fix frequency isn't specified goma will only fix the output at the end of main.c after the problem has been "solved"

I still need to add a -fix flag which will fix the broken exodus files manually (similar to fix executable)


Don't have time now to look at this, Weston, but we can look at existing structures that might be suitable on Friday.
I think there is probably one that is appropriate that can be exported.
Randy

From: Weston Ortiz <notifications@github.com<mailto:notifications@github.com>>
Reply-To: goma/goma <reply@reply.github.com<mailto:reply@reply.github.com>>
Date: Wednesday, July 30, 2014 1:13 PM
To: goma/goma <goma@noreply.github.com<mailto:goma@noreply.github.com>>
Subject: [EXTERNAL] Re: [goma] Add brkfix to goma, feedback needed (#40)


In src/brk_utils.c:

> +
> +/* Probably should only include needed files */
> +#include <stdlib.h>
> +#include <stdio.h>
> +
> +#include "std.h"
> +#include "exo_struct.h"
> +
> +#include "goma.h"
> +
> +#include "brk_utils.h"
> +#include "brkfix/brkfix_types.h"
> +#include "brkfix/brk.h"
> +#include "brkfix/fix.h"
> +
> +int Brk_Flag;


I was using it as something to get it working without large portions of code change, it doesn't seem like there are any appropriate structures for these kind of flags. So I used a global flag similar to the others in rf_io.h

If you have any recommended structures I missed I can take a look at them to avoid the global flag. (Problem_Description seems like the closest but none of the other IO related information was there).

Otherwise there are a lot of these things that should probably be improved on so we can avoid using separate global values.

—
Reply to this email directly or view it on GitHub<https://github.com/goma/goma/pull/40/files#r15605425>.