<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body 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>
<br>
getdp_sparskit sample -pre EleSta_v -cal<br>
<br>
On 26/11/10 20:25, John_V wrote:
<blockquote
cite="mid:AANLkTiksJDf_Cb7ixem8Fsbsz20N3TUYV_iMUqe0ASXE@mail.gmail.com"
type="cite">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 moz-do-not-send="true"
href="http://sample.pro">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
moz-do-not-send="true" href="http://sample.pro">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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
getdp mailing list
<a class="moz-txt-link-abbreviated" href="mailto:getdp@geuz.org">getdp@geuz.org</a>
<a class="moz-txt-link-freetext" href="http://www.geuz.org/mailman/listinfo/getdp">http://www.geuz.org/mailman/listinfo/getdp</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" 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 class="moz-txt-link-freetext" href="http://ace.montefiore.ulg.ac.be/">http://ace.montefiore.ulg.ac.be/</a>
</pre>
</body>
</html>