Skip to content
Snippets Groups Projects
Commit 0b6a81f6 authored by toole1's avatar toole1
Browse files

monad release 3.0.3

git-svn-id: https://subversion.cs.illinois.edu/svn/cs225@6162 6fbd10e7-183d-0410-a318-cb416676e4f2
parent 78f390c6
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ namespace versioninfo
{
const char * official_name = "Monad Autograder";
const char * version_name = "mazecity";
const Version version_num = Version(3, 0, 2);
const Version version_num = Version(3, 0, 3);
const char * date = "31 Jan 2012";
}
......
......@@ -236,7 +236,7 @@ int32_t RunTests::run_single_test(const char * testname)
if (strcmp(tests[test_i].name(), testname) == 0)
return run_single_test(tests[test_i]);
cout << "Test not found" << endl;
cout << "Test '" << testname << "' not found" << endl;
exit(-1);
}
......
......@@ -405,6 +405,7 @@ TimeIterationsData timeIterationsImpl(Generator gen, Timer timeFunctor, Cleaner
for (uint64_t genstart = util::process_clock(); max_iterations < max_gen_iterations && util::process_clock() - genstart < min_time; max_iterations++)
inputs.push_back(new typename Generator::result_type(gen(input_size)));
// Make a temporary from the generator to be used to warm up the timeFunctor (in case it needs to initialize static variables, etc.)
typename Generator::result_type warmup_temp = gen(1);
timeFunctor(warmup_temp); // Warm up time functor (i.e. initialize statics)
......
......@@ -184,10 +184,11 @@ int8_t exec(const string & command, const vector<string> & args, ostream * outpu
// Sanitize environment
char path[] = "PATH=/bin/:/usr/bin:/usr/local/bin";
char libpath[] = "LD_LIBRARY_PATH=/software/intel-composer-2011u5-x86_64/lib/intel64/:$LD_LIBRARY_PATH"; // path for libiomp5.so
char licenses[] = "INTEL_LICENSE_FILE=28518@intel.webstore.illinois.edu:/software/intel-composer-2011u5-x86_64/composerxe-2011.5.220/licenses:/opt/intel/licenses:/home/massung1/intel/licenses"; // also for parallel labs
// Turn off glibc errors default write-to-terminal behaviour, because
// it does not get caught by stderr. This instead results in an abort.
char redirect_glibc[] = "LIBC_FATAL_STDERR_=1";
char * newenv[] = { path, libpath, redirect_glibc, NULL };
char * newenv[] = { path, libpath, licenses, redirect_glibc, NULL };
environ = newenv;
char ** args_cstr = cstr_array_from_vector_string(command, args);
......@@ -1001,13 +1002,19 @@ OptionsParser::OptionsParser()
}
vector<string> OptionsParser::parse(int argc, const char * const * argv)
{
vector<string> rawArgs(argv, argv + argc);
return parse(rawArgs);
}
vector<string> OptionsParser::parse(const vector<string> & rawArgs)
{
vector<string> unprocessedArgs;
size_t out_arg_i = 0;
for (int arg_i = 1; arg_i < argc; arg_i++)
for (size_t arg_i = 1; arg_i < rawArgs.size(); arg_i++)
{
string originalCaseArg = argv[arg_i];
const string & originalCaseArg = rawArgs[arg_i];
string currarg = toLower(originalCaseArg);
if (currarg.compare(0, 2, "--") == 0) //long option
......
......@@ -102,6 +102,7 @@ class OptionsParser
void addOption(const string & name, bool & setValue) { optsMap[name] = &setValue; }
void addArg(string & setValue) { args.push_back(&setValue); }
vector<string> parse(int argc, const char * const * argv);
vector<string> parse(const vector<string> & rawArgs);
};
// EXEC()
......@@ -217,6 +218,20 @@ void readFileGeneric(const string & file, FileMap * map, vector<string> * lines,
char * processOptions(int argc, char ** argv, OptionsMap & opts, vector<string> & args);
// Exceptions
class Exception : public std::exception
{
private:
std::string message;
public:
Exception(const std::string & _message) : message(_message) { }
virtual const char * what() const throw() { return message.c_str(); }
virtual ~Exception() throw() { }
};
// AUTOGRADER
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment