diff options
| author | Ahmed El-Shafiey <[email protected]> | 2013-04-24 12:30:35 -0800 |
|---|---|---|
| committer | Andrew Boktor <[email protected]> | 2014-08-14 13:50:47 -0700 |
| commit | acd2b3341cca1192ff50f60591ef0db278d970bf (patch) | |
| tree | 6f02c514b2ed3bf380ff7ee0f7eb9fca19980647 | |
| parent | 461575e7388064dbc06eed3e17b094655f046b6c (diff) | |
force power log files to be readable by group and others
(Review ID: 21001)
[git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 15927]
| -rw-r--r-- | src/gpuwattch/gpgpu_sim_wrapper.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpuwattch/gpgpu_sim_wrapper.cc b/src/gpuwattch/gpgpu_sim_wrapper.cc index 0f18439..a906231 100644 --- a/src/gpuwattch/gpgpu_sim_wrapper.cc +++ b/src/gpuwattch/gpgpu_sim_wrapper.cc @@ -26,6 +26,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "gpgpu_sim_wrapper.h" +#include <sys/stat.h> #define SP_BASE_POWER 0 #define SFU_BASE_POWER 0 #define NUM_COMPONENTS_MODELLED 18 @@ -217,7 +218,8 @@ void gpgpu_sim_wrapper::init_mcpat(char* xmlfile, char* powerfilename, char* pow mcpat_init = false; has_written_avg=false; powerfile.open(g_power_filename); - + int flg=chmod(g_power_filename, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); + assert(flg==0); } sample_val = 0; init_inst_val=init_val;//gpu_tot_sim_insn+gpu_sim_insn; |
