HI,
I downloaded and installed the Wolfram Engine for Developers. Practically it is the unrestricted backend and the developer is passing instructions to it from a terminal window. I also have a Mathematica 12.1.1 installed in the same director where I installed the Wolfram Engine but this Mathematica is NOT running. When I start the Wolfram Engine it puts two processes into the Activity Monitor on my MacPro: one "wolframscript" and one "wolframKernel". It also opens a terminal window with the title "WolframKernel * wolframscript" with the content: Wolfram Language 12.1.1 Engine for Mac OS X x86 (64-bit) Copyright 1988-2020 Wolfram Research, Inc.
In[1]:=
So far so good. The question is now, how do I execute a .wls file at this prompt?
The difficulty is, that if I ignore this window and open a normal Terminal window and execute the wolframscript -file sp500.wls there, then it uses NOT the just started Wolfram engine licence, but rather the installed and NOT running Mathematica 12.1.1 backend licence to execute the command. To prove it, I execute the LaunchKernels[12]
command in the WE /Wolfram Engine/ induced Terminal window and voila I get 12 kernels running in the Activity Monitor:
In[1]:= LaunchKernels[12]
Out[1]= {KernelObject[1, local], KernelObject[2, local],
> KernelObject[3, local], KernelObject[4, local], KernelObject[5, local],
> KernelObject[6, local], KernelObject[7, local], KernelObject[8, local],
> KernelObject[9, local], KernelObject[10, local], KernelObject[11, local],
> KernelObject[12, local]}
Going back to the normal terminal window and execute the .wls file there with wolframscript -file sp500.wls
, where the file contain a Kernels[]
check gives me this output:
janos@MacPro Stocks % wolframscript -file sp500.wls
/Volumes/Home/janos/Library/Mathematica/Licensing/mathpass:3: Mathematica 12.1.1 Kernel license you are using has expired. Please contact Wolfram Research or an authorized Wolfram product distributor to extend your license and obtain a new password.
/Volumes/Home/janos/Library/Mathematica/Licensing/mathpass:3: Mathematica 12.1.1 Kernel license you are using has expired. Please contact Wolfram Research or an authorized Wolfram product distributor to extend your license and obtain a new password.
/Volumes/Home/janos/Library/Mathematica/Licensing/mathpass:3: Mathematica 12.1.1 Kernel license you are using has expired. Please contact Wolfram Research or an authorized Wolfram product distributor to extend your license and obtain a new password.
/Volumes/Home/janos/Library/Mathematica/Licensing/mathpass:3: Mathematica 12.1.1 Kernel license you are using has expired. Please contact Wolfram Research or an authorized Wolfram product distributor to extend your license and obtain a new password.
/Volumes/Home/janos/Library/Mathematica/Licensing/mathpass:3: Mathematica 12.1.1 Kernel license you are using has expired. Please contact Wolfram Research or an authorized Wolfram product distributor to extend your license and obtain a new password.
/Volumes/Home/janos/Library/Mathematica/Licensing/mathpass:3: Mathematica 12.1.1 Kernel license you are using has expired. Please contact Wolfram Research or an authorized Wolfram product distributor to extend your license and obtain a new password.
/Volumes/Home/janos/Library/Mathematica/Licensing/mathpass:3: Mathematica 12.1.1 Kernel license you are using has expired. Please contact Wolfram Research or an authorized Wolfram product distributor to extend your license and obtain a new password.
LinkObject::linkw: Unable to write data to closed link LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 117, 6].
LinkObject::linkw: Unable to write data to closed link LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 118, 7].
LinkObject::linkw: Unable to write data to closed link LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 119, 8].
General::stop: Further output of LinkObject::linkw will be suppressed during this calculation.
/Volumes/Home/janos/Library/Mathematica/Licensing/mathpass:3: Mathematica 12.1.1 Kernel license you are using has expired. Please contact Wolfram Research or an authorized Wolfram product distributor to extend your license and obtain a new password.
LinkObject::linkd: Unable to communicate with closed link LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 117, 6].
LinkObject::linkd: Unable to communicate with closed link LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 118, 7].
LinkObject::linkd: Unable to communicate with closed link LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 119, 8].
General::stop: Further output of LinkObject::linkd will be suppressed during this calculation.
ParallelDeveloper
ConnectKernel::failinit: 8 of 12 kernels failed to initialize. {KernelObject[ParallelKernels
Privatebk[SubKernels
LocalKernelslocalKernel[SubKernels
LocalKernelsPrivate
lk[LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 113, 2], {'/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, SubKernelsLocalKernels
LowerPriority -> True}, SubKernelsLocalKernels
Privatespeed$1184, SubKernels
LocalKernelsPrivate
preemptive$1184]], ParallelKernels
Privateid$1199, Parallel
KernelsPrivate
name$1199, ParallelKernels
PrivatesubProps$1199], Parallel
KernelsPrivate
ek[ParallelKernels
Privatenev$1200, Parallel
KernelsPrivate
pb$1200, ParallelKernels
Privaterd$1200], Parallel
KernelsPrivate
sk[ParallelKernels
Privateq$1201, Parallel
KernelsPrivate
n0$1201, ParallelKernels
Privaten1$1201]], KernelObject[Parallel
KernelsPrivate
bk[SubKernelsLocalKernels
localKernel[SubKernelsLocalKernels
Privatelk[LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 114, 3], {'/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, SubKernels
LocalKernelsLowerPriority -> True}, SubKernels
LocalKernelsPrivate
speed$1185, SubKernelsLocalKernels
Privatepreemptive$1185]], Parallel
KernelsPrivate
id$1203, ParallelKernels
Privatename$1203, Parallel
KernelsPrivate
subProps$1203], ParallelKernels
Privateek[Parallel
KernelsPrivate
nev$1204, ParallelKernels
Privatepb$1204, Parallel
KernelsPrivate
rd$1204], ParallelKernels
Privatesk[Parallel
KernelsPrivate
q$1205, ParallelKernels
Privaten0$1205, Parallel
KernelsPrivate
n1$1205]], KernelObject[ParallelKernels
Privatebk[SubKernels
LocalKernelslocalKernel[SubKernels
LocalKernelsPrivate
lk[LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 115, 4], {'/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, SubKernelsLocalKernels
LowerPriority -> True}, SubKernelsLocalKernels
Privatespeed$1186, SubKernels
LocalKernelsPrivate
preemptive$1186]], ParallelKernels
Privateid$1207, Parallel
KernelsPrivate
name$1207, ParallelKernels
PrivatesubProps$1207], Parallel
KernelsPrivate
ek[ParallelKernels
Privatenev$1208, Parallel
KernelsPrivate
pb$1208, ParallelKernels
Privaterd$1208], Parallel
KernelsPrivate
sk[ParallelKernels
Privateq$1209, Parallel
KernelsPrivate
n0$1209, ParallelKernels
Privaten1$1209]], KernelObject[Parallel
KernelsPrivate
bk[SubKernelsLocalKernels
localKernel[SubKernelsLocalKernels
Privatelk[LinkObject['/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, 116, 5], {'/Volumes/Apps/Mathematica12.1.1.6958981.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp, SubKernels
LocalKernelsLowerPriority -> True}, SubKernels
LocalKernelsPrivate
speed$1187, SubKernelsLocalKernels
Privatepreemptive$1187]], Parallel
KernelsPrivate
id$1211, ParallelKernels
Privatename$1211, Parallel
KernelsPrivate
subProps$1211], ParallelKernels
Privateek[Parallel
KernelsPrivate
nev$1212, ParallelKernels
Privatepb$1212, Parallel
KernelsPrivate
rd$1212], ParallelKernels
Privatesk[Parallel
KernelsPrivate
q$1213, ParallelKernels
Privaten0$1213, Parallel
KernelsPrivate
n1$1213]]}
By watching the Activity Monitor only ONE wolframKernel is doing all the work although the script has a few ParallelTables. Any good hint is appreciated. János