MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Problem overwriting init.m file

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111689] Problem overwriting init.m file
  • From: Bob F <deepyogurt at gmail.com>
  • Date: Tue, 10 Aug 2010 03:56:43 -0400 (EDT)

On March 1, 2006, Arnoud Buzing made a posting about creating kernels.
I tried it out as I was having a problem creating a remote kernel (the
post follows below) and lost the contents of my init.m file - much to
my surprise and disappointment. Why would this code cause the init.m
file to be replaced (really what was lost was the kernel definitions I
had already created - none of them were named "Remote", but of course
I did have a local that I didn't care about. Any suggestions about how
to prevent Mathematica from overwriting this important file, that
might have taken many hours to tweak to get things just how I like to
have them set up? Why no confirmation before overwriting this
important file? Seems like a good idea to me.

-Bob Freeman

On Mar 1 2006, 3:25 am, Arnoud Buzing <arno... at wolfram.com> wrote:
> Chris Chiasson wrote:
> > Dear MathGroup,
>
> > In trying to set up a remote kernel connection to a linux machine, I am
> > wondering the following about the Kernel configuration dialog box.
>
> > It uses java -jarmathssh, butmathsshdoesn't exist in my Mathematica
> > installation directory. I do have C:\Program Files\Wolfram
> > Research\Mathematica\5.2\SystemFiles\Java\WolframSSH.jar
>
> > Why is it trying to use a program that doesn't exist?
>
> Chris,
>
> It actually uses `java` -jar `mathssh` ...
>
> The `java` and `mathssh` are replaced by the frontend with the appropriat=
e
> values for your machine. Other special `` variables used by the frontend
> are `username`, `linkname` and `ipaddress`. They are also replaced by the
> frontend at the time the link to the kernel is made.
>
> You can set up remote kernels in two ways, via the frontend and via the
> kernel. To set up remote kernels via the kernel, you need to set/change
> the EvaluatorNames option for the $FrontEnd object. First personalize
> these two variables:
>
> remote="machine.domain.com";
> kernel="/your/path/to/math";
>
> Then evaluate:
>
> SetOptions[
>   $FrontEnd,
>   EvaluatorNames->{
>    "Local"->{},
>    "Remote"->{
>     "MLOpenArguments"->
>      "-LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInter=
act",
>     "LoginScript"->
>      "\"`java`\" -jar \"`mathssh`\""<>
>      " `username`@"<>remote<>
>      " "<>kernel<>
>      " -mathlink"<>
>      " -LinkMode Connect"<>
>      " -LinkProtocol TCPIP"<>
>      " -LinkName \"`linkname`\""<>
>      " -LinkHost `ipaddress`"
>    }
>   }
> ]
>
> Then test by creating a notebook using the new 'Remote' kernel:
>
> NotebookCreate[Evaluator->"Remote"]
>
> In the new notebook evaluate: $MachineName
>
> You may see an SSH dialog come up to confirm if you want to connect.
> Click Yes if you want to connect.
>
> After a few moments the name of the remote machine should appear for Out[=
1].
>
> If your Windows user name and UNIX user name do not match, you may want
> to explicitly replace `username` in the above code with your actual UNIX =
username.
>
> Note that, unless you are setting up many remote kernels programmatically=
, it is
> easier to just use the Kernel -> Kernel Configuration Options ... dialog.
>
> First click the 'Add' button, the check the 'Remote Machine' radio button=
 under
> the basic options and fill out the user name, remote machine name and the=
 full
> path to the kernel on the remote machine. Then click OK (twice) and test =
it by
> setting the notebook's kernel to the 'New Kernel'.
>
> ---
> Arnoud


  • Prev by Date: Re: remote kernel problem
  • Next by Date: Re: remote kernel problem
  • Previous by thread: Re: Clearing RAM Memory during evaluation
  • Next by thread: How to display a popup showing just items list view?