[Scilab-users] Using "spec" with "parallel_run"
Eduardo Martini
martini_edu at yahoo.com.br
Tue Dec 20 18:08:44 CET 2016
Hi,
I am running several simulation in which I have to get eigenvalues several times: the process seems to be easy to paralelize as any calculation is independent from the others.
How ever I am getting errors when using "parallel_run" :
I manage to create a simple example of the problem:
"function output=ThisFunctionDoesWork(i) eig_values = spec(rand(10,10));
output = (1:10)';
endfunction
function output=ThisFunctionDoesNOTWork(i)
eig_values = spec(rand(10,10));
output = eig_values;
endfunction
ThisFunctionDoesWork(1)
ThisFunctionDoesNOTWork(1)
parallel_run(1:4,ThisFunctionDoesWork,10)
parallel_run(1:4,ThisFunctionDoesNOTWork,10)"
I get the following output:
">ThisFunctionDoesWork(1)
ans =
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
-->ThisFunctionDoesNOTWork(1)
ans =
4.6702874
0.5256414 + 0.5235705i
0.5256414 - 0.5235705i
0.1415384 + 0.6023968i
0.1415384 - 0.6023968i
- 0.5172448 + 0.4635569i
- 0.5172448 - 0.4635569i
0.1193317
- 0.3188852 + 0.0144623i
- 0.3188852 - 0.0144623i
-->parallel_run(1:4,ThisFunctionDoesWork,10)
ans =
1. 1. 1. 1.
2. 2. 2. 2.
3. 3. 3. 3.
4. 4. 4. 4.
5. 5. 5. 5.
6. 6. 6. 6.
7. 7. 7. 7.
8. 8. 8. 8.
9. 9. 9. 9.
10. 10. 10. 10.
->parallel_run(1:4,ThisFunctionDoesNOTWork,10)
!--error 42
A fatal error has been detected by Scilab.
Your instance will probably quit unexpectedly soon.
If a graphic feature has been used, this might be caused by the system graphic drivers.
Please try to update them and run this feature again.
You can report a bug on http://bugzilla.scilab.org/ with:
* a sample code which reproduces the issue
* the result of [a, b] = getdebuginfo()
* the following information:
[emartini-Dell-System-Inspiron-N4110:31486] Signal: Segmentation fault (11)
[emartini-Dell-System-Inspiron-N4110:31486] Signal code: Address not mapped (1)
[emartini-Dell-System-Inspiron-N4110:31486] Failing at address: (nil)
Call stack:
1: 0x8bb2f9 <JVM_handle_linux_signal> (/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
2: 0x8af1f8 < > (/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
3: 0x11390 < > (/lib/x86_64-linux-gnu/libpthread.so.0)
4: 0x9ec90 < > (/lib/x86_64-linux-gnu/libc.so.6)
5: 0x2eba < > (/usr/lib/scilab/libsciparallel.so)
6: 0x495e <sci_parallel_run> (/usr/lib/scilab/libsciparallel.so)
7: 0x21ba <gw_parallel> (/usr/lib/scilab/libsciparallel.so)
8: 0x1586a2 <callDynamicGateway> (/usr/lib/scilab/libscilab-cli.so.0)
9: 0x15d26b <gw_dynamic_generic> (/usr/lib/scilab/libscilab-cli.so.0)
10: 0x158af8 <callinterf_> (/usr/lib/scilab/libscilab-cli.so.0)
11: 0x16c266 <scirun_> (/usr/lib/scilab/libscilab-cli.so.0)
12: 0x1671aa <realmain> (/usr/lib/scilab/libscilab-cli.so.0)
13: 0x14d5 < > (/usr/bin/scilab-bin)
14: 0x20830 <__libc_start_main> (/lib/x86_64-linux-gnu/libc.so.6)
15: 0x1829 < > (/usr/bin/scilab-bin)
End of stack
!--error 999
Aborting current computation
"
I am lost... I can even "disp" the eig_values, but no luck in having them as output variables.I am doing something wrong?
Thanks a lot for any help! ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161220/fbf73f48/attachment.htm>
More information about the users
mailing list