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><br><div class="gmail_quote">On Sat, Nov 27, 2010 at 2:37 AM, Ruth V. Sabariego <span dir="ltr"><<a href="mailto:r.sabariego@ulg.ac.be">r.sabariego@ulg.ac.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">
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><font color="#888888">
Ruth</font><div><div></div><div class="h5"><br>
<br>
On 27/11/10 02:32, John_V wrote:
<blockquote type="cite">Thanks Ruth. Unfortunately, I did also try this, with
the same result. --John<br>
<br>
<br>
<div class="gmail_quote">On Fri, Nov 26, 2010 at 3:22 PM, Ruth V.
Sabariego <span dir="ltr"><<a href="mailto:r.sabariego@ulg.ac.be" target="_blank">r.sabariego@ulg.ac.be</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> I often launch GetDP
from Matlab without any problem.<br>
Try with:<br>
getdp_sparskit sample -sol EleSta_v<br>
<br>
Ruth <br>
<div> <br>
getdp_sparskit sample -pre EleSta_v -cal<br>
<br>
</div>
<div>
<div> On 26/11/10 20:25, John_V wrote: </div>
</div>
<blockquote type="cite">
<div>
<div>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:<br>
<br>
<div style="margin-left: 40px;">Running
'getdp_sparskit sample -pre EleSta_v -cal'<br>
Info : Started on Fri Nov 26 13:29:57 2010<br>
</div>
<br>
Then it produces error output as follows:<br>
<br>
<div style="margin-left: 40px;">Error : Missing
number<br>
</div>
<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:<br>
<br>
<div style="margin-left: 40px;">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'<br>
<br>
</div>
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:<br>
<div style="margin-left: 40px;">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<br>
</div>
<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>
<br>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
getdp mailing list
<a href="mailto:getdp@geuz.org" target="_blank">getdp@geuz.org</a>
<a href="http://www.geuz.org/mailman/listinfo/getdp" target="_blank">http://www.geuz.org/mailman/listinfo/getdp</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Dr. Ir. Ruth V. Sabariego
University of Liege, Dept. of Electrical Engineering & Computer Science,
Applied & Computational Electromagnetics (ACE),
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>
</pre>
</div>
<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><br>
<br>
</blockquote>
</div>
<br>
</blockquote>
<br>
<pre cols="72">--
Dr. Ir. Ruth V. Sabariego
University of Liege, Dept. of Electrical Engineering & Computer Science,
Applied & Computational Electromagnetics (ACE),
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>
</pre>
</div></div></div>
</blockquote></div><br>