resources: Updating gem5-resources to comply with gem5-20.1.

Change-Id: I9f288d843235aa4c1c9e96855beec58e1e953632
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5-resources/+/39775
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: Bobby R. Bruce <bbruce@ucdavis.edu>
diff --git a/src/parsec/disk-image/parsec/parsec-benchmark/.gitignore b/src/parsec/disk-image/parsec/parsec-benchmark/.gitignore
deleted file mode 100644
index e2b6427..0000000
--- a/src/parsec/disk-image/parsec/parsec-benchmark/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-*.tar
-*.tar.gz
-*~
-/log
-/parsec-3.0
-/pkgs/libs/gsl/src/doc/gsl-ref.info*
-/pkgs/tools/libtool/src/doc/libtool.info*
-autom4te.cache
-inst
-obj
-run
-
-# info
-/pkgs/libs/gsl/src/doc/gsl-ref.info*
-/pkgs/tools/libtool/src/doc/libtool.info*
-
-# libtool doc timestap
-/pkgs/tools/libtool/src/doc/stamp-vti
-/pkgs/tools/libtool/src/doc/version.texi
-
-# Ignore leftover present in the tars.
-/bin/.#parsecmgmt.1.6
-/toolkit/hpt/loggroup1.old/
-/toolkit/hpt/loggroup2.old/
diff --git a/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/vips/src/libvips/iofuncs/package.c b/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/vips/src/libvips/iofuncs/package.c
index 7d73ab8..1f411c1 100644
--- a/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/vips/src/libvips/iofuncs/package.c
+++ b/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/vips/src/libvips/iofuncs/package.c
@@ -15,7 +15,7 @@
 /*
 
     This file is part of VIPS.
-    
+
     VIPS is free software; you can redistribute it and/or modify
     it under the terms of the GNU Lesser General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
@@ -107,7 +107,7 @@
 }
 
 /* Description of im_guess_prefix.
- */ 
+ */
 static im_function guess_prefix_desc = {
 	"im_guess_prefix", 		/* Name */
 	"guess install area",		/* Description */
@@ -143,7 +143,7 @@
 }
 
 /* Description of im_guess_libdir.
- */ 
+ */
 static im_function guess_libdir_desc = {
 	"im_guess_libdir", 		/* Name */
 	"guess library area",		/* Description */
@@ -166,12 +166,12 @@
 static int
 header_int_vec( im_object *argv )
 {
-	return( im_header_int( (IMAGE *) argv[1], (const char *) argv[0], 
+	return( im_header_int( (IMAGE *) argv[1], (const char *) argv[0],
 		(int *) argv[2] ) );
 }
 
 /* Description of im_header_int().
- */ 
+ */
 static im_function header_int_desc = {
 	"im_header_int", 		/* Name */
 	"extract int fields from header",	/* Description */
@@ -196,14 +196,14 @@
 {
 	int *out = (int *) argv[2];
 
-	*out = im_header_get_typeof( (IMAGE *) argv[1], 
-		(const char *) argv[0] ); 
+	*out = im_header_get_typeof( (IMAGE *) argv[1],
+		(const char *) argv[0] );
 
 	return( 0 );
 }
 
 /* Description of im_header_get_typeof().
- */ 
+ */
 static im_function header_get_typeof_desc = {
 	"im_header_get_typeof",		/* Name */
 	"return field type",		/* Description */
@@ -226,12 +226,12 @@
 static int
 header_double_vec( im_object *argv )
 {
-	return( im_header_double( (IMAGE *) argv[1], (const char *) argv[0], 
+	return( im_header_double( (IMAGE *) argv[1], (const char *) argv[0],
 		(double *) argv[2] ) );
 }
 
 /* Description of im_header_double().
- */ 
+ */
 static im_function header_double_desc = {
 	"im_header_double", 		/* Name */
 	"extract double fields from header",	/* Description */
@@ -259,7 +259,7 @@
 	/* Actually, we call im_header_as_string(), so we can do any field and
 	 * not just the string-valued ones.
 	 */
-	if( im_header_as_string( (IMAGE *) argv[1], 
+	if( im_header_as_string( (IMAGE *) argv[1],
 		(const char *) argv[0], out ) )
 		return( -1 );
 
@@ -267,7 +267,7 @@
 }
 
 /* Description of im_header_string().
- */ 
+ */
 static im_function header_string_desc = {
 	"im_header_string", 		/* Name */
 	"extract fields from headers as strings",	/* Description */
@@ -300,7 +300,7 @@
 }
 
 /* Description of im_history_get().
- */ 
+ */
 static im_function history_get_desc = {
 	"im_history_get", 		/* Name */
 	"return the image history as a string",	/* Description */
@@ -334,7 +334,7 @@
 }
 
 /* Description of im_getext().
- */ 
+ */
 static im_function getext_desc = {
 	"im_getext", 			/* Name */
 	"return the image metadata XML as a string",	/* Description */
@@ -361,7 +361,7 @@
 }
 
 /* Description of im_printdesc().
- */ 
+ */
 static im_function printdesc_desc = {
 	"im_printdesc", 		/* Name */
 	"print an image header to stdout",	/* Description */
@@ -389,7 +389,7 @@
 }
 
 /* Description of im_version_string.
- */ 
+ */
 static im_function version_string_desc = {
 	"im_version_string", 		/* Name */
 	"VIPS version string",		/* Description */
@@ -425,7 +425,7 @@
 }
 
 /* Description of im_version.
- */ 
+ */
 static im_function version_desc = {
 	"im_version", 			/* Name */
 	"VIPS version number",		/* Description */
@@ -454,12 +454,12 @@
 	int tile_height = *((int *) argv[3]);
 	int max_tiles = *((int *) argv[4]);
 
-	return( im_cache( argv[0], argv[1], 
+	return( im_cache( argv[0], argv[1],
 		tile_width, tile_height, max_tiles ) );
 }
 
 /* Description of im_cache.
- */ 
+ */
 static im_function cache_desc = {
 	"im_cache", 			/* Name */
 	"cache results of an operation",/* Description */
@@ -495,7 +495,7 @@
 		return( -1 );
 
 	if( im_copy( im, argv[1] ) ||
-		im_add_close_callback( argv[1], 
+		im_add_close_callback( argv[1],
 			(im_callback_fn) im_close, im, NULL ) ) {
                 im_close( im );
 		return( -1 );
@@ -505,7 +505,7 @@
 }
 
 /* Description of im_binfile.
- */ 
+ */
 static im_function binfile_desc = {
 	"im_binfile", 			/* Name */
 	"open a headerless binary file",/* Description */
@@ -587,7 +587,7 @@
 
 	if( plug->module ) {
 		if( !g_module_close( plug->module ) ) {
-			im_error( "plugin", 
+			im_error( "plugin",
 				_( "unable to close plugin \"%s\"" ), name );
 			im_error( "plugin", "%s", g_module_error() );
 			return( -1 );
@@ -612,14 +612,14 @@
 	Plugin *plug;
 
 	if( !g_module_supported() ) {
-		im_error( "plugin",	
+		im_error( "plugin",
 			"%s", _( "plugins not supported on this platform" ) );
 		return( NULL );
 	}
 
 	/* Build a new plugin.
 	 */
-	if( !(plug = IM_NEW( NULL, Plugin )) ) 
+	if( !(plug = IM_NEW( NULL, Plugin )) )
 		return( NULL );
 	plug->module = NULL;
 	plug->name = NULL;
@@ -647,7 +647,7 @@
 	 */
 	/* Bizarre double-cast stops a bogus gcc 4.1 compiler warning.
 	 */
-	if( !g_module_symbol( plug->module, 
+	if( !g_module_symbol( plug->module,
 		"package_table", (gpointer *) ((void *) &plug->pack) ) ) {
 		im_error( "plugin",
 			_( "unable to find symbol \"package_table\" "
@@ -660,7 +660,7 @@
 
 	/* Sanity check.
 	 */
-	if( !plug->pack->name || plug->pack->nfuncs < 0 || 
+	if( !plug->pack->name || plug->pack->nfuncs < 0 ||
 		plug->pack->nfuncs > 10000 ) {
 		im_error( "plugin",
 			_( "corrupted package table in plugin \"%s\"" ), name );
@@ -697,17 +697,17 @@
         (void) im_vsnprintf( dir_name, PATH_MAX - 1, fmt, ap );
         va_end( ap );
 
-        if( !(dir = g_dir_open( dir_name, 0, NULL )) ) 
+        if( !(dir = g_dir_open( dir_name, 0, NULL )) )
 		/* Silent success for dir not there.
 		 */
                 return( 0 );
 
         result = 0;
         while( (name = g_dir_read_name( dir )) )
-                if( im_ispostfix( name, ".plg" ) ) { 
+                if( im_ispostfix( name, ".plg" ) ) {
 			char path[PATH_MAX];
 
-			im_snprintf( path, PATH_MAX - 1, 
+			im_snprintf( path, PATH_MAX - 1,
 				"%s" G_DIR_SEPARATOR_S "%s", dir_name, name );
 			if( !im_load_plugin( path ) )
 				result = -1;
@@ -746,7 +746,7 @@
 void *
 im_map_packages( VSListMap2Fn fn, void *a )
 {
-	void *r = im_slist_map2( plugin_list, 
+	void *r = im_slist_map2( plugin_list,
 		(VSListMap2Fn) apply_plugin, (void *) fn, a );
 	int i;
 
@@ -767,7 +767,7 @@
 {
 	int i;
 
-	for( i = 0; i < pack->nfuncs; i++ ) 
+	for( i = 0; i < pack->nfuncs; i++ )
 		if( strcmp( pack->table[i]->name, name ) == 0 )
 			return( pack->table[i] );
 
@@ -779,7 +779,7 @@
 im_function *
 im_find_function( const char *name )
 {
-	im_function *fn = im_map_packages( 
+	im_function *fn = im_map_packages(
 		(VSListMap2Fn) search_package, (void *) name );
 
 	if( !fn ) {
@@ -806,7 +806,7 @@
 im_package *
 im_find_package( const char *name )
 {
-	im_package *pack = im_map_packages( 
+	im_package *pack = im_map_packages(
 		(VSListMap2Fn) package_name, (void *) name );
 
 	if( !pack ) {
@@ -833,7 +833,7 @@
 im_package *
 im_package_of_function( const char *name )
 {
-	im_package *pack = im_map_packages( 
+	im_package *pack = im_map_packages(
 		(VSListMap2Fn) package_function, (void *) name );
 
 	if( !pack ) {
@@ -915,7 +915,7 @@
 	/* Destroy all elements with destroy functions.
 	 */
 	for( i = 0; i < vargc; i++ )
-		if( vargv[i] ) 
+		if( vargv[i] )
 			/* If there's a destroy function for this type,
 			 * trigger it.
 			 */
@@ -995,17 +995,17 @@
 
 	if( !(reg = im_region_create( sub )) )
 		return( -1 );
-        if( im_add_close_callback( main, 
+        if( im_add_close_callback( main,
 		(im_callback_fn) region_free, reg, NULL ) ) {
                 im_region_free( reg );
 
                 return( -1 );
         }
- 
+
         return( 0 );
 }
 
-/* vargv[i] is an output image on a PIO function ... make all input images 
+/* vargv[i] is an output image on a PIO function ... make all input images
  * depend on it.
  */
 static int
@@ -1026,7 +1026,7 @@
 				int k;
 
 				for( k = 0; k < iv->n; k++ )
-					if( region_local_image( vargv[i], 
+					if( region_local_image( vargv[i],
 						iv->vec[k] ) )
 						return( -1 );
 			}
@@ -1047,7 +1047,7 @@
 	/* Print all elements.
 	 */
 	for( i = 0; i < vargc; i++ )
-		if( fn->argv[i].print && vargv[i] ) 
+		if( fn->argv[i].print && vargv[i] )
 			if( fn->argv[i].print( vargv[i] ) )
 				return( -1 );
 
@@ -1082,7 +1082,7 @@
 
 	/* Init memory from command line arguments.
 	 */
-	if( build_args( fn, vargv, argc, argv ) ) 
+	if( build_args( fn, vargv, argc, argv ) )
 		return( -1 );
 
 	/* If this is a PIO function, we need to make sure that we close
@@ -1108,12 +1108,12 @@
 
 	/* Call function.
 	 */
-	if( fn->disp( vargv ) ) 
+	if( fn->disp( vargv ) )
 		return( -1 );
 
 	/* Print output.
 	 */
-	if( print_args( fn, vargv ) ) 
+	if( print_args( fn, vargv ) )
 		return( -1 );
 
 	/* Add to history of all output images.
@@ -1134,6 +1134,9 @@
 	static im_object object_array[IM_MAX_ARGS];
 	im_object *vargv = object_array;
 	im_function *fn;
+	#ifdef ENABLE_PARSEC_HOOKS
+	__parsec_roi_begin();
+	#endif
 
 	/* Search packages for a matching function.
 	 */
@@ -1142,11 +1145,11 @@
 
 	/* Allocate space for arguments.
 	 */
-	if( im_allocate_vargv( fn, vargv ) ) 
+	if( im_allocate_vargv( fn, vargv ) )
 		return( -1 );
 
 	/* Call it.
-	 */ 
+	 */
 	if( dispatch_function( fn, vargv, argc, argv ) ) {
 		destroy_args( fn, vargv );
 		im_free_vargv( fn, vargv );
@@ -1155,10 +1158,13 @@
 
 	/* Clean up and exit.
 	 */
-	if( destroy_args( fn, vargv ) ) 
+	if( destroy_args( fn, vargv ) )
 		return( -1 );
 	im_free_vargv( fn, vargv );
 
+	#ifdef ENABLE_PARSEC_HOOKS
+	__parsec_roi_end();
+	#endif
 	return( 0 );
 }
 
@@ -1191,10 +1197,10 @@
 	switch( flag ) {
 	case 0:
 		return( IM_MAJOR_VERSION );
-	
+
 	case 1:
 		return( IM_MINOR_VERSION );
-	
+
 	case 2:
 		return( IM_MICRO_VERSION );
 
diff --git a/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/vips/src/tools/iofuncs/vips.c b/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/vips/src/tools/iofuncs/vips.c
index 5dd7bd8..00a0439 100644
--- a/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/vips/src/tools/iofuncs/vips.c
+++ b/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/apps/vips/src/tools/iofuncs/vips.c
@@ -40,7 +40,7 @@
 /*
 
     This file is part of VIPS.
-    
+
     VIPS is free software; you can redistribute it and/or modify
     it under the terms of the GNU Lesser General Public License as published by
     the Free Software Foundation; either version 2 of the License, or
@@ -79,6 +79,10 @@
 
 #include <vips/vips.h>
 
+#ifdef ENABLE_PARSEC_HOOKS
+#include <hooks.h>
+#endif
+
 #ifdef OS_WIN32
 #define strcasecmp(a,b) _stricmp(a,b)
 #endif
@@ -92,25 +96,25 @@
 static gboolean *main_option_version;
 
 static GOptionEntry main_option[] = {
-	{ "list", 'l', 0, G_OPTION_ARG_STRING, &main_option_list, 
+	{ "list", 'l', 0, G_OPTION_ARG_STRING, &main_option_list,
 		N_( "list operations in PACKAGE "
 			"(or \"all\", \"packages\", \"classes\")" ),
 		N_( "PACKAGE" ) },
-	{ "usage", 'u', 0, G_OPTION_ARG_STRING, &main_option_usage, 
-		N_( "show usage message for OPERATION" ), 
+	{ "usage", 'u', 0, G_OPTION_ARG_STRING, &main_option_usage,
+		N_( "show usage message for OPERATION" ),
 		N_( "OPERATION" ) },
-	{ "plugin", 'p', 0, G_OPTION_ARG_FILENAME, &main_option_plugin, 
-		N_( "load PLUGIN" ), 
+	{ "plugin", 'p', 0, G_OPTION_ARG_FILENAME, &main_option_plugin,
+		N_( "load PLUGIN" ),
 		N_( "PLUGIN" ) },
-	{ "links", 'k', 0, G_OPTION_ARG_NONE, &main_option_links, 
+	{ "links", 'k', 0, G_OPTION_ARG_NONE, &main_option_links,
 		N_( "print link lines for all operations" ), NULL },
-	{ "cpph", 'h', 0, G_OPTION_ARG_STRING, &main_option_cpph, 
-		N_( "print C++ decls for PACKAGE (or \"all\")" ), 
+	{ "cpph", 'h', 0, G_OPTION_ARG_STRING, &main_option_cpph,
+		N_( "print C++ decls for PACKAGE (or \"all\")" ),
 		N_( "PACKAGE" ) },
-	{ "cppc", 'c', 0, G_OPTION_ARG_STRING, &main_option_cppc, 
-		N_( "print C++ binding for PACKAGE (or \"all\")" ), 
+	{ "cppc", 'c', 0, G_OPTION_ARG_STRING, &main_option_cppc,
+		N_( "print C++ binding for PACKAGE (or \"all\")" ),
 		N_( "PACKAGE" ) },
-	{ "version", 'v', 0, G_OPTION_ARG_NONE, &main_option_version, 
+	{ "version", 'v', 0, G_OPTION_ARG_NONE, &main_option_version,
 		N_( "print im_version_string" ), NULL },
 	{ NULL }
 };
@@ -125,7 +129,7 @@
 	int i;
 	void *result;
 
-	for( i = 0; i < pack->nfuncs; i++ ) 
+	for( i = 0; i < pack->nfuncs; i++ )
 		if( (result = fn( pack->table[i] )) )
 			return( result );
 
@@ -140,7 +144,7 @@
 	im_package *pack;
 	im_function *func;
 
-	if( strcmp( name, "all" ) == 0 ) 
+	if( strcmp( name, "all" ) == 0 )
 		/* Do all packages.
 		 */
 		im_map_packages( (VSListMap2Fn) map_package, fn );
@@ -153,7 +157,7 @@
 		 */
 		fn( func );
 	else {
-		im_error( "map_name", 
+		im_error( "map_name",
 			_( "no package or function \"%s\"" ), name );
 		return( fn );
 	}
@@ -165,7 +169,7 @@
 list_package( im_package *pack )
 {
 	printf( "%-20s - %d operations\n", pack->name, pack->nfuncs );
-	
+
 	return( NULL );
 }
 
@@ -173,7 +177,7 @@
 list_function( im_function *func )
 {
 	printf( "%-20s - %s\n", func->name, _( func->desc ) );
-	
+
 	return( NULL );
 }
 
@@ -188,14 +192,14 @@
 static void
 print_list( const char *name )
 {
-	if( strcmp( name, "packages" ) == 0 ) 
+	if( strcmp( name, "packages" ) == 0 )
 		im_map_packages( (VSListMap2Fn) list_package, NULL );
-	else if( strcmp( name, "classes" ) == 0 ) 
-		vips_class_map_concrete_all( g_type_from_name( "VipsObject" ), 
+	else if( strcmp( name, "classes" ) == 0 )
+		vips_class_map_concrete_all( g_type_from_name( "VipsObject" ),
 			(VipsClassMap) list_class, NULL );
 	else {
 		if( map_name( name, list_function ) )
-			error_exit( "unknown package \"%s\"", name ); 
+			error_exit( "unknown package \"%s\"", name );
 	}
 }
 
@@ -222,7 +226,7 @@
 
 	if( l2 < l1 )
 		return( 0 );
-	
+
 	return( strcasecmp( s1, s2 + l2 - l1 ) == 0 );
 }
 
@@ -233,9 +237,9 @@
 {
 	int i;
 
-	for( i = 0; i < pack->nfuncs; i++ ) 
+	for( i = 0; i < pack->nfuncs; i++ )
 		printf( "rm -f %s" IM_EXEEXT "; "
-			"ln -s vips" IM_EXEEXT " %s" IM_EXEEXT "\n", 
+			"ln -s vips" IM_EXEEXT " %s" IM_EXEEXT "\n",
 			pack->table[i]->name, pack->table[i]->name );
 
 	return( NULL );
@@ -266,9 +270,9 @@
 	/* Don't print the prgname if we're being run as a symlink.
 	 */
 	fprintf( stderr, "usage: " );
-	if( im_isprefix( "vips", g_get_prgname() ) ) 
+	if( im_isprefix( "vips", g_get_prgname() ) )
 		fprintf( stderr, "%s ", g_get_prgname() );
-	fprintf( stderr, "%s ", fn->name ); 
+	fprintf( stderr, "%s ", fn->name );
 
 	/* Print args requiring command-line input.
 	 */
@@ -281,7 +285,7 @@
 	fprintf( stderr, "\nwhere:\n" );
 	for( i = 0; i < fn->argc; i++ )
 		if( fn->argv[i].desc->flags & IM_TYPE_ARG )
-			fprintf( stderr, "\t%s is of type \"%s\"\n", 
+			fprintf( stderr, "\t%s is of type \"%s\"\n",
 				fn->argv[i].name, fn->argv[i].desc->type );
 
 	/* Print output print args.
@@ -289,9 +293,9 @@
 	if( has_print( fn ) ) {
 		fprintf( stderr, "prints:\n" );
 		for( i = 0; i < fn->argc; i++ )
-			if( fn->argv[i].print ) 
-				fprintf( stderr, "\t%s of type \"%s\"\n", 
-					fn->argv[i].name, 
+			if( fn->argv[i].print )
+				fprintf( stderr, "\t%s of type \"%s\"\n",
+					fn->argv[i].name,
 					fn->argv[i].desc->type );
 	}
 
@@ -337,7 +341,7 @@
 	 */
 	static char *vtypes[] = {
 		IM_TYPE_DOUBLE,
-		IM_TYPE_INT,  
+		IM_TYPE_INT,
 		IM_TYPE_COMPLEX,
 		IM_TYPE_STRING,
 		IM_TYPE_IMAGE,
@@ -366,7 +370,7 @@
 	};
 
 	for( k = 0; k < IM_NUMBER( vtypes ); k++ )
-		if( strcmp( ty->type, vtypes[k] ) == 0 ) 
+		if( strcmp( ty->type, vtypes[k] ) == 0 )
 			return( ctypes[k] );
 
 	return( NULL );
@@ -393,18 +397,18 @@
 	for( j = 0; j < fn->argc; j++ ) {
 		im_type_desc *ty = fn->argv[j].desc;
 
-		if( ty->flags & IM_TYPE_OUTPUT ) 
+		if( ty->flags & IM_TYPE_OUTPUT )
 			if( strcmp( ty->type, IM_TYPE_IMAGEVEC ) == 0 ||
 				strcmp( ty->type, IM_TYPE_DOUBLEVEC ) == 0 ||
 				strcmp( ty->type, IM_TYPE_INTVEC ) == 0 )
 			return( 0 );
 	}
 
-	/* Must be at least one image argument (input or output) ... since we 
+	/* Must be at least one image argument (input or output) ... since we
 	 * get inserted in the VImage class. Other funcs get wrapped by hand.
 	 */
-	for( j = 0; j < fn->argc; j++ ) 
-		if( strcmp( fn->argv[j].desc->type, IM_TYPE_IMAGE ) == 0 ) 
+	for( j = 0; j < fn->argc; j++ )
+		if( strcmp( fn->argv[j].desc->type, IM_TYPE_IMAGE ) == 0 )
 			break;
 	if( j == fn->argc )
 		return( 0 );
@@ -439,7 +443,7 @@
 	for( j = 0; j < fn->argc; j++ ) {
 		im_type_desc *ty = fn->argv[j].desc;
 
-		if( !(ty->flags & IM_TYPE_OUTPUT) && 
+		if( !(ty->flags & IM_TYPE_OUTPUT) &&
 			strcmp( ty->type, IM_TYPE_IMAGE ) == 0 ) {
 				*ia = j;
 				break;
@@ -506,7 +510,7 @@
 	} while( changed );
 }
 
-/* Print prototype for a function (ie. will be followed by code). 
+/* Print prototype for a function (ie. will be followed by code).
  *
  * Eg.:
  *	VImage VImage::lin( double a, double b ) throw( VError )
@@ -528,7 +532,7 @@
 	 */
 	c2cpp_name( fn->name, name );
 
-	/* Find input and output args. 
+	/* Find input and output args.
 	 */
 	find_ioargs( fn, &ia, &oa );
 
@@ -536,7 +540,7 @@
 	 */
 	if( oa == -1 )
 		printf( "void " );
-	else 
+	else
 		printf( "%s ", vips2cpp( fn->argv[oa].desc ) );
 
 	printf( "VImage::%s(", name );
@@ -581,7 +585,7 @@
 	return( NULL );
 }
 
-/* Print cpp decl for a function. 
+/* Print cpp decl for a function.
  *
  * Eg.
  *	VImage lin( double, double ) throw( VError );
@@ -603,10 +607,10 @@
 	 */
 	c2cpp_name( fn->name, name );
 
-	/* Find input and output args. 
+	/* Find input and output args.
 	 */
 	find_ioargs( fn, &ia, &oa );
-	if( ia == -1 ) 
+	if( ia == -1 )
 		/* No input image, so make it a static in the class
 		 * declaration.
 		 */
@@ -616,7 +620,7 @@
 	 */
 	if( oa == -1 )
 		printf( "void " );
-	else 
+	else
 		printf( "%s ", vips2cpp( fn->argv[oa].desc ) );
 
 	/* Print function name and start arg list.
@@ -661,7 +665,7 @@
 }
 
 static void
-print_invec( int j, const char *arg, 
+print_invec( int j, const char *arg,
 	const char *vips_name, const char *c_name, const char *extract )
 {
 	printf( "\t((%s*) _vec.data(%d))->n = %s.size();\n",
@@ -701,7 +705,7 @@
 	/* Declare return value, if any.
 	 */
 	if( oa != -1 )
-		printf( "\t%s %s;\n\n", 
+		printf( "\t%s %s;\n\n",
 			vips2cpp( fn->argv[oa].desc ),
 			fn->argv[oa].name );
 
@@ -726,7 +730,7 @@
 		/* For output masks, we have to set an input filename. Not
 		 * freed, so constant string is OK.
 		 */
-		if( (ty->flags & IM_TYPE_OUTPUT) && 
+		if( (ty->flags & IM_TYPE_OUTPUT) &&
 			(strcmp( ty->type, IM_TYPE_IMASK ) == 0 ||
 			strcmp( ty->type, IM_TYPE_DMASK ) == 0) ) {
 			printf( "\t((im_mask_object*) _vec.data(%d))->name = "
@@ -746,7 +750,7 @@
 			printf( "\t((im_mask_object*) "
 				"_vec.data(%d))->mask = %s.mask().iptr;\n",
 				j, fn->argv[j].name );
-		else if( strcmp( ty->type, IM_TYPE_DMASK ) == 0 ) 
+		else if( strcmp( ty->type, IM_TYPE_DMASK ) == 0 )
 			printf( "\t((im_mask_object*) "
 				"_vec.data(%d))->mask = %s.mask().dptr;\n",
 				j, fn->argv[j].name );
@@ -760,14 +764,14 @@
 			 */
 			printf( "\t_vec.data(%d) = (im_object) %s;\n",
 				j, fn->argv[j].name );
-		else if( strcmp( ty->type, IM_TYPE_IMAGEVEC ) == 0 ) 
-			print_invec( j, fn->argv[j].name, 
+		else if( strcmp( ty->type, IM_TYPE_IMAGEVEC ) == 0 )
+			print_invec( j, fn->argv[j].name,
 				"im_imagevec_object", "IMAGE *", ".image()" );
-		else if( strcmp( ty->type, IM_TYPE_DOUBLEVEC ) == 0 ) 
-			print_invec( j, fn->argv[j].name, 
+		else if( strcmp( ty->type, IM_TYPE_DOUBLEVEC ) == 0 )
+			print_invec( j, fn->argv[j].name,
 				"im_doublevec_object", "double", "" );
-		else if( strcmp( ty->type, IM_TYPE_INTVEC ) == 0 ) 
-			print_invec( j, fn->argv[j].name, 
+		else if( strcmp( ty->type, IM_TYPE_INTVEC ) == 0 )
+			print_invec( j, fn->argv[j].name,
 				"im_intvec_object", "int", "" );
 		else
 			/* Just use vips2cpp().
@@ -796,7 +800,7 @@
 			continue;
 
 		if( strcmp( ty->type, IM_TYPE_IMASK ) == 0 ||
-			strcmp( ty->type, IM_TYPE_DMASK ) == 0 ) 
+			strcmp( ty->type, IM_TYPE_DMASK ) == 0 )
 			/* Mask types are different - have to use
 			 * im_mask_object.
 			 */
@@ -807,12 +811,12 @@
 			/* Strings are grabbed out of the vec.
 			 */
 			printf( "\t%s = (char*) _vec.data(%d);\n",
-				fn->argv[j].name, j ); 
-		else 
+				fn->argv[j].name, j );
+		else
 			/* Just use vips2cpp().
 			 */
 			printf( "\t%s = *((%s*)_vec.data(%d));\n",
-				fn->argv[j].name, vips2cpp( ty ), j ); 
+				fn->argv[j].name, vips2cpp( ty ), j );
 	}
 
 	/* Note dependancies if out is an image and this function uses
@@ -820,7 +824,7 @@
 	 */
 	if( oa != -1 ) {
 		im_type_desc *ty = fn->argv[oa].desc;
-		
+
 		if( strcmp( ty->type, IM_TYPE_IMAGE ) == 0 &&
 			(fn->flags & IM_FN_PIO) ) {
 			/* Loop for all input args again ..
@@ -835,12 +839,12 @@
 
 				/* Input image.
 				 */
-				if( strcmp( ty2->type, IM_TYPE_IMAGE ) == 0 ) 
+				if( strcmp( ty2->type, IM_TYPE_IMAGE ) == 0 )
 					printf( "\t%s._ref->addref( "
 						"%s._ref );\n",
 						fn->argv[oa].name,
 						fn->argv[j].name );
-				else if( strcmp( ty2->type, IM_TYPE_IMAGEVEC ) 
+				else if( strcmp( ty2->type, IM_TYPE_IMAGEVEC )
 					== 0 ) {
 					/* The out depends on every image in
 					 * the input vector.
@@ -876,7 +880,7 @@
 		"// VIPS library %s\n", im_version_string() );
 
 	if( map_name( name, print_cppdecl ) )
-		error_exit( "unknown package \"%s\"", name ); 
+		error_exit( "unknown package \"%s\"", name );
 }
 
 /* Print C++ bindings for function, package or all.
@@ -888,10 +892,10 @@
 		"// VIPS library %s\n", im_version_string() );
 
 	if( map_name( name, print_cppdef ) )
-		error_exit( "unknown package \"%s\"", name ); 
+		error_exit( "unknown package \"%s\"", name );
 }
 
-/* VIPS universal main program. 
+/* VIPS universal main program.
  */
 int
 main( int argc, char **argv )
@@ -906,8 +910,11 @@
 	textdomain( GETTEXT_PACKAGE );
 	setlocale( LC_ALL, "" );
 
+	#ifdef ENABLE_PARSEC_HOOKS
+  	__parsec_bench_begin(__parsec_vips);
+	#endif
 #ifdef DEBUG_FATAL
-	/* Set masks for debugging ... stop on any problem. 
+	/* Set masks for debugging ... stop on any problem.
 	 */
 	g_log_set_always_fatal(
 		G_LOG_FLAG_RECURSION |
@@ -938,22 +945,22 @@
 
 	if( main_option_plugin ) {
 		if( !im_load_plugin( main_option_plugin ) )
-			error_exit( NULL ); 
+			error_exit( NULL );
 	}
-	if( main_option_cpph ) 
+	if( main_option_cpph )
 		print_cppdecls( main_option_cpph );
-	if( main_option_cppc ) 
+	if( main_option_cppc )
 		print_cppdefs( main_option_cppc );
 	if( main_option_links )
 		im_map_packages( (VSListMap2Fn) print_links, NULL );
-	if( main_option_list ) 
+	if( main_option_list )
 		print_list( main_option_list );
 	if( main_option_usage ) {
 		if( !(fn = im_find_function( main_option_usage )) )
 			error_exit( NULL );
 		usage( fn );
 	}
-	if( main_option_version ) 
+	if( main_option_version )
 		printf( "vips-%s\n", im_version_string() );
 
 	/* Remove any "--" argument. If one of our arguments is a negative
@@ -1011,7 +1018,7 @@
 			error_exit( NULL );
 
 		if( im_run_command( argv[1], argc - 2, argv + 2 ) ) {
-			if( argc == 2 ) 
+			if( argc == 2 )
 				usage( fn );
 			else
 				error_exit( NULL );
@@ -1020,5 +1027,9 @@
 
 	im_close_plugins();
 
+	#ifdef ENABLE_PARSEC_HOOKS
+  	__parsec_bench_end();
+	#endif
+
 	return( 0 );
 }
diff --git a/src/parsec/disk-image/parsec/post-installation.sh b/src/parsec/disk-image/parsec/post-installation.sh
index b23246a..1310f67 100644
--- a/src/parsec/disk-image/parsec/post-installation.sh
+++ b/src/parsec/disk-image/parsec/post-installation.sh
@@ -11,6 +11,6 @@
 # copy and run outside (host) script after booting
 cat /home/gem5/runscript.sh >> /root/.bashrc
 
-chmod -R gem5:gem5 /home/gem5/parsec-benchmark/
+sudo chown -R gem5:gem5 /home/gem5/parsec-benchmark/
 
 echo 'Post Installation Done'