<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"Formateret HTML Tegn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.FormateretHTMLTegn
{mso-style-name:"Formateret HTML Tegn";
mso-style-priority:99;
mso-style-link:"Formateret HTML ";
font-family:Consolas;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
-->
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">Hi John<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">I run getdp using python, a script language. It is very simple and very versatile. You could try it out.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D">KR Lars<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">Fra:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> getdp-bounces@ace20.montefiore.ulg.ac.be [mailto:getdp-bounces@ace20.montefiore.ulg.ac.be]
<b>På vegne af </b>John_V<br>
<b>Sendt:</b> 27. november 2010 17:31<br>
<b>Til:</b> r.sabariego@ulg.ac.be<br>
<b>Cc:</b> getdp@geuz.org<br>
<b>Emne:</b> Re: [Getdp] Launching GetDP from another program<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Ruth: Thank you for your offer to look at the files. I may take you up on it, but I should do some work first. I suspect the problem somehow lies in the launch from my Java program because GetDP works OK for
me too when I run it by hand. (...and my solver.par file is the same as the default one you attached to your last message.)<br>
<br>
I had a thought to simplify the command by putting the getdp command line into a batch file (FEA.bat). Then my Java program only needs to launch FEA.bat. What could be simpler? This doesn't work either. I get a
<br>
<br>
java.io.IOException: Cannot run program "FEA.bat" in directory "It here gives the correct path to my directory, where I can plainly see the FEA.bat file." : CreateProcess error=2, The system cannot find the file specified.
<br>
<br>
Something is very strange here, but it does not seem to involve GetDP. I suspect there is something else on the command line, possibly something non-printing so does not show up when GetDP reports Running 'getdp_sparskit sample -pre EleSta_v -cal' but which
corrupts either the command (if only that is given) or the last option if a command and options are given. Let me follow this clue before I bother you further.<br>
<br>
Thanks for you help.<br>
<br>
John<br>
<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On Sat, Nov 27, 2010 at 2:37 AM, Ruth V. Sabariego <<a href="mailto:r.sabariego@ulg.ac.be">r.sabariego@ulg.ac.be</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal">The message "Missing number" has to do with the parameters for the solver Sparskit.
<br>
Have you checked the content of your file 'solver.par'?<br>
I send you the default file, just in case. <br>
I am not able to reproduce your error. Everything works fine here: GetDP 2.1.0 compiled with Sparskit or GetDP 2.1.1 compiled with PetSc.
<br>
Could you send your files?<br>
<br>
Regards,<br>
<span style="color:#888888">Ruth</span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
On 27/11/10 02:32, John_V wrote: <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Thanks Ruth. Unfortunately, I did also try this, with the same result. --John<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On Fri, Nov 26, 2010 at 3:22 PM, Ruth V. Sabariego <<a href="mailto:r.sabariego@ulg.ac.be" target="_blank">r.sabariego@ulg.ac.be</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal">I often launch GetDP from Matlab without any problem.<br>
Try with:<br>
getdp_sparskit sample -sol EleSta_v<br>
<br>
Ruth <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
getdp_sparskit sample -pre EleSta_v -cal<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">On 26/11/10 20:25, John_V wrote: <o:p></o:p></p>
</div>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Has anyone successfully launched GetDP from another program?<br>
<br>
I have a Java program that writes problem specification files for GetDP and then attempts to launch it. I don't understand GetDP's ""Missing number"" error message.
<br>
<br>
Here's the SHORT VERSION of my story. GetD itself reports:<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal">Running 'getdp_sparskit sample -pre EleSta_v -cal'<br>
Info : Started on Fri Nov 26 13:29:57 2010<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Then it produces error output as follows:<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal">Error : Missing number<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
Does anyone know what is the "Missing number" to which GetDP is referring? The reported command, 'getdp_sparskit sample -pre EleSta_v -cal', does run properly if I type it manually at a DOS prompt or put it in a batch file. (getdp_sparskit is my renamed getdp
executable after compiling with the sparskit library.)<br>
<br>
If instead I change the command line to 'getdp_sparskit sample -pre EleSta_v -cal 1>output.txt 2>errout.txt' there is more progress before it fails. I get the following normal output followed by error message:<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">Info : Started on Fri Nov 26 13:28:24 2010<br>
Info : Unknown option: '2>errout.txt'<br>
Info : Loading problem definition '<a href="http://sample.pro" target="_blank">sample.pro</a>'<br>
Info : Loading problem definition 'Jacobian_Lib.pro'<br>
Info : Loading problem definition 'Integration_Lib.pro'<br>
Info : Loading problem definition 'EleSta_v.pro'<br>
Info : Selected Resolution 'EleSta_v'<br>
Info : Loaded Geometric data 'sample.msh'<br>
Info : System 'Sys_Ele' : Real<br>
P r e - P r o c e s s i n g . . .<br>
Info : Loding Pre-Processing data 'sample.pre'<br>
Info : (CPU = 10.4375s)<br>
E n d P r e - P r o c e s s i n g<br>
P r o c e s s i n g . . .<br>
Info : Generate[Sys_Ele]<br>
Info : Loading parameter file 'solver.par'<br>
Error : Unknown solver parameter 'pre EleSta_v'<o:p></o:p></p>
</div>
<p class="MsoNormal">The solver.par file in my working directory works OK when I run from the command line, and it does not contain the characters EleSta_v, so this error message is also mysterious.<br>
<br>
I would appreciate any insights.<br>
<br>
John<br>
<br>
<br>
DETAILED VERSION. Below is one version of the code I use to launch GetDP from my Java program and the resulting output. (I wrote a second version, using Java's ProcessBuilder class in hopes of seeing a different result, but the output was identical.)<br>
<br>
My Java code:<br>
String[] command = new String[] {<br>
"getdp_sparskit",<br>
"sample",<br>
"-pre EleSta_v",<br>
"-cal" <br>
};<br>
<br>
Runtime runtime = Runtime.getRuntime();<br>
Process child = runtime.exec(command, null, new File(feaFolder)); /* feaFolder is working directory with
<a href="http://sample.pro" target="_blank">sample.pro</a>, etc.*/<br>
InputStream is = child.getInputStream();<br>
InputStreamReader isr = new InputStreamReader(is);<br>
BufferedReader br = new BufferedReader(isr);<br>
BufferedReader brErr = new BufferedReader(new InputStreamReader(child.getErrorStream()));<br>
String line;<br>
<br>
System.out.printf("Output of running %s is:", <br>
Arrays.toString(command));<br>
<br>
while ((line = br.readLine()) != null) {<br>
System.out.println(line);<br>
}<br>
<br>
System.out.printf("Error output of running %s is:", Arrays.toString(command));<br>
<br>
while((line = brErr.readLine()) != null) {<br>
System.out.println(line);<br>
}<br>
<br>
int exitVal = child.waitFor();<br>
<br>
The exitVal = 1 indicates a not-normal exit. <br>
<br>
Output and error message:<o:p></o:p></p>
<div style="margin-left:30.0pt">
<p class="MsoNormal">Output of running [getdp_sparskit, sample, -pre EleSta_v, -cal] is:<br>
Info : Running 'getdp_sparskit sample -pre EleSta_v -cal'<br>
Info : Started on Fri Nov 26 13:29:57 2010<br>
Error output of running [getdp_sparskit, sample, -pre EleSta_v, -cal] is:Error : Missing number<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
The longer, more successful message reported above resulted from changing the definition of command to
<br>
String[] command = new String[] {<br>
"getdp_sparskit",<br>
"sample",<br>
"-solve EleSta_v",<br>
"1>output.txt",<br>
"2>errout.txt"<br>
};<br>
<br>
<o:p></o:p></p>
</div>
</div>
<pre><o:p> </o:p></pre>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>getdp mailing list<o:p></o:p></pre>
<pre><a href="mailto:getdp@geuz.org" target="_blank">getdp@geuz.org</a><o:p></o:p></pre>
<pre><a href="http://www.geuz.org/mailman/listinfo/getdp" target="_blank">http://www.geuz.org/mailman/listinfo/getdp</a><o:p></o:p></pre>
</blockquote>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Dr. Ir. Ruth V. Sabariego<o:p></o:p></pre>
<pre>University of Liege, Dept. of Electrical Engineering & Computer Science, <o:p></o:p></pre>
<pre>Applied & Computational Electromagnetics (ACE),<o:p></o:p></pre>
<pre>phone: +32-4-3663737 - fax: +32-4-3662910 - <a href="http://ace.montefiore.ulg.ac.be/" target="_blank">http://ace.montefiore.ulg.ac.be/</a><o:p></o:p></pre>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
getdp mailing list<br>
<a href="mailto:getdp@geuz.org" target="_blank">getdp@geuz.org</a><br>
<a href="http://www.geuz.org/mailman/listinfo/getdp" target="_blank">http://www.geuz.org/mailman/listinfo/getdp</a><o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<pre>-- <o:p></o:p></pre>
<pre>Dr. Ir. Ruth V. Sabariego<o:p></o:p></pre>
<pre>University of Liege, Dept. of Electrical Engineering & Computer Science, <o:p></o:p></pre>
<pre>Applied & Computational Electromagnetics (ACE),<o:p></o:p></pre>
<pre>phone: +32-4-3663737 - fax: +32-4-3662910 - <a href="http://ace.montefiore.ulg.ac.be/" target="_blank">http://ace.montefiore.ulg.ac.be/</a><o:p></o:p></pre>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>