Skip to content

u/alexpin

In this archive from Feb 2016 to Jun 2018

1
posts
12
comments
0
media
34
score

Top posts

Running a long CPU-intensive simulation

Hello reddit, I need to gather some data by running a CPU-intensive simulation I have written in C. I don't know how many times and for how long, but possibly for a few hours straight. What's the recommended way of doing this? Should I throttle my CPU to prevent it from melting? (if yes, how?) Sligh...

6 points3 comments
Open on Reddit

Top comments

relevant wiki article

/opt normally has 755 permissions. If you develop as your user and not root (as you should), then you won't be able to write to this folder.

The fix the wiki suggests is explained in the link above, and consists in:

  • creating a new group, sdkusers
  • adding yourself to that group
  • changing the owning group of /opt/android-sdk and everything in that (-R flag) to sdkusers
  • finally, making everything in /opt/android-sdk group writable, i.e. 775 instead of 755.

As your /opt/android-sdk is already 775, then what you should do after each upgrade is:

chown -R :sdkusers /opt/android-sdk/ chmod -R g+w /opt/android-sdk/

You can also make it a pacman hook if you don't want to do it manually.

5 points

Great, thanks for the clear answer!

p.s. the simulation is currently single-threaded, I hope to be able to make it multithreaded. I tried a quick run and indeed the core that gets chosen heats up a bit (it went from 30 to 60°C in a few minutes, but the others stayed relatively cool).

2 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.