/SupportEnumeration

Serial and Parallel implementation and benchmarking of Support Enumeration Algorithm to solve Nash Equilibria

Primary LanguageCuda

SupportEnumeration

Serial and Parallel implementation and benchmarking of Support Enumeration Algorithm to solve Nash Equilibria

Note: newest verions of code directory can be found at: https://github.com/peternguyen117/SupportEnumeration/

Building

In order to build all codes, we need the following:

load the following modules:

Langs/Intel/14 Lang/Cuda/6.0

All necessary source files:

GPUsupEnum.cu OMPsupEnum.c SerialsupEnum.c printUtils.c printUtils.h readData.c subsets.c

Simply run "make" to build all codes

The following three python scripts are used primarily for diagnostic and testing purposes and are unnecessary to run the C codes

memcheck.py supportPairs.py supEnum.py

Running

The usage of the codes is as follows:

./GPUsupEnum *.easy [optional posint arg]

./OMPsupEnum *.easy numThreads

./SerialsupEnum *.easy

For the GPU code, the number of threads per block can optionally be set, otherwise defaults to 512

For the OMP code, numThreads must be a positive int arg

All three codes require as input *.easy files, generated by scripts within the subdirectory games/

In order to ensure that games can be generated, DO NOT manipulate or move the files gamut.jar, convEasyParse.py and ensure that a python interpreter with argparse capability, and a java compiler have been loaded.

genGameEasy.sh may have to be manipulated in order to run the correct python interpreter

To generate a game using GAMUT, refer to the GAMUT user's manual.

To generate a *.easy game for the codes, run ./genGameEasy.sh -g [gameType] -actions [no. of actions],

where the -g and -actions flags specify what type of game we wish to generate and how many actions each player has. Again, the GAMUT user's manual will provide additional details. "genGameEasy.sh" generates 2-player games.

The script will create 2 files, one of which will be appended with .easy; this file can be run by the codes

Benchmarking

Benchmarking data and scripts can be found in the subdir benchmarking/

The scripts need not be run with arguments; please check the source in the scripts for any questions.

RUN THE BENCHMARKING SCRIPTS ONLY AFTER SUCCESSFULLY CALLING MAKE TO BUILD THE CODES

GPUbenchmark.sh writes to GPUdata.log

OMPbenchmark.sh writes to OMPdata.log

Serialbenchmark.sh writes to Serialdata.log

The scripts will benchmark using the files specified in testFiles.txt; these local file names specified in testFiles.txt will be searched for in the games/ subdirectory

Testing

In order to test for correctness, all codes must be able to print the nash equilibria to stdout. In order to benchmark, all codes must NOT print nash equilibria to stdout.

SerialsupEnum and OMPsupEnum currently have set the "printsolution" function on to print out all Nash equilibria to stdout; in order to stop this, merely comment out the line that calls "printsolution" in SerialsupEnum.c and OMPsupEnum.c.

GPUsupEnum currently does not print Nash equilibria to stdout; to do so, uncomment the line that calls "printsolution" in GPUsupEnum.cu; WARNING: "printsolution" is NOT ATOMIC in GPUsupEnum