Skip to content

parallel processing in r...

4 messages · akshay kulkarni, Benoit Vaillant, Christofer Bogaso

#
dear Members,
                                      Thanks for the reply..I do have another issue; I will be highly obliged if you answer it:
I tried "top" at the bash prompt, but it provides a way to measure CPU performance of the existing processes. I want to check the CPU usage of the execution of an R function. So I start R by this

$ R

and at the R prompt I type the function to be executed. But if I type "top" at the R prompt, it says object "top" not found.

So, should I change to bash prompt after running the R function? If yes, how do I do it? If not, how to use "top" inside the R prompt?

Again, I think this is an OS isuue....but I could'nt find any answer in the Internet. I am an independent researcher and I don't have personal access to experts.......this mail list is the only vent I have.......

Very many thanks for your time and effort...
Yours sincerely,
AKSHAY M KULKARNI
#
Hello,
On Sun, Jul 01, 2018 at 11:31:29AM +0000, akshay kulkarni wrote:
Try to open two bash prompts, in one use R and in the other use top to
monitor what is going on.
top is a shell command, no issue with R not knowing about this.
Basically, you can't.
... (many more dots) Do you think we are experts on your system?

Please do your home work and get back to us once it's done. ;-)

Cheers,
#
Hi,

On ' how to use "top" inside the R prompt? '
you can use system('top') command.

Thanks,

On Sun, Jul 1, 2018 at 9:53 PM Benoit Vaillant <benoit.vaillant at no-log.org>
wrote:

  
  
#
dear Benoit,
                       Amazing! I did my home work and found out that only two out of eight processors is being utilized by mclapply.

I am using general purpose t2 instances in AWS, with Linux AMI(Red Hat).

How do I make RHEL  utilize all the processors in my linux instance? Should I use the "configure" command in Linux? Is there any specific command in AWS linux instances? Or just setting the mc.cores argument of mclapply to 8(there are 8 cores in my linux instance) work?

If the answer is somewhat involved, please refer  some online resources....

Very many thanks for your time and effort....
Yours sincerely
AKSHAY M KULKARNI