Hot answers tagged

17

This is normal. With Intel CPUs that support HyperThreading, Mathematica will launch only as many kernels as there are physical cores. The number of logical cores is typically twice the number of physical cores, so your operating system ends up reporting 50% CPU usage. You can manually launch more parallel kernels (if you have the license for it, see ...


6

This issue is discussed more fully here: Mma 10: Half the parallel power (Macs)? v9 vs v10 Under Mma 9, Mathematica automatically take advantage of your computer's full core capability (e.g. on a Mac Pro with 6 physical cores, it automatically takes advantage of all 12 cores ... not just the 6 physical cores). Under Mma 10, by default, Mma only uses as ...


6

You don't have to write all your code within ParallelSubmit. You can wrap your code in Module or Block and assign it to a variable using SetDelayed (:=) so it won't be evaluated immediately. Here is a toy example: eval1 := PrimeQ[528973465287364528736543] eval2 := Module[{}, Pause[2]; 3] evaluators = ParallelSubmit[{eval1, eval2}] You then run the ...


5

This is an extended comment. This behaviour is new in 10.4. I can reproduce it with 10.4.1 on OS X, but not with 10.3.1. This may be related: DistributeDefinitions and synchronization in Mathematica 10 We can try to analyse what happens like this: z := (Print[$KernelID]; 1); SetSharedVariable[z]; ParallelEvaluate[z] ...


5

Your cube file had a very large grid ( 117*117*130 = 1779570), and 2 million points is just far too many for testing a function. So I created cube files for the electron density and electrostatic potential for the molecule furan, using a much sparser grid (around 8000 grid points instead). Here they are: Density cube file Potential cube file Now that ...


5

I am not a Mathematica user but can talk about the rest. "Logical cores" are virtual. It is a way for the CPU to squeeze out some performance from otherwise inefficient things running in parallel AND to better utilize its inner facilities. For example, each physical core has multiple separate integer and floating point units. Running just one process on each ...


4

Basic approach At first we configure parallel kernels either via the Evaluation ► Kernel Configuration Options menu item or programmatically via the EvaluatorNames global FrontEnd option. The following code defines 9 additional kernels which you'll able to assign to Cells in a Notebook (warning: if you already changed the Kernel Configuration Options, the ...


3

The Autoload mechanism can be used for this. Place the package in $UserBaseDirectory/Autoload or $BaseDirectory/Autoload. However, the package must follow the standard structure, and must have a Kernel/init.m file, otherwise it won't get loaded. Also keep in mind that auto-loading of packages happens only after $UserBaseDirectory/Kernel/init.m was loaded ...


2

I use the following solution for this problem: I have a package called AddPath which can add pre-defined directories to the $Path. This package is placed in $UserBaseDirectory/Autoload, so it gets loaded on parallel kernels as well. I put another very basic package in Autoload which simply contains Needs["AddPath`"] AddPath[{"Pack1","Pack2",...}] Then ...



Only top voted, non community-wiki answers of a minimum length are eligible