Page 3 of 5
Re: "Preprocessing stage required but no mesh is given"
Posted: Tue Oct 29, 2019 12:53 pm
by senartcon
Hello Yvan,
I using
for running from terminal.
My runcase script is:
Code: Select all
#!/bin/bash
# Ensure the correct command is found:
export PATH=/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/bin:$PATH
# Run command:
\code_saturne run --param MiddleStove.xml --threads-per-task 8
Re: "Preprocessing stage required but no mesh is given"
Posted: Tue Oct 29, 2019 2:25 pm
by Yvan Fournier
Hello,
Here is some slightly improved instrumentation. Could you try that and post the result ? The first 10 lines of the output are he important ones here.
Also, in your "runcase", could you tre replacing "--param" with "--param=" or "-p " ? They should be equivalent, but it seems info is lost at this stage, so it may be worth testing.
Regards,
Yvan
Re: "Preprocessing stage required but no mesh is given"
Posted: Wed Oct 30, 2019 7:02 am
by senartcon
Hello Yvan,
This is the full error output for the cs_run.py you sent:
Code: Select all
Traceback (most recent call last):
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/bin/code_saturne", line 76, in <module>
retcode = cs.execute()
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_script.py", line 93, in execute
return self.commands[command](options)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_script.py", line 169, in run
import cs_run
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_run.py", line 155
if options.coupling and options.param:
^
SyntaxError: invalid syntax
I think because of the syntax error, there is no effect yet in modifying the runcase.
Anand
Re: "Preprocessing stage required but no mesh is given"
Posted: Wed Oct 30, 2019 11:59 am
by Yvan Fournier
Hello,
Attached is a fixed version.
Best regards,
Yvan
Re: "Preprocessing stage required but no mesh is given"
Posted: Wed Oct 30, 2019 12:21 pm
by senartcon
Hello Yvan,
the following is the error:
(changing anything in or even totally removing the "runcase" file also produced the same error!)
Code: Select all
[]
[]
options.param: None
read_parameter_file_1 None
Code_Saturne
************
Version: 6.0
Path: /home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64
Result directory:
/home/anands/Documents/Code_Saturne_Sims/Verify-VolumeHeatSource/Case-2-MiddleStove/RESU/20191030-1642
****************************
Preparing calculation data
****************************
Single processor Code_Saturne simulation.
***************************
Preprocessing calculation
***************************
Traceback (most recent call last):
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/bin/code_saturne", line 76, in <module>
retcode = cs.execute()
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_script.py", line 93, in execute
return self.commands[command](options)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_script.py", line 170, in run
return cs_run.main(options, self.package)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_run.py", line 335, in main
return run(argv, pkg)[0]
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_run.py", line 323, in run
stages=stages)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_case.py", line 2042, in run
mpiexec_options)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_case.py", line 1738, in preprocess
d.preprocess()
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_case_domain.py", line 900, in preprocess
raise RunCaseError(err_str)
cs_case_domain.RunCaseError: Preprocessing stage required but no mesh is given
Anand
Re: "Preprocessing stage required but no mesh is given"
Posted: Wed Oct 30, 2019 2:55 pm
by Yvan Fournier
Hello,
This seems to indicate the system arguments are not passed at all.
In the installed code_saturne script (in <install_prefix>/bin/code_saturne, assuming you did not use the --with-shell-env configure option, in which case it would be code_saturne.py), could you search for:
cs = master_script(sys.argv[1:], pkg)
and add:
printf(sys.argv)
on the line before of after (with the same indentation), and check again ?
Best regards,
Yvan
Re: "Preprocessing stage required but no mesh is given"
Posted: Wed Oct 30, 2019 5:52 pm
by Yvan Fournier
Hello,
Just to check, are you running:
code_saturne run
or
code_saturne run --param MiddleStove.xml
?
The second option should work, but not the first.
Regards,
Yvan
Re: "Preprocessing stage required but no mesh is given"
Posted: Thu Oct 31, 2019 5:27 am
by senartcon
Hello Yvan,
with the following command:
Code: Select all
$ code_saturne run --param MiddleStove.xml
The following is the output:
The first line is due to the addition of "print(sys.argv)"
Code: Select all
['/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/bin/code_saturne', 'run', '--param', 'MiddleStove.xml']
['--param', 'MiddleStove.xml']
['--param', 'MiddleStove.xml']
options.param: MiddleStove.xml
read_parameter_file_1 MiddleStove.xml
enter _getMeshParams
<DOM Element: Code_Saturne_GUI at 0x7fab0e20c470>
self.domain_node
Traceback (most recent call last):
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/bin/code_saturne", line 77, in <module>
retcode = cs.execute()
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_script.py", line 93, in execute
return self.commands[command](options)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_script.py", line 170, in run
return cs_run.main(options, self.package)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_run.py", line 335, in main
return run(argv, pkg)[0]
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_run.py", line 306, in run
domains=d)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_case.py", line 275, in __init__
d.set_case_dir(self.case_dir, staging_dir)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_case_domain.py", line 532, in set_case_dir
self.read_parameter_file(self.param)
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_case_domain.py", line 497, in read_parameter_file
params = P.getParams()
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_xml_reader.py", line 365, in getParams
self._getMeshParams()
File "/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/lib/python3.6/site-packages/code_saturne/cs_xml_reader.py", line 212, in _getMeshParams
print(self.domain_node)
AttributeError: 'Parser' object has no attribute 'domain_node'
Anand
Re: "Preprocessing stage required but no mesh is given"
Posted: Thu Oct 31, 2019 10:42 am
by Yvan Fournier
Hello,
Could you revert to the standard (unmodified code), or at least use the attached file (there was an error in my instrumentation).
Then try again with "code_saturne run --param MiddleStove.xml" ?
I would expect the code to work using the full command (which has not changed yet since previous versions, though a slightly different directory structure allowing a simple "code_saturne run" is planned in the future).
Regards,
Yvan
Re: "Preprocessing stage required but no mesh is given"
Posted: Thu Oct 31, 2019 11:22 am
by senartcon
Hello Yvan,
I have reverted back to old code except for your most recent "cs_xml_reader.py"
The following the output:
Code: Select all
Code_Saturne
************
Version: 6.0
Path: /home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64
Result directory:
/home/anands/Documents/Code_Saturne_Sims/Verify-VolumeHeatSource/Case-2-MiddleStove/RESU/preprocess_20191031-1543
****************************
Preparing calculation data
****************************
Single processor Code_Saturne simulation.
***************************
Preprocessing calculation
***************************
/home/anands/Documents/CODE_SATURNE/Code_Saturne/6.0.0/code_saturne-6.0.0/arch/Linux_x86_64/libexec/code_saturne/cs_preprocess: error while loading shared libraries: libhdf5.so.103: cannot open shared object file: No such file or directory
Error running the preprocessor.
Check the preprocessor.log file for details.
Error in preprocessing stage.
*****************************
Post-calculation operations
*****************************
Error in preprocessing stage.
Apparently it is able to locate the meshes, but could not find libhd5.so.103 although I could 'locate' them as below
Code: Select all
$ locate libhdf5.so.103
/home/anands/Documents/SALOME/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/hdf5/lib/libhdf5.so.103
/home/anands/Documents/SALOME/SALOME-9.3.0-UB18.04-SRC/BINARIES-UB18.04/hdf5/lib/libhdf5.so.103.0.0
code_saturne is installed with hdf5 that came with SALOME binaries as located above.
Anand