From ycollet at freesurf.fr Fri May 1 10:02:39 2009 From: ycollet at freesurf.fr (Collette Yann) Date: Fri, 01 May 2009 10:02:39 +0200 Subject: Compilation pb under mandriva-2009.1 Message-ID: <49FAAC9F.5040804@freesurf.fr> Hello, Mandriva is shipped with tcl 8.6. There is a pb with the compilation of tclsci: I think a #else is missing. src/c/TCL_getErrorLine.c:16: attention : no previous prototype for ?TCL_getErrorLine? [-Wmissing-prototypes] src/c/TCL_getErrorLine.c: In function ?TCL_getErrorLine?: src/c/TCL_getErrorLine.c:33: erreur: ?Tcl_Interp? has no member named ?errorLine? make[2]: *** [libscitclsci_la-TCL_getErrorLine.lo] Erreur 1 make[2]: *** Attente des t?ches non termin?es.... YC From ycollette at free.fr Fri May 1 10:55:02 2009 From: ycollette at free.fr (Collette Yann) Date: Fri, 01 May 2009 10:55:02 +0200 Subject: pb with current master on linux Message-ID: <49FAB8E6.9080306@free.fr> Hello, When I do a make on the current master, the buildmacros.sce scripts are not launch anymore. So, all the .bin file are not build. Tested on master + mandriva 2009.1 - doesn't work Tested on 5.1 branch + mandriva 2009.1 - works YC From pierre.marechal at scilab.org Fri May 1 11:10:56 2009 From: pierre.marechal at scilab.org (Pierre MARECHAL) Date: Fri, 01 May 2009 11:10:56 +0200 Subject: [Scilab-Dev] pb with current master on linux In-Reply-To: <49FAB8E6.9080306@free.fr> References: <49FAB8E6.9080306@free.fr> Message-ID: <49FABCA0.4080903@scilab.org> Collette Yann a ?crit : > Hello, > > When I do a make on the current master, the buildmacros.sce scripts > are not launch anymore. > So, all the .bin file are not build. > Tested on master + mandriva 2009.1 - doesn't work > Tested on 5.1 branch + mandriva 2009.1 - works > > YC Hi Yann, Allan has fixed it with commit 41269367e31960ad8f3b6370ce28491f34d00214 Pierre -- ============================================== Pierre MARECHAL ------ Fondation DIGITEO - Consortium Scilab Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex B?timent 23 - Bureau 24 ------ Mailto : pierre.marechal at scilab.org T?l : +33 (0)1 39 63 56 81 Fax : +33 (0)1 39 63 55 94 ------ http://www.scilab.org http://www.digiteo.fr ============================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From vincent.lejeune at institutoptique.fr Sun May 3 22:42:21 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Sun, 3 May 2009 22:42:21 +0200 Subject: How use a custom library in a toolbox ? Message-ID: <541F8BC56BB94492A365B76C45E46EAB@VLJMAISON> Hello, I'd like to make a toolbox for Scilab with source that need to be compiled with nvcc , which is not considered as a common compiler (it makes asm code from cuda source). I made a .lib file containing precompiled functions I liked to use within the gateway part from the squeleton toolbox. That means, I add a #pragma comment(lib,"...") pointing to the .lib file, and the header containing the prototype of my functions. However, the automated script doesnt work, here is the output (in french sorry, only the end does matter anyway) : > Initialisation: > Chargement de l'environnement de travail > G?n?re un fichier loader > G?n?re un Makefile > Ex?cute le Makefile > Compilation de csum.c > Compilation de csub.c > Construction de la biblioth?que partag?e (soyez patient) > NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual > Studio 9.0\VC\bin\link.EXE"'?: code retour '0x450' > Stop. > !--error 10000 > unix_s: error during "nmake /Y /nologo /f Makelib.mak libcsum.dll" > execution > at line 34 of function unix_s called by : > line 50 of function ilib_compile called by : > line 34 of function ilib_for_link called by : > line 18 of function tbx_build_src called by : > _absolute_file_path('builder_c.sce')) > line 9 of exec file called by : > ktop/TOOLBO~1/src/c/BUILDE~1.SCE')); I'm under windows. It's seems that the linking is failling. How can I embed function inside a .lib in a gateway function ? I think it's possible, as other part of Scilab's source code contains code writed in fortran...But without the builder script. From allan.cornet at scilab.org Mon May 4 08:17:28 2009 From: allan.cornet at scilab.org (Allan CORNET) Date: Mon, 4 May 2009 08:17:28 +0200 Subject: [Scilab-Dev] How use a custom library in a toolbox ? In-Reply-To: <541F8BC56BB94492A365B76C45E46EAB@VLJMAISON> References: <541F8BC56BB94492A365B76C45E46EAB@VLJMAISON> Message-ID: <001701c9cc7f$fffa5ac0$ffef1040$@cornet@scilab.org> Hi, Please attach your makelib.mak You can do : exec builder.sce after that your script return a error , put in Scilab : unix start it will open a dos shell nmake /f makelib.mak What is the error message ? What is your .lib is a library import for a dll or a static library ? You can use external fortran dynamic library. We link blas ,lapack and others fortran libraries to Scilab. http://wiki.scilab.org/How_to_debug_an_external_source_code_linked_to_scilab _with_Visual_Studio Allan CORNET -----Message d'origine----- De?: Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] Envoy??: dimanche 3 mai 2009 22:42 ??: dev at lists.scilab.org Objet?: [Scilab-Dev] How use a custom library in a toolbox ? Hello, I'd like to make a toolbox for Scilab with source that need to be compiled with nvcc , which is not considered as a common compiler (it makes asm code from cuda source). I made a .lib file containing precompiled functions I liked to use within the gateway part from the squeleton toolbox. That means, I add a #pragma comment(lib,"...") pointing to the .lib file, and the header containing the prototype of my functions. However, the automated script doesnt work, here is the output (in french sorry, only the end does matter anyway) : > Initialisation: > Chargement de l'environnement de travail > G?n?re un fichier loader > G?n?re un Makefile > Ex?cute le Makefile > Compilation de csum.c > Compilation de csub.c > Construction de la biblioth?que partag?e (soyez patient) > NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual > Studio 9.0\VC\bin\link.EXE"'?: code retour '0x450' > Stop. > !--error 10000 > unix_s: error during "nmake /Y /nologo /f Makelib.mak libcsum.dll" > execution > at line 34 of function unix_s called by : > line 50 of function ilib_compile called by : > line 34 of function ilib_for_link called by : > line 18 of function tbx_build_src called by : > _absolute_file_path('builder_c.sce')) > line 9 of exec file called by : > ktop/TOOLBO~1/src/c/BUILDE~1.SCE')); I'm under windows. It's seems that the linking is failling. How can I embed function inside a .lib in a gateway function ? I think it's possible, as other part of Scilab's source code contains code writed in fortran...But without the builder script. From vincent.lejeune at institutoptique.fr Mon May 4 11:08:26 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Mon, 4 May 2009 11:08:26 +0200 Subject: [Scilab-Dev] How use a custom library in a toolbox ? In-Reply-To: <001701c9cc7f$fffa5ac0$ffef1040$@cornet@scilab.org> References: <541F8BC56BB94492A365B76C45E46EAB@VLJMAISON> <001701c9cc7f$fffa5ac0$ffef1040$@cornet@scilab.org> Message-ID: <7395B0D70861420FB6EDFEB5098C95A3@VLJMAISON> Hi here it is, and the log for the compilation. The linker doesnt find where to find my functions actually... My custom library is in a static .lib, I don't use .dll at the moment. (By the way, the link you gave me is broken). Thank for help, I am no compile process expert... -------------------------------------------------- From: "Allan CORNET" Sent: Monday, May 04, 2009 8:17 AM To: Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ? > Hi, > > Please attach your makelib.mak > > You can do : > > exec builder.sce > after that your script return a error , put in Scilab : > unix start > it will open a dos shell > nmake /f makelib.mak > > What is the error message ? > > What is your .lib is a library import for a dll or a static library ? > > You can use external fortran dynamic library. > We link blas ,lapack and others fortran libraries to Scilab. > > > http://wiki.scilab.org/How_to_debug_an_external_source_code_linked_to_scilab > _with_Visual_Studio > > Allan CORNET > > > > > > -----Message d'origine----- > De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] > Envoy? : dimanche 3 mai 2009 22:42 > ? : dev at lists.scilab.org > Objet : [Scilab-Dev] How use a custom library in a toolbox ? > > Hello, > > I'd like to make a toolbox for Scilab with source that need to be compiled > with nvcc , which is not considered as a common compiler (it makes asm > code > from cuda source). > I made a .lib file containing precompiled functions I liked to use within > the gateway part from the squeleton toolbox. That means, I add a #pragma > comment(lib,"...") pointing to the .lib file, and the header containing > the > prototype of my functions. However, the automated script doesnt work, here > is the output (in french sorry, only the end does matter anyway) : > >> Initialisation: >> Chargement de l'environnement de travail >> G?n?re un fichier loader >> G?n?re un Makefile >> Ex?cute le Makefile >> Compilation de csum.c >> Compilation de csub.c >> Construction de la biblioth?que partag?e (soyez patient) >> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual >> Studio 9.0\VC\bin\link.EXE"'?: code retour '0x450' >> Stop. >> !--error 10000 >> unix_s: error during "nmake /Y /nologo /f Makelib.mak libcsum.dll" >> execution >> at line 34 of function unix_s called by : >> line 50 of function ilib_compile called by : >> line 34 of function ilib_for_link called by : >> line 18 of function tbx_build_src called by : >> _absolute_file_path('builder_c.sce')) >> line 9 of exec file called by : >> ktop/TOOLBO~1/src/c/BUILDE~1.SCE')); > > I'm under windows. It's seems that the linking is failling. How can I > embed > function inside a .lib in a gateway function ? I think it's possible, as > other part of Scilab's source code contains code writed in fortran...But > without the builder script. > > > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Makelib.mak URL: From allan.cornet at scilab.org Mon May 4 11:37:49 2009 From: allan.cornet at scilab.org (Allan CORNET) Date: Mon, 4 May 2009 11:37:49 +0200 Subject: [Scilab-Dev] How use a custom library in a toolbox ? In-Reply-To: <7395B0D70861420FB6EDFEB5098C95A3@VLJMAISON> References: <541F8BC56BB94492A365B76C45E46EAB@VLJMAISON> <001701c9cc7f$fffa5ac0$ffef1040$@cornet@scilab.org> <7395B0D70861420FB6EDFEB5098C95A3@VLJMAISON> Message-ID: <002801c9cc9b$fd353690$f79fa3b0$@cornet@scilab.org> Hi, First, I advice to use dynamic library for your project it will be easier to debug and to support. >From my experience with VS #pragma('lib',libname) works better when 'libname' is a dynamic library than a static library. For example , your 'libname' can have some others external dependencies and you will need to force a link also on these libraries. A temp. workaround can be : tbx_build_gateway('skeleton_c', ['c_sum','sci_csum';'c_sub','sci_csub'], ['sci_csum.c','sci_csub.c'], .. get_absolute_file_path('builder_gateway_c.sce'), .. ['../../src/c/libcsum','libname']); Where 'libname' is the pathname of your library. I suspect that your path in #pragma is wrong or that your library does not export "_GPU_lu" symbol. What is built options of your static library ? (http://msdn.microsoft.com/fr-fr/library/2kzt1wy3.aspx) Can you send me your .lib ? Allan -----Message d'origine----- De?: Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] Envoy??: lundi 4 mai 2009 11:08 ??: dev at lists.scilab.org Objet?: Re: [Scilab-Dev] How use a custom library in a toolbox ? Hi here it is, and the log for the compilation. The linker doesnt find where to find my functions actually... My custom library is in a static .lib, I don't use .dll at the moment. (By the way, the link you gave me is broken). Thank for help, I am no compile process expert... -------------------------------------------------- From: "Allan CORNET" Sent: Monday, May 04, 2009 8:17 AM To: Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ? > Hi, > > Please attach your makelib.mak > > You can do : > > exec builder.sce > after that your script return a error , put in Scilab : > unix start > it will open a dos shell > nmake /f makelib.mak > > What is the error message ? > > What is your .lib is a library import for a dll or a static library ? > > You can use external fortran dynamic library. > We link blas ,lapack and others fortran libraries to Scilab. > > > http://wiki.scilab.org/How_to_debug_an_external_source_code_linked_to_ > scilab > _with_Visual_Studio > > Allan CORNET > > > > > > -----Message d'origine----- > De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] > Envoy? : dimanche 3 mai 2009 22:42 > ? : dev at lists.scilab.org > Objet : [Scilab-Dev] How use a custom library in a toolbox ? > > Hello, > > I'd like to make a toolbox for Scilab with source that need to be > compiled with nvcc , which is not considered as a common compiler (it > makes asm code from cuda source). > I made a .lib file containing precompiled functions I liked to use > within the gateway part from the squeleton toolbox. That means, I add > a #pragma > comment(lib,"...") pointing to the .lib file, and the header > containing the prototype of my functions. However, the automated > script doesnt work, here is the output (in french sorry, only the end > does matter anyway) : > >> Initialisation: >> Chargement de l'environnement de travail >> G?n?re un fichier loader >> G?n?re un Makefile >> Ex?cute le Makefile >> Compilation de csum.c >> Compilation de csub.c >> Construction de la biblioth?que partag?e (soyez patient) >> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual >> Studio 9.0\VC\bin\link.EXE"'?: code retour '0x450' >> Stop. >> !--error 10000 >> unix_s: error during "nmake /Y /nologo /f Makelib.mak libcsum.dll" >> execution >> at line 34 of function unix_s called by : >> line 50 of function ilib_compile called by : >> line 34 of function ilib_for_link called by : >> line 18 of function tbx_build_src called by : >> _absolute_file_path('builder_c.sce')) >> line 9 of exec file called by : >> ktop/TOOLBO~1/src/c/BUILDE~1.SCE')); > > I'm under windows. It's seems that the linking is failling. How can I > embed function inside a .lib in a gateway function ? I think it's > possible, as other part of Scilab's source code contains code writed > in fortran...But without the builder script. > > > > From vincent.lejeune at institutoptique.fr Mon May 4 19:49:47 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Mon, 4 May 2009 19:49:47 +0200 Subject: [Scilab-Dev] How use a custom library in a toolbox ? In-Reply-To: <002801c9cc9b$fd353690$f79fa3b0$@cornet@scilab.org> References: <541F8BC56BB94492A365B76C45E46EAB@VLJMAISON> <001701c9cc7f$fffa5ac0$ffef1040$@cornet@scilab.org> <7395B0D70861420FB6EDFEB5098C95A3@VLJMAISON> <002801c9cc9b$fd353690$f79fa3b0$@cornet@scilab.org> Message-ID: <2E4B853D80534D17806EE1B48D8250B4@VLJMAISON> I've switched to a dll library as adviced, but it didnt solve my problem. The error is the same, MSVC cannot find the external link to my function... Here is attached the .lib and the .dll. -------------------------------------------------- From: "Allan CORNET" Sent: Monday, May 04, 2009 11:37 AM To: Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ? > Hi, > > First, I advice to use dynamic library for your project it will be easier > to > debug and to support. > > From my experience with VS #pragma('lib',libname) works better when > 'libname' is a dynamic library than a static library. > For example , your 'libname' can have some others external dependencies > and > you will need to force a link also on these libraries. > > A temp. workaround can be : > > tbx_build_gateway('skeleton_c', ['c_sum','sci_csum';'c_sub','sci_csub'], > ['sci_csum.c','sci_csub.c'], .. > get_absolute_file_path('builder_gateway_c.sce'), .. > ['../../src/c/libcsum','libname']); > > Where 'libname' is the pathname of your library. > > I suspect that your path in #pragma is wrong or that your library does not > export "_GPU_lu" symbol. > > What is built options of your static library ? > (http://msdn.microsoft.com/fr-fr/library/2kzt1wy3.aspx) > > Can you send me your .lib ? > > > Allan > > -----Message d'origine----- > De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] > Envoy? : lundi 4 mai 2009 11:08 > ? : dev at lists.scilab.org > Objet : Re: [Scilab-Dev] How use a custom library in a toolbox ? > > Hi > here it is, and the log for the compilation. > The linker doesnt find where to find my functions actually... > > My custom library is in a static .lib, I don't use .dll at the moment. > (By the way, the link you gave me is broken). > > Thank for help, I am no compile process expert... > > > -------------------------------------------------- > From: "Allan CORNET" > Sent: Monday, May 04, 2009 8:17 AM > To: > Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ? > >> Hi, >> >> Please attach your makelib.mak >> >> You can do : >> >> exec builder.sce >> after that your script return a error , put in Scilab : >> unix start >> it will open a dos shell >> nmake /f makelib.mak >> >> What is the error message ? >> >> What is your .lib is a library import for a dll or a static library ? >> >> You can use external fortran dynamic library. >> We link blas ,lapack and others fortran libraries to Scilab. >> >> >> http://wiki.scilab.org/How_to_debug_an_external_source_code_linked_to_ >> scilab >> _with_Visual_Studio >> >> Allan CORNET >> >> >> >> >> >> -----Message d'origine----- >> De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] >> Envoy? : dimanche 3 mai 2009 22:42 >> ? : dev at lists.scilab.org >> Objet : [Scilab-Dev] How use a custom library in a toolbox ? >> >> Hello, >> >> I'd like to make a toolbox for Scilab with source that need to be >> compiled with nvcc , which is not considered as a common compiler (it >> makes asm code from cuda source). >> I made a .lib file containing precompiled functions I liked to use >> within the gateway part from the squeleton toolbox. That means, I add >> a #pragma >> comment(lib,"...") pointing to the .lib file, and the header >> containing the prototype of my functions. However, the automated >> script doesnt work, here is the output (in french sorry, only the end >> does matter anyway) : >> >>> Initialisation: >>> Chargement de l'environnement de travail >>> G?n?re un fichier loader >>> G?n?re un Makefile >>> Ex?cute le Makefile >>> Compilation de csum.c >>> Compilation de csub.c >>> Construction de la biblioth?que partag?e (soyez patient) >>> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual >>> Studio 9.0\VC\bin\link.EXE"'?: code retour '0x450' >>> Stop. >>> !--error 10000 >>> unix_s: error during "nmake /Y /nologo /f Makelib.mak libcsum.dll" >>> execution >>> at line 34 of function unix_s called by : >>> line 50 of function ilib_compile called by : >>> line 34 of function ilib_for_link called by : >>> line 18 of function tbx_build_src called by : >>> _absolute_file_path('builder_c.sce')) >>> line 9 of exec file called by : >>> ktop/TOOLBO~1/src/c/BUILDE~1.SCE')); >> >> I'm under windows. It's seems that the linking is failling. How can I >> embed function inside a .lib in a gateway function ? I think it's >> possible, as other part of Scilab's source code contains code writed >> in fortran...But without the builder script. >> >> >> >> > > -------------- next part -------------- A non-text attachment was scrubbed... Name: LU.zip Type: application/x-zip-compressed Size: 120195 bytes Desc: not available URL: From ycollet at freesurf.fr Mon May 4 21:36:43 2009 From: ycollet at freesurf.fr (Collette Yann) Date: Mon, 04 May 2009 21:36:43 +0200 Subject: [Scilab-Dev] How use a custom library in a toolbox ? In-Reply-To: <2E4B853D80534D17806EE1B48D8250B4@VLJMAISON> References: <541F8BC56BB94492A365B76C45E46EAB@VLJMAISON> <001701c9cc7f$fffa5ac0$ffef1040$@cornet@scilab.org> <7395B0D70861420FB6EDFEB5098C95A3@VLJMAISON> <002801c9cc9b$fd353690$f79fa3b0$@cornet@scilab.org> <2E4B853D80534D17806EE1B48D8250B4@VLJMAISON> Message-ID: <49FF43CB.9070406@freesurf.fr> Just a stupid suggestion: do you have tested with scilab-5.1.1 and not scilab master ? I had a problem with a toolbox. In this toolbox, I have a gateway and a source directory -> 2 libraries (2 dlls in fact) with 5.1.1, everything compiles fine, but with scilab master, it wasn't able to find one of the dll. YC Vincent Lejeune a ?crit : > I've switched to a dll library as adviced, but it didnt solve my > problem. The error is the same, MSVC cannot find the external link to > my function... > Here is attached the .lib and the .dll. > > -------------------------------------------------- > From: "Allan CORNET" > Sent: Monday, May 04, 2009 11:37 AM > To: > Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ? > >> Hi, >> >> First, I advice to use dynamic library for your project it will be >> easier to >> debug and to support. >> >> From my experience with VS #pragma('lib',libname) works better when >> 'libname' is a dynamic library than a static library. >> For example , your 'libname' can have some others external >> dependencies and >> you will need to force a link also on these libraries. >> >> A temp. workaround can be : >> >> tbx_build_gateway('skeleton_c', ['c_sum','sci_csum';'c_sub','sci_csub'], >> ['sci_csum.c','sci_csub.c'], .. >> get_absolute_file_path('builder_gateway_c.sce'), .. >> ['../../src/c/libcsum','libname']); >> >> Where 'libname' is the pathname of your library. >> >> I suspect that your path in #pragma is wrong or that your library >> does not >> export "_GPU_lu" symbol. >> >> What is built options of your static library ? >> (http://msdn.microsoft.com/fr-fr/library/2kzt1wy3.aspx) >> >> Can you send me your .lib ? >> >> >> Allan >> >> -----Message d'origine----- >> De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] >> Envoy? : lundi 4 mai 2009 11:08 >> ? : dev at lists.scilab.org >> Objet : Re: [Scilab-Dev] How use a custom library in a toolbox ? >> >> Hi >> here it is, and the log for the compilation. >> The linker doesnt find where to find my functions actually... >> >> My custom library is in a static .lib, I don't use .dll at the moment. >> (By the way, the link you gave me is broken). >> >> Thank for help, I am no compile process expert... >> >> >> -------------------------------------------------- >> From: "Allan CORNET" >> Sent: Monday, May 04, 2009 8:17 AM >> To: >> Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ? >> >>> Hi, >>> >>> Please attach your makelib.mak >>> >>> You can do : >>> >>> exec builder.sce >>> after that your script return a error , put in Scilab : >>> unix start >>> it will open a dos shell >>> nmake /f makelib.mak >>> >>> What is the error message ? >>> >>> What is your .lib is a library import for a dll or a static library ? >>> >>> You can use external fortran dynamic library. >>> We link blas ,lapack and others fortran libraries to Scilab. >>> >>> >>> http://wiki.scilab.org/How_to_debug_an_external_source_code_linked_to_ >>> scilab >>> _with_Visual_Studio >>> >>> Allan CORNET >>> >>> >>> >>> >>> >>> -----Message d'origine----- >>> De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] >>> Envoy? : dimanche 3 mai 2009 22:42 >>> ? : dev at lists.scilab.org >>> Objet : [Scilab-Dev] How use a custom library in a toolbox ? >>> >>> Hello, >>> >>> I'd like to make a toolbox for Scilab with source that need to be >>> compiled with nvcc , which is not considered as a common compiler (it >>> makes asm code from cuda source). >>> I made a .lib file containing precompiled functions I liked to use >>> within the gateway part from the squeleton toolbox. That means, I add >>> a #pragma >>> comment(lib,"...") pointing to the .lib file, and the header >>> containing the prototype of my functions. However, the automated >>> script doesnt work, here is the output (in french sorry, only the end >>> does matter anyway) : >>> >>>> Initialisation: >>>> Chargement de l'environnement de travail >>>> G?n?re un fichier loader >>>> G?n?re un Makefile >>>> Ex?cute le Makefile >>>> Compilation de csum.c >>>> Compilation de csub.c >>>> Construction de la biblioth?que partag?e (soyez patient) >>>> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual >>>> Studio 9.0\VC\bin\link.EXE"'?: code retour '0x450' >>>> Stop. >>>> !--error 10000 >>>> unix_s: error during "nmake /Y /nologo /f Makelib.mak libcsum.dll" >>>> execution >>>> at line 34 of function unix_s called by : >>>> line 50 of function ilib_compile called by : >>>> line 34 of function ilib_for_link called by : >>>> line 18 of function tbx_build_src called by : >>>> _absolute_file_path('builder_c.sce')) >>>> line 9 of exec file called by : >>>> ktop/TOOLBO~1/src/c/BUILDE~1.SCE')); >>> >>> I'm under windows. It's seems that the linking is failling. How can I >>> embed function inside a .lib in a gateway function ? I think it's >>> possible, as other part of Scilab's source code contains code writed >>> in fortran...But without the builder script. >>> >>> >>> >>> >> >> From vincent.lejeune at institutoptique.fr Mon May 4 22:53:58 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Mon, 4 May 2009 22:53:58 +0200 Subject: [Scilab-Dev] How use a custom library in a toolbox ? In-Reply-To: <49FF43CB.9070406@freesurf.fr> References: <541F8BC56BB94492A365B76C45E46EAB@VLJMAISON> <001701c9cc7f$fffa5ac0$ffef1040$@cornet@scilab.org> <7395B0D70861420FB6EDFEB5098C95A3@VLJMAISON> <002801c9cc9b$fd353690$f79fa3b0$@cornet@scilab.org> <2E4B853D80534D17806EE1B48D8250B4@VLJMAISON> <49FF43CB.9070406@freesurf.fr> Message-ID: I used scilab-5.1.1. I've solved the issue : in fact, I was trying to export function from C++ code, and to import it into a C gateway. The problem was, I forgot to write "extern "C" " around my function declaration, inside the custom library and the gateway. Now the compile process work fine. Sorry for the inconvenience. -------------------------------------------------- From: "Collette Yann" Sent: Monday, May 04, 2009 9:36 PM To: Subject: Re: [Scilab-Dev] How use a custom library in a toolbox ? > Just a stupid suggestion: do you have tested with scilab-5.1.1 and not > scilab master ? > I had a problem with a toolbox. In this toolbox, I have a gateway and a > source directory -> 2 libraries (2 dlls in fact) > with 5.1.1, everything compiles fine, but with scilab master, it wasn't > able to find one of the dll. > > YC > > Vincent Lejeune a ?crit : >> I've switched to a dll library as adviced, but it didnt solve my problem. >> The error is the same, MSVC cannot find the external link to my >> function... >> Here is attached the .lib and the .dll. >> >> -------------------------------------------------- >> From: "Allan CORNET" >> Sent: Monday, May 04, 2009 11:37 AM >> To: >> Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ? >> >>> Hi, >>> >>> First, I advice to use dynamic library for your project it will be >>> easier to >>> debug and to support. >>> >>> From my experience with VS #pragma('lib',libname) works better when >>> 'libname' is a dynamic library than a static library. >>> For example , your 'libname' can have some others external dependencies >>> and >>> you will need to force a link also on these libraries. >>> >>> A temp. workaround can be : >>> >>> tbx_build_gateway('skeleton_c', ['c_sum','sci_csum';'c_sub','sci_csub'], >>> ['sci_csum.c','sci_csub.c'], .. >>> get_absolute_file_path('builder_gateway_c.sce'), .. >>> ['../../src/c/libcsum','libname']); >>> >>> Where 'libname' is the pathname of your library. >>> >>> I suspect that your path in #pragma is wrong or that your library does >>> not >>> export "_GPU_lu" symbol. >>> >>> What is built options of your static library ? >>> (http://msdn.microsoft.com/fr-fr/library/2kzt1wy3.aspx) >>> >>> Can you send me your .lib ? >>> >>> >>> Allan >>> >>> -----Message d'origine----- >>> De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] >>> Envoy? : lundi 4 mai 2009 11:08 >>> ? : dev at lists.scilab.org >>> Objet : Re: [Scilab-Dev] How use a custom library in a toolbox ? >>> >>> Hi >>> here it is, and the log for the compilation. >>> The linker doesnt find where to find my functions actually... >>> >>> My custom library is in a static .lib, I don't use .dll at the moment. >>> (By the way, the link you gave me is broken). >>> >>> Thank for help, I am no compile process expert... >>> >>> >>> -------------------------------------------------- >>> From: "Allan CORNET" >>> Sent: Monday, May 04, 2009 8:17 AM >>> To: >>> Subject: RE: [Scilab-Dev] How use a custom library in a toolbox ? >>> >>>> Hi, >>>> >>>> Please attach your makelib.mak >>>> >>>> You can do : >>>> >>>> exec builder.sce >>>> after that your script return a error , put in Scilab : >>>> unix start >>>> it will open a dos shell >>>> nmake /f makelib.mak >>>> >>>> What is the error message ? >>>> >>>> What is your .lib is a library import for a dll or a static library ? >>>> >>>> You can use external fortran dynamic library. >>>> We link blas ,lapack and others fortran libraries to Scilab. >>>> >>>> >>>> http://wiki.scilab.org/How_to_debug_an_external_source_code_linked_to_ >>>> scilab >>>> _with_Visual_Studio >>>> >>>> Allan CORNET >>>> >>>> >>>> >>>> >>>> >>>> -----Message d'origine----- >>>> De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] >>>> Envoy? : dimanche 3 mai 2009 22:42 >>>> ? : dev at lists.scilab.org >>>> Objet : [Scilab-Dev] How use a custom library in a toolbox ? >>>> >>>> Hello, >>>> >>>> I'd like to make a toolbox for Scilab with source that need to be >>>> compiled with nvcc , which is not considered as a common compiler (it >>>> makes asm code from cuda source). >>>> I made a .lib file containing precompiled functions I liked to use >>>> within the gateway part from the squeleton toolbox. That means, I add >>>> a #pragma >>>> comment(lib,"...") pointing to the .lib file, and the header >>>> containing the prototype of my functions. However, the automated >>>> script doesnt work, here is the output (in french sorry, only the end >>>> does matter anyway) : >>>> >>>>> Initialisation: >>>>> Chargement de l'environnement de travail >>>>> G?n?re un fichier loader >>>>> G?n?re un Makefile >>>>> Ex?cute le Makefile >>>>> Compilation de csum.c >>>>> Compilation de csub.c >>>>> Construction de la biblioth?que partag?e (soyez patient) >>>>> NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual >>>>> Studio 9.0\VC\bin\link.EXE"'?: code retour '0x450' >>>>> Stop. >>>>> !--error 10000 >>>>> unix_s: error during "nmake /Y /nologo /f Makelib.mak libcsum.dll" >>>>> execution >>>>> at line 34 of function unix_s called by : >>>>> line 50 of function ilib_compile called by : >>>>> line 34 of function ilib_for_link called by : >>>>> line 18 of function tbx_build_src called by : >>>>> _absolute_file_path('builder_c.sce')) >>>>> line 9 of exec file called by : >>>>> ktop/TOOLBO~1/src/c/BUILDE~1.SCE')); >>>> >>>> I'm under windows. It's seems that the linking is failling. How can I >>>> embed function inside a .lib in a gateway function ? I think it's >>>> possible, as other part of Scilab's source code contains code writed >>>> in fortran...But without the builder script. >>>> >>>> >>>> >>>> >>> >>> > > From ycollet at freesurf.fr Tue May 5 12:06:59 2009 From: ycollet at freesurf.fr (ycollet at freesurf.fr) Date: Tue, 5 May 2009 12:06:59 +0200 (CEST) Subject: use basout in fortran program Message-ID: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> Hello, I have a question about using basout in fortran program In a code, I replaced all the write(6,...) by write(bufstr,751)niter call basout(io ,lp ,bufstr(1:lnblnk(bufstr))) Do I need to add something else in the program like external ... or include ... for the compilation ? Because, now, it compiles fine, but once I started the program, everything hangs. Before these changes, everything works fine. YC From ycollet at freesurf.fr Tue May 5 13:20:30 2009 From: ycollet at freesurf.fr (ycollet at freesurf.fr) Date: Tue, 5 May 2009 13:20:30 +0200 (CEST) Subject: [Scilab-Dev] use basout in fortran program In-Reply-To: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> References: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> Message-ID: This ugly hack doesn't work neither: INCLUDE 'stack.h' CHARACTER BUFSTR*(4096) io = wte lp = wte .... write(bufstr,751)niter call basout(io ,lp ,bufstr(1:lnblnk(bufstr))) Still hangs. Certainly related to the initialization of io and lp. YC From ycollet at freesurf.fr Tue May 5 16:21:20 2009 From: ycollet at freesurf.fr (ycollet at freesurf.fr) Date: Tue, 5 May 2009 16:21:20 +0200 (CEST) Subject: [Scilab-Dev] use basout in fortran program In-Reply-To: References: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> Message-ID: <1b2f921fb14eef53f142450eb73f6019.squirrel@wmail.freesurf.fr> I included a small test in my fortran code: WRITE(6,666) IO WRITE(6,666) WTE 666 FORMAT (5X,'PARAM =',I5) And, when I launch the good scilab command, it hangs at WRITE(6,666) WTE The WTE variable is defined in the stack.h iop common. It seems that I can't access wte ? This is certainly a link problem. How do I link to the iop.wte common variable ? YC From ycollet at freesurf.fr Tue May 5 18:23:49 2009 From: ycollet at freesurf.fr (Collette Yann) Date: Tue, 05 May 2009 18:23:49 +0200 Subject: pb with current master Message-ID: <4A006815.9060008@freesurf.fr> Hello, Since today, there is an problem during initialization of the console: Initialisation: Chargement de l'environnement de travail !--error 36 Mauvais premier argument. at line 16 of function toolboxes called by : toolboxes(SCI+'/contrib'); line 2 of exec file called by : exec(SCI+'/contrib/loader.sce'); line 137 of exec file called by : exec('SCI/etc/scilab.start',-1);; Scilab doesn't hangs and is still useable (all the menus are grayed ...) YC From vincent.lejeune at institutoptique.fr Tue May 5 20:04:39 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Tue, 5 May 2009 20:04:39 +0200 Subject: DLL loading not working Message-ID: Hi, I have another problem in trying to set up my own toolbox in SciLab... I use a .dll custom library, with its .lib import module. The compile process work fine. However, the loader cannot load the dll. It tells me that the .dll file doesnt exist, but in fact this is not true : if the body of the function in the .dll is removed, there is no more problem. I have no clue of the source of the issue, and I don't know how to get a full-details outpot from linking in SciLab. I've attached the files causing me trouble, it's from the sci_gateway\c directory of the skeleton toolbox (Scilab 5.1.1). Thx for the help. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: c.zip Type: application/x-zip-compressed Size: 159171 bytes Desc: not available URL: From sylvestre.ledru at inria.fr Tue May 5 21:41:57 2009 From: sylvestre.ledru at inria.fr (Sylvestre Ledru) Date: Tue, 05 May 2009 21:41:57 +0200 Subject: [Scilab-Dev] use basout in fortran program In-Reply-To: <1b2f921fb14eef53f142450eb73f6019.squirrel@wmail.freesurf.fr> References: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> <1b2f921fb14eef53f142450eb73f6019.squirrel@wmail.freesurf.fr> Message-ID: <1241552517.23629.38.camel@zlarin> Le mardi 05 mai 2009 ? 16:21 +0200, ycollet at freesurf.fr a ?crit : > I included a small test in my fortran code: > > WRITE(6,666) IO > WRITE(6,666) WTE > > 666 FORMAT (5X,'PARAM =',I5) > > And, when I launch the good scilab command, it hangs at WRITE(6,666) WTE > The WTE variable is defined in the stack.h iop common. > It seems that I can't access wte ? > This is certainly a link problem. How do I link to the iop.wte common > variable ? Nice monologue Yann ;) My best friend when I have to write some fortran is grep and then copy/paste! :p Sylvestre From ycollet at freesurf.fr Tue May 5 22:03:58 2009 From: ycollet at freesurf.fr (Collette Yann) Date: Tue, 05 May 2009 22:03:58 +0200 Subject: [Scilab-Dev] use basout in fortran program In-Reply-To: <1241552517.23629.38.camel@zlarin> References: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> <1b2f921fb14eef53f142450eb73f6019.squirrel@wmail.freesurf.fr> <1241552517.23629.38.camel@zlarin> Message-ID: <4A009BAE.4060001@freesurf.fr> Yes, BUT: I found some code in n1q1.f which shows how to use basout, include 'stack.h' in the right place (just after the keywork SUBROUTINE) add a CHARACTER BUFFER*(4096) + INTEGER IO replace the WRITE(6,950) by WRITE(BUFFER,950) and just after this, call BASOUT (I hate upper case fortran) CALL BASOUT(IO,WTE,BUFFER(1:LNKBLK(BUFFER)) I have digged into basout and saw that IO is initialized after the first call (if IO = 0) But I don't know how to get WTE. I think the problem come from here. YC And it doesn't work. Sylvestre Ledru a ?crit : > Le mardi 05 mai 2009 ? 16:21 +0200, ycollet at freesurf.fr a ?crit : > >> I included a small test in my fortran code: >> >> WRITE(6,666) IO >> WRITE(6,666) WTE >> >> 666 FORMAT (5X,'PARAM =',I5) >> >> And, when I launch the good scilab command, it hangs at WRITE(6,666) WTE >> The WTE variable is defined in the stack.h iop common. >> It seems that I can't access wte ? >> This is certainly a link problem. How do I link to the iop.wte common >> variable ? >> > Nice monologue Yann ;) > > My best friend when I have to write some fortran is grep and then > copy/paste! :p > > Sylvestre > > > > > From wangxu45 at hotmail.com Wed May 6 07:44:22 2009 From: wangxu45 at hotmail.com (SERAPHiM) Date: Wed, 6 May 2009 13:44:22 +0800 Subject: Questions about topics on the Ideas to develop Message-ID: Dear SciLab Development team: I am a student from Xiamen University, China. I and some of my classmates are interested in the annual SciLab contest. We are searching for the development directions and we found http://wiki.scilab.org/Ideas_of_development_for_Scilab. Many topics in this page interest us, but we couldn't figure out the developing state of the projects below. We want to know whether these topics were already distributed to other developers, because each topic seems already charged by someone. If we decide to develop one of the topics, should we contact him and cooperate with his team? And what else we need to do. Look forward to your reply. Thank you. David -------------- next part -------------- An HTML attachment was scrubbed... URL: From allan.cornet at scilab.org Wed May 6 08:14:37 2009 From: allan.cornet at scilab.org (Allan CORNET) Date: Wed, 6 May 2009 08:14:37 +0200 Subject: [Scilab-Dev] DLL loading not working In-Reply-To: References: Message-ID: <000f01c9ce11$ef40ff70$cdc2fe50$@cornet@scilab.org> Hi, If the link fails , it is may be because some dependencies on LU.dll are not resolved. dumpbin /imports lu.dll lu.dll requires cudart.dll and cutil32D.dll. Where are these files ? If you want that i help you I need to have the full toolbox and not only a part ;) It will be easier to debug and build. Allan De : Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] Envoy? : mardi 5 mai 2009 20:05 ? : dev at lists.scilab.org Objet : [Scilab-Dev] DLL loading not working Hi, I have another problem in trying to set up my own toolbox in SciLab... I use a .dll custom library, with its .lib import module. The compile process work fine. However, the loader cannot load the dll. It tells me that the .dll file doesnt exist, but in fact this is not true : if the body of the function in the .dll is removed, there is no more problem. I have no clue of the source of the issue, and I don't know how to get a full-details outpot from linking in SciLab. I've attached the files causing me trouble, it's from the sci_gateway\c directory of the skeleton toolbox (Scilab 5.1.1). Thx for the help. -------------- next part -------------- An HTML attachment was scrubbed... URL: From allan.cornet at scilab.org Wed May 6 08:16:36 2009 From: allan.cornet at scilab.org (Allan CORNET) Date: Wed, 6 May 2009 08:16:36 +0200 Subject: [Scilab-Dev] pb with current master In-Reply-To: <4A006815.9060008@freesurf.fr> References: <4A006815.9060008@freesurf.fr> Message-ID: <001401c9ce12$35ebd170$a1c37450$@cornet@scilab.org> Hi, make clean-macros make macros I think that it will solve your problem ;) Allan -----Message d'origine----- De?: Collette Yann [mailto:ycollet at freesurf.fr] Envoy??: mardi 5 mai 2009 18:24 ??: dev at lists.scilab.org Objet?: [Scilab-Dev] pb with current master Hello, Since today, there is an problem during initialization of the console: Initialisation: Chargement de l'environnement de travail !--error 36 Mauvais premier argument. at line 16 of function toolboxes called by : toolboxes(SCI+'/contrib'); line 2 of exec file called by : exec(SCI+'/contrib/loader.sce'); line 137 of exec file called by : exec('SCI/etc/scilab.start',-1);; Scilab doesn't hangs and is still useable (all the menus are grayed ...) YC From ycollet at freesurf.fr Wed May 6 08:26:48 2009 From: ycollet at freesurf.fr (ycollet at freesurf.fr) Date: Wed, 6 May 2009 08:26:48 +0200 (CEST) Subject: [Scilab-Dev] pb with current master In-Reply-To: <001401c9ce12$35ebd170$a1c37450$@cornet@scilab.org> References: <4A006815.9060008@freesurf.fr> <001401c9ce12$35ebd170$a1c37450$@cornet@scilab.org> Message-ID: <147279712193fc12157609325d1dd78b.squirrel@wmail.freesurf.fr> OK, thanks I will try this ... YC > Hi, > > make clean-macros > make macros > > I think that it will solve your problem ;) > > > Allan > > -----Message d'origine----- > De?: Collette Yann [mailto:ycollet at freesurf.fr] > Envoy??: mardi 5 mai 2009 18:24 > ??: dev at lists.scilab.org > Objet?: [Scilab-Dev] pb with current master > > Hello, > > Since today, there is an problem during initialization of the console: > > Initialisation: > Chargement de l'environnement de travail > !--error 36 > Mauvais premier argument. > > at line 16 of function toolboxes called by : > toolboxes(SCI+'/contrib'); > line 2 of exec file called by : > exec(SCI+'/contrib/loader.sce'); > line 137 of exec file called by : > exec('SCI/etc/scilab.start',-1);; > > > Scilab doesn't hangs and is still useable (all the menus are grayed ...) > > YC > > From allan.cornet at scilab.org Wed May 6 08:27:06 2009 From: allan.cornet at scilab.org (Allan CORNET) Date: Wed, 6 May 2009 08:27:06 +0200 Subject: [Scilab-Dev] use basout in fortran program In-Reply-To: <1b2f921fb14eef53f142450eb73f6019.squirrel@wmail.freesurf.fr> References: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> <1b2f921fb14eef53f142450eb73f6019.squirrel@wmail.freesurf.fr> Message-ID: <002001c9ce13$adaaeb50$0900c1f0$@cornet@scilab.org> Hi, How do you build your fortran code ? With scilab ilib_for_link function or a separate makefile ? Windows or linux ? Fortran code built with intel fortran or f2c ? iop_ symbol is exported. If you want to use iop from fortran, you need to include "stack.h" Allan -----Message d'origine----- De?: ycollet at freesurf.fr [mailto:ycollet at freesurf.fr] Envoy??: mardi 5 mai 2009 16:21 ??: dev at lists.scilab.org Objet?: Re: [Scilab-Dev] use basout in fortran program I included a small test in my fortran code: WRITE(6,666) IO WRITE(6,666) WTE 666 FORMAT (5X,'PARAM =',I5) And, when I launch the good scilab command, it hangs at WRITE(6,666) WTE The WTE variable is defined in the stack.h iop common. It seems that I can't access wte ? This is certainly a link problem. How do I link to the iop.wte common variable ? YC From ycollet at freesurf.fr Wed May 6 08:49:40 2009 From: ycollet at freesurf.fr (ycollet at freesurf.fr) Date: Wed, 6 May 2009 08:49:40 +0200 (CEST) Subject: [Scilab-Dev] use basout in fortran program In-Reply-To: <002001c9ce13$adaaeb50$0900c1f0$@cornet@scilab.org> References: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> <1b2f921fb14eef53f142450eb73f6019.squirrel@wmail.freesurf.fr> <002001c9ce13$adaaeb50$0900c1f0$@cornet@scilab.org> Message-ID: <84fde30b3a5e59964fa21ec927d2f178.squirrel@wmail.freesurf.fr> Hello, I use first f2c to convert my code to c Then, I use ilib_for_link. Under windows. The include "stack.h" is here, just after the SUBROUTINE keyword. Everything works fine without the call basout (with write(6,...)) But once I add the call basout, scilab hangs. I think the character buffer is large enough to handle the formated strings. The other difference I see wrt the fortran code in the optimization toolbox is the shape of the format: 720 FORMAT (/5X,25HTHREE-POINT INTERPOLATION) there is no quote. Is this needed ? Maybe to produce some kind of 0 terminated strings ? YC > Hi, > > How do you build your fortran code ? > > With scilab ilib_for_link function or a separate makefile ? > Windows or linux ? > > Fortran code built with intel fortran or f2c ? > > iop_ symbol is exported. > > If you want to use iop from fortran, you need to include "stack.h" > > Allan > > > -----Message d'origine----- > De?: ycollet at freesurf.fr [mailto:ycollet at freesurf.fr] > Envoy??: mardi 5 mai 2009 16:21 > ??: dev at lists.scilab.org > Objet?: Re: [Scilab-Dev] use basout in fortran program > > I included a small test in my fortran code: > > WRITE(6,666) IO > WRITE(6,666) WTE > > 666 FORMAT (5X,'PARAM =',I5) > > And, when I launch the good scilab command, it hangs at WRITE(6,666) WTE > The WTE variable is defined in the stack.h iop common. > It seems that I can't access wte ? > This is certainly a link problem. How do I link to the iop.wte common > variable ? > > YC > > > > > From sylvestre.ledru at scilab.org Wed May 6 09:52:29 2009 From: sylvestre.ledru at scilab.org (Sylvestre Ledru) Date: Wed, 06 May 2009 09:52:29 +0200 Subject: [Scilab-Dev] Questions about topics on the Ideas to develop In-Reply-To: References: Message-ID: <1241596349.11877.47482.camel@korcula.inria.fr> Hello David, Le mercredi 06 mai 2009 ? 13:44 +0800, SERAPHiM a ?crit : > Dear SciLab Development team: > I am a student from Xiamen University, China. I and some of my > classmates are interested in the annual SciLab contest. Thanks for contacting us. We appreciate that! > We are searching for the development directions and we found > http://wiki.scilab.org/Ideas_of_development_for_Scilab. Many topics in > this page interest us, but we couldn't figure out the developing state > of the projects below. Some projects are on going within the Google Summer of Code 2009 [1]. However, most of the projects on the list of ideas haven't been started and if some progress have been made, we try to update the detailed page of the project with the intels that we have. Don't hesitate to update this list if you think that some ideas are missing. I just updated the list of ideas. I moved the gsoc projects into a dedicated area at the bottom of this page. Please ask if you need more information. Sylvestre [1] http://wiki.scilab.org/GSOC2009 From pierre.marechal at scilab.org Wed May 6 10:55:30 2009 From: pierre.marechal at scilab.org (Pierre MARECHAL) Date: Wed, 06 May 2009 10:55:30 +0200 Subject: SEP 26 : strsplit(), add the capability to split a string on a pattern. Message-ID: <4A015082.9020502@scilab.org> Hi all, Please find attached SEP #26 (V1.0) about strsplit(). This SEP proposes to add the capability to split a string on a single character, a group of characters or a regular expression (a pattern). As usual, please comment it as needed. Pierre -- ============================================== Pierre MARECHAL ------ Fondation DIGITEO - Consortium Scilab Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex B?timent 23 - Bureau 24 ------ Email : pierre.marechal at scilab.org T?l : +33 (0)1 39 63 56 81 Fax : +33 (0)1 39 63 55 94 ============================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SEP_26_extends_strsplit.pdf Type: application/pdf Size: 471974 bytes Desc: not available URL: From sylvestre.ledru at scilab.org Wed May 6 11:01:41 2009 From: sylvestre.ledru at scilab.org (Sylvestre Ledru) Date: Wed, 06 May 2009 11:01:41 +0200 Subject: [Scilab-Dev] SEP 26 : strsplit(), add the capability to split a string on a pattern. In-Reply-To: <4A015082.9020502@scilab.org> References: <4A015082.9020502@scilab.org> Message-ID: <1241600501.11877.47868.camel@korcula.inria.fr> > Please find attached SEP #26 (V1.0) about strsplit(). This SEP > proposes to add the capability to split a string on a single > character, a group of characters or a regular expression (a pattern). > > As usual, please comment it as needed. I don't know if it is normal but I get a blank #3 page? Two points: * if str is a matrix of string, will pattern be only one string applied to all the strings in the matrix ? * could you add an example with "limit" ? Sylvestre From pierre.marechal at scilab.org Wed May 6 11:22:24 2009 From: pierre.marechal at scilab.org (Pierre MARECHAL) Date: Wed, 06 May 2009 11:22:24 +0200 Subject: [Scilab-Dev] SEP 26 : strsplit(), add the capability to split a string on a pattern. In-Reply-To: <1241600501.11877.47868.camel@korcula.inria.fr> References: <4A015082.9020502@scilab.org> <1241600501.11877.47868.camel@korcula.inria.fr> Message-ID: <4A0156D0.7020902@scilab.org> Sylvestre Ledru a ?crit : >> Please find attached SEP #26 (V1.0) about strsplit(). This SEP >> proposes to add the capability to split a string on a single >> character, a group of characters or a regular expression (a pattern). >> >> As usual, please comment it as needed. >> > I don't know if it is normal but I get a blank #3 page? > No, Fixed with the attached file. > Two points: > * if str is a matrix of string, will pattern be only one string applied > to all the strings in the matrix ? > "str" cannot be a matrix of string because strsplit() returns a matrix of string from a "single string". > * could you add an example with "limit" ? > To split off the first four fields from a line from /etc/passwd: -->strsplit(password_line,":",5) ans = ! root ! ! x ! ! 0 ! ! 0 ! ! root:/root:/bin/bash ! > Sylvestre > Pierre -- ============================================== Pierre MARECHAL ------ Fondation DIGITEO - Consortium Scilab Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex B?timent 23 - Bureau 24 ------ Email : pierre.marechal at scilab.org T?l : +33 (0)1 39 63 56 81 Fax : +33 (0)1 39 63 55 94 ============================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SEP_26_extends_strsplit.pdf Type: application/pdf Size: 473319 bytes Desc: not available URL: From bernard.hugueney at scilab.org Wed May 6 11:39:26 2009 From: bernard.hugueney at scilab.org (bernard.hugueney at scilab.org) Date: Wed, 06 May 2009 11:39:26 +0200 Subject: [Scilab-Dev] SEP 26 : strsplit(), add the capability to split a string on a pattern. In-Reply-To: <4A015082.9020502@scilab.org> References: <4A015082.9020502@scilab.org> Message-ID: On Wed, 06 May 2009 10:55:30 +0200, Pierre MARECHAL wrote: > Hi all, > > Please find attached SEP #26 > > > (V1.0) about strsplit(). This SEP proposes to add the capability to > split a string on a single character, a group of characters or a regular > expression (a pattern). > Hi, Two comments based on crusory reading : 1) I'd take a vector (matrix) of strings as args n?2 and split on any of the strings -> allows to split on different separators for users without regex knowledge 2) I'd accept an optional second return value that would be a vector of the matched separators. -> might be useful for debugging regexp separators -> allows easy reconstruction of the original string. That the only complaints I could think of so far, so kudos for the good SEP ! :) Best regards, Bernard From bernard.hugueney at scilab.org Wed May 6 12:02:50 2009 From: bernard.hugueney at scilab.org (bernard.hugueney at scilab.org) Date: Wed, 06 May 2009 12:02:50 +0200 Subject: [Scilab-Dev] SEP 26 : strsplit(), add the capability to split a string on a pattern. In-Reply-To: References: <4A015082.9020502@scilab.org> Message-ID: <70cd2530dd3e33a71372477b97622407@localhost> On Wed, 06 May 2009 11:39:26 +0200, wrote: > On Wed, 06 May 2009 10:55:30 +0200, Pierre MARECHAL > wrote: >> Hi all, >> >> Please find attached SEP #26 >> > > > Hi, > Two comments based on cursory reading : [...] > Actually, I have another suggestion : 3) When no separator is given as argument, do as python does [1]: "If sep is not specified or is None, a different splitting algorithm is applied: runs of consecutive whitespace are regarded as a single separator, and the result will contain no empty strings at the start or end if the string has leading or trailing whitespace." Best regards, Bernard PS: s/Actually/Currently/ in Abstract ;) [1] http://docs.python.org/library/stdtypes.html From ycollet at freesurf.fr Wed May 6 13:31:50 2009 From: ycollet at freesurf.fr (ycollet at freesurf.fr) Date: Wed, 6 May 2009 13:31:50 +0200 (CEST) Subject: [Scilab-Dev] use basout in fortran program In-Reply-To: <84fde30b3a5e59964fa21ec927d2f178.squirrel@wmail.freesurf.fr> References: <59a1992067ba840bcf11904c4f31b63d.squirrel@wmail.freesurf.fr> <1b2f921fb14eef53f142450eb73f6019.squirrel@wmail.freesurf.fr> <002001c9ce13$adaaeb50$0900c1f0$@cornet@scilab.org> <84fde30b3a5e59964fa21ec927d2f178.squirrel@wmail.freesurf.fr> Message-ID: <35943ea3b67a79ef3b82fe06ff15fc68.squirrel@wmail.freesurf.fr> Thanks to allan, the problem is solved. If you have a format with / inside (return). This doesn't work with buffered print (write(buffer,720)). You must split the FORMAT into pieces. One FORMAT for ONE LINE ! So, 720 FORMAT (/5X,12HTHREE-POINT /13HINTERPOLATION) becomes 720 FORMAT (5X,12HTHREE-POINT ) 721 FORMAT (13HINTERPOLATION) And you call several time the BASOUT function. Another thing with f2c: With f2c the common is considered as "local" the dll toolbox and the "local" common overrides the common from an external dll. So, use: setenv('F2C_IMPORT_COMMON','YES') Thanks again allan, YC > Hello, > > I use first f2c to convert my code to c > Then, I use ilib_for_link. Under windows. > The include "stack.h" is here, just after the SUBROUTINE keyword. > Everything works fine without the call basout (with write(6,...)) > But once I add the call basout, scilab hangs. > I think the character buffer is large enough to handle the formated > strings. > The other difference I see wrt the fortran code in the optimization > toolbox is the shape of the format: > > 720 FORMAT (/5X,25HTHREE-POINT INTERPOLATION) > > there is no quote. Is this needed ? Maybe to produce some kind of 0 > terminated strings ? > > YC > > >> Hi, >> >> How do you build your fortran code ? >> >> With scilab ilib_for_link function or a separate makefile ? >> Windows or linux ? >> >> Fortran code built with intel fortran or f2c ? >> >> iop_ symbol is exported. >> >> If you want to use iop from fortran, you need to include "stack.h" >> >> Allan >> >> >> -----Message d'origine----- >> De?: ycollet at freesurf.fr [mailto:ycollet at freesurf.fr] >> Envoy??: mardi 5 mai 2009 16:21 >> ??: dev at lists.scilab.org >> Objet?: Re: [Scilab-Dev] use basout in fortran program >> >> I included a small test in my fortran code: >> >> WRITE(6,666) IO >> WRITE(6,666) WTE >> >> 666 FORMAT (5X,'PARAM =',I5) >> >> And, when I launch the good scilab command, it hangs at WRITE(6,666) WTE >> The WTE variable is defined in the stack.h iop common. >> It seems that I can't access wte ? >> This is certainly a link problem. How do I link to the iop.wte common >> variable ? >> >> YC >> >> >> >> >> > > > From vincent.couvert at scilab.org Tue May 12 15:06:31 2009 From: vincent.couvert at scilab.org (Vincent COUVERT) Date: Tue, 12 May 2009 15:06:31 +0200 Subject: SEP #27: uiputfile Message-ID: <4A097457.2000108@scilab.org> Hi all, Please find attached SEP #27 (V1.0) about function uiputfile (select a file for saving). Please comment it as needed. Vincent -------------- next part -------------- A non-text attachment was scrubbed... Name: SEP_27_uiputfile.odt Type: application/vnd.oasis.opendocument.text Size: 21051 bytes Desc: not available URL: From bernard.hugueney at scilab.org Tue May 12 16:57:20 2009 From: bernard.hugueney at scilab.org (bernard.hugueney at scilab.org) Date: Tue, 12 May 2009 16:57:20 +0200 Subject: [Scilab-Dev] SEP #27: uiputfile In-Reply-To: <4A097457.2000108@scilab.org> References: <4A097457.2000108@scilab.org> Message-ID: On Tue, 12 May 2009 15:06:31 +0200, Vincent COUVERT wrote: > Hi all, > > Please find attached SEP #27 (V1.0) about function uiputfile (select a > file for saving). > > Please comment it as needed. Hi, Just a few comment : 1) I'm not too fond of the name uiputfile(), while have I don't have any great suggestion, I'd prefer uicreatefile(). 2) "*.*" default for file mask seems too DOS-centric. Why not "*" ? (Btw, are dotfiles displayed by default ?) Best regards, Bernard From pierre.marechal at scilab.org Tue May 12 17:48:55 2009 From: pierre.marechal at scilab.org (Pierre MARECHAL) Date: Tue, 12 May 2009 17:48:55 +0200 Subject: [Scilab-Dev] SEP #27: uiputfile In-Reply-To: References: <4A097457.2000108@scilab.org> Message-ID: <4A099A67.9040600@scilab.org> bernard.hugueney at scilab.org a ?crit : > On Tue, 12 May 2009 15:06:31 +0200, Vincent COUVERT > wrote: > >> Hi all, >> >> Please find attached SEP #27 (V1.0) about function uiputfile (select a >> file for saving). >> >> Please comment it as needed. >> > > Hi, > Just a few comment : > 1) I'm not too fond of the name uiputfile(), while have I don't have any > great suggestion, I'd prefer uicreatefile(). > And why not just call it "uisavefile()" ? Pierre -- ============================================== Pierre MARECHAL ------ Fondation DIGITEO - Consortium Scilab Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex B?timent 23 - Bureau 24 ------ Email : pierre.marechal at scilab.org T?l : +33 (0)1 39 63 56 81 Fax : +33 (0)1 39 63 55 94 ============================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre.ledru at scilab.org Tue May 12 17:53:18 2009 From: sylvestre.ledru at scilab.org (Sylvestre Ledru) Date: Tue, 12 May 2009 17:53:18 +0200 Subject: [Scilab-Dev] SEP #27: uiputfile In-Reply-To: <4A099A67.9040600@scilab.org> References: <4A097457.2000108@scilab.org> <4A099A67.9040600@scilab.org> Message-ID: <1242143598.4719.5776.camel@korcula.inria.fr> Le mardi 12 mai 2009 ? 17:48 +0200, Pierre MARECHAL a ?crit : > bernard.hugueney at scilab.org a ?crit : > > On Tue, 12 May 2009 15:06:31 +0200, Vincent COUVERT > > wrote: > > > > > Hi all, > > > > > > Please find attached SEP #27 (V1.0) about function uiputfile (select a > > > file for saving). > > > > > > Please comment it as needed. > > > > > > > Hi, > > Just a few comment : > > 1) I'm not too fond of the name uiputfile(), while have I don't have any > > great suggestion, I'd prefer uicreatefile(). > > > And why not just call it "uisavefile()" ? I asked the same question and did the same proposal as you. uipufile is the function name used by an other numerical software... However, we could change it for something better (which won't be too hard to do ;) Sylvestre From michael.baudin at scilab.org Thu May 14 15:44:16 2009 From: michael.baudin at scilab.org (=?UTF-8?B?TWljaGHDq2wgQmF1ZGlu?=) Date: Thu, 14 May 2009 15:44:16 +0200 Subject: [Scilab-Dev] SEP #27: uiputfile In-Reply-To: <1242143598.4719.5776.camel@korcula.inria.fr> References: <4A097457.2000108@scilab.org> <4A099A67.9040600@scilab.org> <1242143598.4719.5776.camel@korcula.inria.fr> Message-ID: <4A0C2030.1040105@scilab.org> My personal request would be to include automatic completion for file names selection. It is (incredibly) convenient. Since the feature is to be rewritten with Java, that should be done in just a second, isn'it it ? Micha?l Sylvestre Ledru a ?crit : > Le mardi 12 mai 2009 ? 17:48 +0200, Pierre MARECHAL a ?crit : > >> bernard.hugueney at scilab.org a ?crit : >> >>> On Tue, 12 May 2009 15:06:31 +0200, Vincent COUVERT >>> wrote: >>> >>> >>>> Hi all, >>>> >>>> Please find attached SEP #27 (V1.0) about function uiputfile (select a >>>> file for saving). >>>> >>>> Please comment it as needed. >>>> >>>> >>> Hi, >>> Just a few comment : >>> 1) I'm not too fond of the name uiputfile(), while have I don't have any >>> great suggestion, I'd prefer uicreatefile(). >>> >>> >> And why not just call it "uisavefile()" ? >> > I asked the same question and did the same proposal as you. uipufile is > the function name used by an other numerical software... > > However, we could change it for something better (which won't be too > hard to do ;) > > Sylvestre > > > From vincent.lejeune at institutoptique.fr Fri May 15 23:17:12 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Fri, 15 May 2009 23:17:12 +0200 Subject: Issue with stack in a toolbox Message-ID: <924BCCBE224F4EECBB0E436D72A6D8E1@VLJMAISON> Hi, I am facing another problem in my journey inside the writing of a toolbox. I need to create a custom type that need to be manipuled with SciLab command line. In fact this is a pointer (to a matrix of double stored in gpu memory), so I used the CreateVarFromPtr() function to store it in the stack. But when I'm trying to retrieve it afterward, SciLab is complaining about a stack overflow, and ask me to change its size. However, this is just a lone pointer, it shouldnt eat all the stack by itself... The code is in attachment. Further investigations shows that the line : "CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);" is making trouble, but I suspect that the source of the problem is lying in a misuse of the retrieve of the value, as my custom "fromGPU" function doesnt work as planed (in debug mode). By the way, how can I print something to the SciLab prompt ? Thx for help ! -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sci_toGPU.c URL: From BlanchardJ at ieee.org Fri May 15 23:59:49 2009 From: BlanchardJ at ieee.org (Jonathan Blanchard) Date: Fri, 15 May 2009 18:59:49 -0300 Subject: [Scilab-Dev] Issue with stack in a toolbox In-Reply-To: <924BCCBE224F4EECBB0E436D72A6D8E1@VLJMAISON> References: <924BCCBE224F4EECBB0E436D72A6D8E1@VLJMAISON> Message-ID: Hi, Are you certain that m1 and n1 are not big enough to cause a lack of stack space? By default, I think Scilab only allocated 50 meg or something. You can print stuff to the prompt with sciprint and scierror. scierror will raise an error obviously. (They are in the output_stream module) IIRC you need to include there respective header scierror.h and sciprint.h. Jonathan Blanchard On Fri, May 15, 2009 at 6:17 PM, Vincent Lejeune wrote: > Hi, > > I am facing another problem in my journey inside the writing of a toolbox. > I need to create a custom type that need to be manipuled with SciLab command > line. In fact this is a pointer (to a matrix of double stored in gpu > memory), so I used the CreateVarFromPtr() function to store it in the stack. > > But when I'm trying to retrieve it afterward, SciLab is complaining about a > stack overflow, and ask me to change its size. However, this is just a lone > pointer, it shouldnt eat all the stack by itself... > > The code is in attachment. Further investigations shows that the line : > > "CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);" > > is making trouble, but I suspect that the source of the problem is lying in > a misuse of the retrieve of the value, as my custom "fromGPU" function > doesnt work as planed (in debug mode). > > By the way, how can I print something to the SciLab prompt ? > > Thx for help ! > From vincent.lejeune at institutoptique.fr Sat May 16 19:32:44 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Sat, 16 May 2009 19:32:44 +0200 Subject: [Scilab-Dev] Issue with stack in a toolbox In-Reply-To: References: <924BCCBE224F4EECBB0E436D72A6D8E1@VLJMAISON> Message-ID: <9B52E26273B2476C87CCC7E0CCC7FB7F@VLJMAISON> Thx, it worked. I though originaly that m1 & n1 in the GetRhs function were always output, so I didnt give them a value. Was a mistake... -------------------------------------------------- From: "Jonathan Blanchard" Sent: Friday, May 15, 2009 11:59 PM To: Subject: Re: [Scilab-Dev] Issue with stack in a toolbox > Hi, > > Are you certain that m1 and n1 are not big enough to cause a lack of > stack space? By default, I think Scilab only allocated 50 meg or > something. > > You can print stuff to the prompt with sciprint and scierror. scierror > will raise an error obviously. (They are in the output_stream module) > IIRC you need to include there respective header scierror.h and > sciprint.h. > > > Jonathan Blanchard > > On Fri, May 15, 2009 at 6:17 PM, Vincent Lejeune > wrote: >> Hi, >> >> I am facing another problem in my journey inside the writing of a >> toolbox. >> I need to create a custom type that need to be manipuled with SciLab >> command >> line. In fact this is a pointer (to a matrix of double stored in gpu >> memory), so I used the CreateVarFromPtr() function to store it in the >> stack. >> >> But when I'm trying to retrieve it afterward, SciLab is complaining about >> a >> stack overflow, and ask me to change its size. However, this is just a >> lone >> pointer, it shouldnt eat all the stack by itself... >> >> The code is in attachment. Further investigations shows that the line : >> >> "CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);" >> >> is making trouble, but I suspect that the source of the problem is lying >> in >> a misuse of the retrieve of the value, as my custom "fromGPU" function >> doesnt work as planed (in debug mode). >> >> By the way, how can I print something to the SciLab prompt ? >> >> Thx for help ! >> > From vincent.lejeune at institutoptique.fr Mon May 18 07:18:44 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Mon, 18 May 2009 07:18:44 +0200 Subject: How to free unreferenced variable inside SciLab stack Message-ID: Hi, I use a Scilab_variable_pointer in SciLab stack to hold a custom type. The matter is that I have no control over its unallocation by the SciLab Stack. The pointer actually hold the location of a matrix stored on GPU side. But when the pointer is no more referenced, the matrix is still in the GPU memory, and this lead to dirty memory leaks. I'm trying to do some benchmark over 10 000 computations of a sum of a 512*512 matrix. I do this with the SciLab code below : "timer();for i=1:10000 C=gpuAdd(A,B);end;timer()" Every time gpuAdd is called, a new matrix is created, but the previous matrix is not freed. So I can get up to 10 000 matrix of 250+ ko... But when I use the same code with "traditionnal" matrix, I don't have any memory leak. I think there is some unallocation work done by the scilab stacks, I'd like to know if I can overloard it in some way to free Matrix in GPU memory when the pointer is freed in the stack. Thx for the help ! From Serge.Steer at inria.fr Mon May 18 09:27:19 2009 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 18 May 2009 09:27:19 +0200 Subject: [Scilab-Dev] Issue with stack in a toolbox In-Reply-To: <924BCCBE224F4EECBB0E436D72A6D8E1@VLJMAISON> References: <924BCCBE224F4EECBB0E436D72A6D8E1@VLJMAISON> Message-ID: <4A110DD7.4050901@inria.fr> Vincent Lejeune a ?crit : > Hi, > > I am facing another problem in my journey inside the writing of a > toolbox. > I need to create a custom type that need to be manipuled with SciLab > command line. In fact this is a pointer (to a matrix of double stored > in gpu memory), so I used the CreateVarFromPtr() function to store it > in the stack. > > But when I'm trying to retrieve it afterward, SciLab is complaining > about a stack overflow, and ask me to change its size. However, this > is just a lone pointer, it shouldnt eat all the stack by itself... > > The code is in attachment. Further investigations shows that the line : > > "CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE,&m1,&n1,&l1);" here you create a m1*n1 variable in the Scilab stack. So if m1*n1 is big you may overflow this stack... CreateVarFromPtr also make a local *copy* of the matrix (not the pointer) in the stack. Serge Steer From Serge.Steer at inria.fr Mon May 18 09:37:13 2009 From: Serge.Steer at inria.fr (Serge Steer) Date: Mon, 18 May 2009 09:37:13 +0200 Subject: [Scilab-Dev] How to free unreferenced variable inside SciLab stack In-Reply-To: References: Message-ID: <4A111029.8030500@inria.fr> Vincent Lejeune a ?crit : > Hi, > > I use a Scilab_variable_pointer in SciLab stack to hold a custom type. > The matter is that I have no control over its unallocation by the > SciLab Stack. > The pointer actually hold the location of a matrix stored on GPU side. > But when the pointer is no more referenced, the matrix is still in the > GPU memory, and this lead to dirty memory leaks. > I'm trying to do some benchmark over 10 000 computations of a sum of a > 512*512 matrix. I do this with the SciLab code below : > > "timer();for i=1:10000 C=gpuAdd(A,B);end;timer()" > > Every time gpuAdd is called, a new matrix is created, but the previous > matrix is not freed. So I can get up to 10 000 matrix of 250+ ko... > But when I use the same code with "traditionnal" matrix, I don't have > any memory leak. I think there is some unallocation work done by the > scilab stacks, I'd like to know if I can overloard it in some way to > free Matrix in GPU memory when the pointer is freed in the stack. > > Thx for the help ! > In the current Scilab version (it will change with Scilab6) the regular variables are stored in a preallocated stack. It is the stack mechanism which removes the variables out of the stack when it is required. But there is no free mechanism. So if you store a pointer in a regular variable, the value of the pointer will be stored in the stack but Scilab does not know anything about it. Suppose that the variable A contains such a pointer, il one executes B=A it will copy the value of the pointer in variable B (the data pointed to are not copied). Now if one execute A=1, the old A value is replaced in the stack by the new one without any care of what A was. So there is now no way to implicitely unallocate pointers stored in Scilab variables. In you specific case ( C=gpuAdd(A,B)) it is however possible to free the pointer on the computed sum after you have made a copy the pointed variable value into the regular matrix C. Serge Steer From ravindra.devagiri at gmail.com Mon May 18 12:11:46 2009 From: ravindra.devagiri at gmail.com (ravindra devagiri) Date: Mon, 18 May 2009 15:41:46 +0530 Subject: regarding porting of scilab in MAC OS X Message-ID: Hi scilab development team, We are working on the porting scilab-5.1 in MAC OS X. But we encounter some problems regarding dependencies. Because some of the dependencies are not listed in fink( FINK is used for porting application in MAC OS X) like libreadline, libpcre . we can not port scilab in fink without these dependencies. Can you please help me about these dependencies and can you specify any alternate dependencies for these packages. Thankyou regards ravindra, -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvestre at ecranbleu.org Mon May 18 14:52:00 2009 From: sylvestre at ecranbleu.org (Sylvestre Ledru) Date: Mon, 18 May 2009 14:52:00 +0200 Subject: [Scilab-Dev] regarding porting of scilab in MAC OS X Message-ID: On Mon, 18 May 2009 15:41:46 +0530, ravindra devagiri wrote: > Hi scilab development team, > We are working on the porting scilab-5.1 in MAC OS X. What do you mean by porting ? Scilab has been ported under Mac OS X a few moths ago (still, it is an alpha version) > But we encounter > some problems regarding dependencies. Because some of the dependencies are > not listed in fink( FINK is used for porting application in MAC OS X) like > libreadline, libpcre . Hmmm, these two libs do exist under Fink. However, I am pretty sure that others are missing. But since all the dependencies are packaged under Debian and fink is based on Debian tools, you might ask for a synchronization of these packages against Debian's. >we can not port scilab in fink without these > dependencies. Can you please help me about these dependencies and can you > specify any alternate dependencies for these packages. Don't hesitate if you need more help. Btw, you will probably be interested by http://wiki.scilab.org/Compiling_Scilab_5.x_under_MacOSX Sylvestre From sylvestre at ecranbleu.org Mon May 18 14:52:45 2009 From: sylvestre at ecranbleu.org (Sylvestre Ledru) Date: Mon, 18 May 2009 14:52:45 +0200 Subject: [Scilab-Dev] regarding porting of scilab in MAC OS X Message-ID: <258997905be3286c4ec1c0eeb456aba8@mail.ecranbleu.org> On Mon, 18 May 2009 15:41:46 +0530, ravindra devagiri wrote: > Hi scilab development team, > We are working on the porting scilab-5.1 in MAC OS X. What do you mean by porting ? Scilab has been ported under Mac OS X a few moths ago (still, it is an alpha version) > But we encounter > some problems regarding dependencies. Because some of the dependencies are > not listed in fink( FINK is used for porting application in MAC OS X) like > libreadline, libpcre . Hmmm, these two libs do exist under Fink. However, I am pretty sure that others are missing. But since all the dependencies are packaged under Debian and fink is based on Debian tools, you might ask for a synchronization of these packages against Debian's. >we can not port scilab in fink without these > dependencies. Can you please help me about these dependencies and can you > specify any alternate dependencies for these packages. Don't hesitate if you need more help. Btw, you will probably be interested by http://wiki.scilab.org/Compiling_Scilab_5.x_under_MacOSX Sylvestre From stephane.mottelet at utc.fr Wed May 20 16:39:24 2009 From: stephane.mottelet at utc.fr (=?UTF-8?B?U3TCjsOpcGhhbmUgTW90dGVsZXQ=?=) Date: Wed, 20 May 2009 16:39:24 +0200 Subject: "driver" macro in 5.1, bug or feature ? Message-ID: <4A14161C.8030205@utc.fr> Hi all, does anyone have an explanation to the fact that e.g. driver GIF driver Pos open a graphical window ? These drivers are usefull when using Scilab as an computation/plotting engine so the need of a real display make them rather useless... So, is it a bug or a feature ? S. From vincent.lejeune at institutoptique.fr Thu May 21 13:31:51 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Thu, 21 May 2009 13:31:51 +0200 Subject: How to list every variables inside the SciLab stack ? Message-ID: <4417182D1BE246FAB215F1FD341CFB6E@VLJMAISON> Hi, I was wondering if there was a way to list the content of the stack, in C, ie functions like "get_from_stack" and "get_next_from_stack" or something like that. When I have a memory error from the GPU side, I'd like to have a look at every pointer from the stack. I would have a custom stack of my own, containing every pointer holding a reference to a matrix in GPU memory. To be able to look in the stack would allow me to free unecessary matrix that eat space on the GPU. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ycollet at freesurf.fr Thu May 21 14:34:27 2009 From: ycollet at freesurf.fr (Collette Yann) Date: Thu, 21 May 2009 14:34:27 +0200 Subject: [Scilab-Dev] How to list every variables inside the SciLab stack ? In-Reply-To: <4417182D1BE246FAB215F1FD341CFB6E@VLJMAISON> References: <4417182D1BE246FAB215F1FD341CFB6E@VLJMAISON> Message-ID: <4A154A53.8090705@freesurf.fr> Vincent Lejeune a ?crit : > Hi, > > I was wondering if there was a way to list the content of the stack, > in C, ie functions like "get_from_stack" and "get_next_from_stack" or > something like that. > When I have a memory error from the GPU side, I'd like to have a look > at every pointer from the stack. I would have a custom stack of my > own, containing every pointer holding a reference to a matrix in GPU > memory. To be able to look in the stack would allow me to free > unecessary matrix that eat space on the GPU. I was wondering if such a thing could be done via the function scistring (in stack-c.h) and call the scilab function "who('local')" and "who('global')" YC From vincent.lejeune at institutoptique.fr Thu May 21 15:06:13 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Thu, 21 May 2009 15:06:13 +0200 Subject: [Scilab-Dev] How to list every variables inside the SciLab stack ? In-Reply-To: <4A154A53.8090705@freesurf.fr> References: <4417182D1BE246FAB215F1FD341CFB6E@VLJMAISON> <4A154A53.8090705@freesurf.fr> Message-ID: <366A4CE2C3244D40AA1F94ABF69CB6FD@VLJMAISON> Hi, is there a way to call "who('local')" straight from C code or do I have to use scirun function ? -------------------------------------------------- From: "Collette Yann" Sent: Thursday, May 21, 2009 2:34 PM To: Subject: Re: [Scilab-Dev] How to list every variables inside the SciLab stack ? > Vincent Lejeune a ?crit : >> Hi, >> I was wondering if there was a way to list the content of the stack, in >> C, ie functions like "get_from_stack" and "get_next_from_stack" or >> something like that. >> When I have a memory error from the GPU side, I'd like to have a look at >> every pointer from the stack. I would have a custom stack of my own, >> containing every pointer holding a reference to a matrix in GPU memory. >> To be able to look in the stack would allow me to free unecessary matrix >> that eat space on the GPU. > I was wondering if such a thing could be done via the function scistring > (in stack-c.h) and call the scilab function "who('local')" and > "who('global')" > > YC > From ycollet at freesurf.fr Thu May 21 15:10:07 2009 From: ycollet at freesurf.fr (Collette Yann) Date: Thu, 21 May 2009 15:10:07 +0200 Subject: [Scilab-Dev] How to list every variables inside the SciLab stack ? In-Reply-To: <366A4CE2C3244D40AA1F94ABF69CB6FD@VLJMAISON> References: <4417182D1BE246FAB215F1FD341CFB6E@VLJMAISON> <4A154A53.8090705@freesurf.fr> <366A4CE2C3244D40AA1F94ABF69CB6FD@VLJMAISON> Message-ID: <4A1552AF.3050305@freesurf.fr> You can use the SciString function (see in stack-c.h): /** Used for calling a scilab function by its name **/ #define SciString(ibegin,name,mlhs,mrhs) \ if( ! C2F(scistring)(ibegin,name,mlhs,mrhs,(unsigned long)strlen(name))) return 0; YC Vincent Lejeune a ?crit : > Hi, > > is there a way to call "who('local')" straight from C code or do I > have to use scirun function ? > > -------------------------------------------------- > From: "Collette Yann" > Sent: Thursday, May 21, 2009 2:34 PM > To: > Subject: Re: [Scilab-Dev] How to list every variables inside the > SciLab stack ? > >> Vincent Lejeune a ?crit : >>> Hi, >>> I was wondering if there was a way to list the content of the >>> stack, in C, ie functions like "get_from_stack" and >>> "get_next_from_stack" or something like that. >>> When I have a memory error from the GPU side, I'd like to have a >>> look at every pointer from the stack. I would have a custom stack of >>> my own, containing every pointer holding a reference to a matrix in >>> GPU memory. To be able to look in the stack would allow me to free >>> unecessary matrix that eat space on the GPU. >> I was wondering if such a thing could be done via the function >> scistring (in stack-c.h) and call the scilab function "who('local')" >> and "who('global')" >> >> YC >> > > From Serge.Steer at inria.fr Sat May 23 09:02:25 2009 From: Serge.Steer at inria.fr (Serge Steer) Date: Sat, 23 May 2009 09:02:25 +0200 Subject: [Scilab-Dev] How to list every variables inside the SciLab stack ? In-Reply-To: <4417182D1BE246FAB215F1FD341CFB6E@VLJMAISON> References: <4417182D1BE246FAB215F1FD341CFB6E@VLJMAISON> Message-ID: <4A179F81.6020602@inria.fr> Vincent Lejeune a ?crit : > Hi, > > I was wondering if there was a way to list the content of the stack, > in C, ie functions like "get_from_stack" and "get_next_from_stack" or > something like that. > When I have a memory error from the GPU side, I'd like to have a look > at every pointer from the stack. I would have a custom stack of my > own, containing every pointer holding a reference to a matrix in GPU > memory. To be able to look in the stack would allow me to free > unecessary matrix that eat space on the GPU. Hello I think there is no C function available to do so, but it is quite easy to write: The varaiable names are stored in the integer array named idstk located in the C structure named C2F(vstk) . If k is the variable index the name is stored in C2F(vstk).idstk[k * nsiz]) to C2F(vstk).idstk[(k+1) * nsiz-1]) where nsiz=6; in a coded way. To decode it on can use the C2F(cvname) function: C2F(cvname)(C2F(vstk).idstk[k * nsiz]) ,str,(int job=1,&job)) The valid values for the index k are in the interval [C2F(vstk).bot-1,C2F(vstk).isiz-1] for the regular variables and in [C2F(vstk).gtop-1,C2F(vstk).gbot-1] for the global ones. Regards, Serge Steer From allan.cornet at scilab.org Mon May 25 08:08:55 2009 From: allan.cornet at scilab.org (Allan CORNET) Date: Mon, 25 May 2009 08:08:55 +0200 Subject: [Scilab-Dev] How to list every variables inside the SciLab stack ? In-Reply-To: <366A4CE2C3244D40AA1F94ABF69CB6FD@VLJMAISON> References: <4417182D1BE246FAB215F1FD341CFB6E@VLJMAISON> <4A154A53.8090705@freesurf.fr> <366A4CE2C3244D40AA1F94ABF69CB6FD@VLJMAISON> Message-ID: <003c01c9dcff$48d3c8a0$da7b59e0$@cornet@scilab.org> Hi, See SCI/core/includes/getvariablesname.h char **getLocalVariablesName(int *sizearray,BOOL sorted); char **getGlobalVariablesName(int *sizearray, BOOL sorted); Best Regards Allan -----Message d'origine----- De?: Vincent Lejeune [mailto:vincent.lejeune at institutoptique.fr] Envoy??: jeudi 21 mai 2009 15:06 ??: dev at lists.scilab.org Objet?: Re: [Scilab-Dev] How to list every variables inside the SciLab stack ? Hi, is there a way to call "who('local')" straight from C code or do I have to use scirun function ? -------------------------------------------------- From: "Collette Yann" Sent: Thursday, May 21, 2009 2:34 PM To: Subject: Re: [Scilab-Dev] How to list every variables inside the SciLab stack ? > Vincent Lejeune a ?crit : >> Hi, >> I was wondering if there was a way to list the content of the stack, in >> C, ie functions like "get_from_stack" and "get_next_from_stack" or >> something like that. >> When I have a memory error from the GPU side, I'd like to have a look at >> every pointer from the stack. I would have a custom stack of my own, >> containing every pointer holding a reference to a matrix in GPU memory. >> To be able to look in the stack would allow me to free unecessary matrix >> that eat space on the GPU. > I was wondering if such a thing could be done via the function scistring > (in stack-c.h) and call the scilab function "who('local')" and > "who('global')" > > YC > From stephane.mottelet at utc.fr Mon May 25 16:36:59 2009 From: stephane.mottelet at utc.fr (=?UTF-8?B?U3TCjsOpcGhhbmUgTW90dGVsZXQ=?=) Date: Mon, 25 May 2009 16:36:59 +0200 Subject: [Scilab-Dev] "driver" macro in 5.1, bug or feature ? In-Reply-To: <4A14161C.8030205@utc.fr> References: <4A14161C.8030205@utc.fr> Message-ID: <4A1AAD0B.6050600@utc.fr> St??phane Mottelet a ?crit : > Hi all, > > does anyone have an explanation to the fact that e.g. > > driver GIF > driver Pos > > open a graphical window ? These drivers are usefull when > using Scilab as an computation/plotting engine so the need > of a real display make them rather useless... So, is it a > bug or a feature ? > > > > S. So nobody cares ? Should I fill a bug report ? S. From BlanchardJ at ieee.org Mon May 25 16:39:14 2009 From: BlanchardJ at ieee.org (Jonathan Blanchard) Date: Mon, 25 May 2009 11:39:14 -0300 Subject: [Scilab-Dev] "driver" macro in 5.1, bug or feature ? In-Reply-To: <4A1AAD0B.6050600@utc.fr> References: <4A14161C.8030205@utc.fr> <4A1AAD0B.6050600@utc.fr> Message-ID: HI, Was it working that way before?. If it was always that way you may file a request if not you should do a bug report. I for myself do not remember how it used to work. Jonathan Blanchard 2009/5/25 St??phane Mottelet : > St??phane Mottelet a ?crit : >> >> Hi all, >> >> does anyone have an explanation to the fact that e.g. >> >> driver GIF >> driver Pos >> >> open a graphical window ? These drivers are usefull when >> using Scilab as an computation/plotting engine so the need >> of a real display make them rather useless... So, is it a >> bug or a feature ? >> >> >> >> S. > > So nobody cares ? Should I fill a bug report ? > > S. > From stephane.mottelet at utc.fr Mon May 25 16:50:21 2009 From: stephane.mottelet at utc.fr (=?UTF-8?B?U3TCjsOpcGhhbmUgTW90dGVsZXQ=?=) Date: Mon, 25 May 2009 16:50:21 +0200 Subject: [Scilab-Dev] "driver" macro in 5.1, bug or feature ? In-Reply-To: References: <4A14161C.8030205@utc.fr> <4A1AAD0B.6050600@utc.fr> Message-ID: <4A1AB02D.1060705@utc.fr> Jonathan Blanchard a ?crit : > HI, > > Was it working that way before?. Yes. In scilab 4.1.2, "driver GIF" does not open *any* graphical window. > If it was always that way you may > file a request if not you should do a bug report. > I think you wanted to say the contrary : If it was always that way you may do a bug report if not you should file a request. S. > I for myself do not remember how it used to work. > > Jonathan Blanchard > > > > 2009/5/25 St??phane Mottelet : >> St??phane Mottelet a ?crit : >>> Hi all, >>> >>> does anyone have an explanation to the fact that e.g. >>> >>> driver GIF >>> driver Pos >>> >>> open a graphical window ? These drivers are usefull when >>> using Scilab as an computation/plotting engine so the need >>> of a real display make them rather useless... So, is it a >>> bug or a feature ? >>> >>> >>> >>> S. >> So nobody cares ? Should I fill a bug report ? >> >> S. >> From stephane.mottelet at utc.fr Mon May 25 16:54:12 2009 From: stephane.mottelet at utc.fr (=?UTF-8?B?U3TCjsOpcGhhbmUgTW90dGVsZXQ=?=) Date: Mon, 25 May 2009 16:54:12 +0200 Subject: [Scilab-Dev] "driver" macro in 5.1, bug or feature ? In-Reply-To: <4A1AB02D.1060705@utc.fr> References: <4A14161C.8030205@utc.fr> <4A1AAD0B.6050600@utc.fr> <4A1AB02D.1060705@utc.fr> Message-ID: <4A1AB114.1010607@utc.fr> Sorry for my misunderstanding... I am tired of going through theses things that have been broken in Scilab 5 graphics. S. St??phane Mottelet a ?crit : > Jonathan Blanchard a ?crit : >> HI, >> >> Was it working that way before?. > Yes. > > In scilab 4.1.2, "driver GIF" does not open *any* > graphical window. > >> If it was always that way you may >> file a request if not you should do a bug report. >> > I think you wanted to say the contrary : > > If it was always that way you may do a bug report > if not you should file a request. > > > S. > > >> I for myself do not remember how it used to work. >> >> Jonathan Blanchard >> >> >> >> 2009/5/25 St??phane Mottelet : >>> St??phane Mottelet a ?crit : >>>> Hi all, >>>> >>>> does anyone have an explanation to the fact that e.g. >>>> >>>> driver GIF >>>> driver Pos >>>> >>>> open a graphical window ? These drivers are usefull when >>>> using Scilab as an computation/plotting engine so the need >>>> of a real display make them rather useless... So, is it a >>>> bug or a feature ? >>>> >>>> >>>> >>>> S. >>> So nobody cares ? Should I fill a bug report ? >>> >>> S. >>> From stephane.mottelet at utc.fr Mon May 25 16:58:13 2009 From: stephane.mottelet at utc.fr (=?UTF-8?B?U3TCjsOpcGhhbmUgTW90dGVsZXQ=?=) Date: Mon, 25 May 2009 16:58:13 +0200 Subject: [Scilab-Dev] "driver" macro in 5.1, bug or feature ? In-Reply-To: <4A1AB114.1010607@utc.fr> References: <4A14161C.8030205@utc.fr> <4A1AAD0B.6050600@utc.fr> <4A1AB02D.1060705@utc.fr> <4A1AB114.1010607@utc.fr> Message-ID: <4A1AB205.6090402@utc.fr> bugzilled #4540 S. St??phane Mottelet a ?crit : > Sorry for my misunderstanding... I am tired of going through theses > things that have > been broken in Scilab 5 graphics. > > S. > > St??phane Mottelet a ?crit : >> Jonathan Blanchard a ?crit : >>> HI, >>> >>> Was it working that way before?. >> Yes. >> >> In scilab 4.1.2, "driver GIF" does not open *any* >> graphical window. >> >>> If it was always that way you may >>> file a request if not you should do a bug report. >>> >> I think you wanted to say the contrary : >> >> If it was always that way you may do a bug report >> if not you should file a request. >> >> >> S. >> >> >>> I for myself do not remember how it used to work. >>> >>> Jonathan Blanchard >>> >>> >>> >>> 2009/5/25 St??phane Mottelet : >>>> St??phane Mottelet a ?crit : >>>>> Hi all, >>>>> >>>>> does anyone have an explanation to the fact that e.g. >>>>> >>>>> driver GIF >>>>> driver Pos >>>>> >>>>> open a graphical window ? These drivers are usefull when >>>>> using Scilab as an computation/plotting engine so the need >>>>> of a real display make them rather useless... So, is it a >>>>> bug or a feature ? >>>>> >>>>> >>>>> >>>>> S. >>>> So nobody cares ? Should I fill a bug report ? >>>> >>>> S. >>>> From stephane.mottelet at utc.fr Mon May 25 23:51:16 2009 From: stephane.mottelet at utc.fr (=?UTF-8?B?U3TCjsOpcGhhbmUgTW90dGVsZXQ=?=) Date: Mon, 25 May 2009 23:51:16 +0200 Subject: annoying bug/warning Message-ID: <4A1B12D4.1060207@utc.fr> Hi all, strange interpreter bug/warning. Try to execute the following piece of code : function foo() if 1 disp('abcdefghijklmonoprstuvwxyz') end endfunction You get : -->Warning Identifier : abcdefghijklmonoprstuvwxyz has been truncated to: abcdefghijklmonoprstuvwx bugzilled #4542 S. From sploving1 at 163.com Tue May 26 06:41:27 2009 From: sploving1 at 163.com (sploving) Date: Tue, 26 May 2009 12:41:27 +0800 Subject: quetion In-Reply-To: <4A1B12D4.1060207@utc.fr> References: <4A1B12D4.1060207@utc.fr> Message-ID: <1243312887.5684.10.camel@suse-sploving.iscas> hi all, I want to wrap a C variable for scialb. and my wrapper is as follows: extern char cvar; int _wrap_cvar_set (char *fname){ char arg1 ; int m1 ; int n1 ; int l1 ; { GetRhsVar(1,STRING_DATATYPEE ,&m1,&n1,&l1); arg1=(char)(*stk(l1)); } cvar = arg1; return 0; } int _wrap_cvar_get (char *fname){ char result; int m ; int n ; int l ; result = (char)cvar; { m=1,n=1; CreateVar(Rhs+1,STRING_DATATYPE ,&m,&n,&l); *stk(l)=result; LhsVar(1)=Rhs+1; } return 0; } It could not work. Then I use the "MATRIX_OF_STRING_DATATYPE" , it does not work either. At last I use the "MATRIX_OF_DOUBLE_DATATYPE", it works. But it could not set a char to cvar, as follows: -->cvar_set(3) -->cvar_get() ans = 3. -->cvar_set("b") !--error 246 What is the matter? Thanks for any reply. Baozeng From ycollet at freesurf.fr Tue May 26 08:42:00 2009 From: ycollet at freesurf.fr (ycollet at freesurf.fr) Date: Tue, 26 May 2009 08:42:00 +0200 (CEST) Subject: [Scilab-Dev] quetion In-Reply-To: <1243312887.5684.10.camel@suse-sploving.iscas> References: <4A1B12D4.1060207@utc.fr> <1243312887.5684.10.camel@suse-sploving.iscas> Message-ID: <0809674e0dff74572b5fad810e09b978.squirrel@wmail.freesurf.fr> Hello, For a STRING_DATATYPE, you must use cstk instead of stk For a INTEGER_DATATYPE you must use istk instead of stk YC > hi all, > > I want to wrap a C variable for scialb. and my wrapper is as follows: > > extern char cvar; > > int _wrap_cvar_set (char *fname){ > char arg1 ; > int m1 ; > int n1 ; > int l1 ; > > { > GetRhsVar(1,STRING_DATATYPEE ,&m1,&n1,&l1); > arg1=(char)(*stk(l1)); > } > cvar = arg1; > > return 0; > } > > > int _wrap_cvar_get (char *fname){ > char result; > int m ; > int n ; > int l ; > > result = (char)cvar; > { > m=1,n=1; > CreateVar(Rhs+1,STRING_DATATYPE ,&m,&n,&l); > *stk(l)=result; > LhsVar(1)=Rhs+1; > } > return 0; > } > > It could not work. Then I use the "MATRIX_OF_STRING_DATATYPE" , it does > not work either. At last I use the "MATRIX_OF_DOUBLE_DATATYPE", it > works. But it could not set a char to cvar, as follows: > > -->cvar_set(3) > > -->cvar_get() > ans = > > 3. > > -->cvar_set("b") > !--error 246 > > What is the matter? Thanks for any reply. > > > Baozeng > > > > > > > > From allan.cornet at scilab.org Tue May 26 09:14:48 2009 From: allan.cornet at scilab.org (Allan CORNET) Date: Tue, 26 May 2009 09:14:48 +0200 Subject: [Scilab-Dev] quetion In-Reply-To: <1243312887.5684.10.camel@suse-sploving.iscas> References: <4A1B12D4.1060207@utc.fr> <1243312887.5684.10.camel@suse-sploving.iscas> Message-ID: <000f01c9ddd1$a7da1340$f78e39c0$@cornet@scilab.org> Hi, A example with string and double variables if haveacompiler() then chdir(TMPDIR); src = ['#include ' '#include ""stack-c.h""' '#include ""sciprint.h""' '#include ""Scierror.h""' '' 'static char *cvar = NULL;' 'static int ivar = 0;' 'int sci_cvar_set (char *fname)' '{' ' char *arg = NULL;' ' int m1 = 0 ;' ' int n1 = 0 ;' ' int l1 = 0 ;' ' if (GetType(1) == sci_strings)' ' {' ' GetRhsVar(1,STRING_DATATYPE ,&m1,&n1,&l1);' ' cvar = strdup(cstk(l1));' ' }' ' else if (GetType(1) == sci_matrix)' ' {' ' GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE ,&m1,&n1,&l1);' ' ivar = (int)*stk(l1);' ' }' ' else' ' {' ' Scierror(999,""error ...\n"");' ' }' '' ' return 0;' '} ' '' 'int sci_cvar_get (char *fname)' '{' '' ' if (GetType(1) == sci_strings)' ' {' ' int m1 = 0, n1 = 0, l1 = 0;' ' int m = 1, n = 0, l = 0;' '' ' GetRhsVar(1,STRING_DATATYPE ,&m1,&n1,&l1);' ' if (strcmp(cstk(l1),""string"") == 0)' ' {' ' m = 1;' '' ' if (cvar) n = (int)strlen(cvar);' ' else n = (int)strlen("""");' '' ' CreateVar(Rhs+1,STRING_DATATYPE ,&m,&n,&l); ' ' if (cvar) strcpy(cstk(l),cvar);' ' else strcpy(cstk(l),"""");' ' }' ' else' ' if (strcmp(cstk(l1),""number"") == 0)' ' {' ' m = 1;' ' n = 1;' ' CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE ,&m,&n,&l); ' ' *stk(l) = (double)ivar;' ' }' ' else' ' {' ' Scierror(999,""error ...\n"");' ' return 0;' ' }' ' LhsVar(1) = Rhs+1;' ' }' ' else' ' {' ' Scierror(999,""error ...\n"");' ' }' ' return 0;' '}' ]; mputl(src,'example_cvar.c'); files=['example_cvar.c']; ilib_build('addinter',['cvar_get','sci_cvar_get';'cvar_set','sci_cvar_set'], files,[]); exec loader.sce; cvar_set(33) cvar_set('my string') cvar_get('string') cvar_get('number') end Allan -----Message d'origine----- De?: sploving [mailto:sploving1 at 163.com] Envoy??: mardi 26 mai 2009 06:41 ??: dev at lists.scilab.org Objet?: [Scilab-Dev] quetion hi all, I want to wrap a C variable for scialb. and my wrapper is as follows: extern char cvar; int _wrap_cvar_set (char *fname){ char arg1 ; int m1 ; int n1 ; int l1 ; { GetRhsVar(1,STRING_DATATYPEE ,&m1,&n1,&l1); arg1=(char)(*stk(l1)); } cvar = arg1; return 0; } int _wrap_cvar_get (char *fname){ char result; int m ; int n ; int l ; result = (char)cvar; { m=1,n=1; CreateVar(Rhs+1,STRING_DATATYPE ,&m,&n,&l); *stk(l)=result; LhsVar(1)=Rhs+1; } return 0; } It could not work. Then I use the "MATRIX_OF_STRING_DATATYPE" , it does not work either. At last I use the "MATRIX_OF_DOUBLE_DATATYPE", it works. But it could not set a char to cvar, as follows: -->cvar_set(3) -->cvar_get() ans = 3. -->cvar_set("b") !--error 246 What is the matter? Thanks for any reply. Baozeng From vincent.couvert at scilab.org Tue May 26 10:47:43 2009 From: vincent.couvert at scilab.org (Vincent COUVERT) Date: Tue, 26 May 2009 10:47:43 +0200 Subject: [Scilab-Dev] SEP #27: uiputfile In-Reply-To: <4A0C2030.1040105@scilab.org> References: <4A097457.2000108@scilab.org> <4A099A67.9040600@scilab.org> <1242143598.4719.5776.camel@korcula.inria.fr> <4A0C2030.1040105@scilab.org> Message-ID: <4A1BACAF.7080706@scilab.org> Hi, I just updated the SEP with your remarks. The name is unchanged to not disturb the users of an other numerical software... Vincent Micha?l Baudin a ?crit : > My personal request would be to include automatic completion > for file names selection. It is (incredibly) convenient. > Since the feature is to be rewritten with Java, that should be done in > just a second, isn'it it ? > > Micha?l > > Sylvestre Ledru a ?crit : >> Le mardi 12 mai 2009 ? 17:48 +0200, Pierre MARECHAL a ?crit : >> >>> bernard.hugueney at scilab.org a ?crit : >>>> On Tue, 12 May 2009 15:06:31 +0200, Vincent COUVERT >>>> wrote: >>>> >>>>> Hi all, >>>>> >>>>> Please find attached SEP #27 (V1.0) about function uiputfile >>>>> (select a file for saving). >>>>> >>>>> Please comment it as needed. >>>>> >>>> Hi, >>>> Just a few comment : >>>> 1) I'm not too fond of the name uiputfile(), while have I don't >>>> have any >>>> great suggestion, I'd prefer uicreatefile(). >>>> >>> And why not just call it "uisavefile()" ? >>> >> I asked the same question and did the same proposal as you. uipufile is >> the function name used by an other numerical software... >> However, we could change it for something better (which won't be too >> hard to do ;) >> >> Sylvestre >> >> >> > -- ============================================== Vincent COUVERT Responsable du d?veloppement ------ Fondation DIGITEO - Consortium Scilab Domaine de Voluceau - B.P. 105 78153 Le Chesnay Cedex B?timent 23 - Bureau 22 ------ Email : vincent.couvert at scilab.org T?l : +33 (0)1 39 63 54 46 Fax : +33 (0)1 39 63 55 94 ============================================== -------------- next part -------------- A non-text attachment was scrubbed... Name: SEP_27_uiputfile.odt Type: application/vnd.oasis.opendocument.text Size: 23030 bytes Desc: not available URL: From allan.cornet at scilab.org Wed May 27 10:45:20 2009 From: allan.cornet at scilab.org (Allan CORNET) Date: Wed, 27 May 2009 10:45:20 +0200 Subject: [Scilab - Windows - master] dependency on hdf5 library added Message-ID: <000301c9dea7$77879a10$6696ce30$@cornet@scilab.org> Hi, We added a dependency on HDF5 library on Windows. Please update your pre requirements. Best regards Allan -------------- next part -------------- An HTML attachment was scrubbed... URL: From sploving1 at 163.com Fri May 29 05:30:01 2009 From: sploving1 at 163.com (sploving) Date: Fri, 29 May 2009 11:30:01 +0800 Subject: [Scilab-Dev] quetion In-Reply-To: <000f01c9ddd1$a7da1340$f78e39c0$@cornet@scilab.org> References: <4A1B12D4.1060207@utc.fr> <1243312887.5684.10.camel@suse-sploving.iscas> <000f01c9ddd1$a7da1340$f78e39c0$@cornet@scilab.org> Message-ID: <1243567801.18602.27.camel@suse-sploving.iscas> Hello, Thank you first. The example helped me a lot. I still have some questions: 1.As there exists "istk" and "MATRIX_OF_INTEGER_DATATYPE", why do we wrap the integer such as "int ivar" using "stk" and "MATRIX_OF_DOUBLE_DATATYPE"? (In fact, I tried to wrap "int ivar" using istk and "MATRIX_OF_INTEGER_DATATYPE",but failed) 2.Besides "stk,istk,cstk", there is also a "sstk" which is used for "float" , but I could not find a type such as "MATRIX_OF_FLOAT_DATATYPE" defined in the "stackTypeVariable.h".So I do not know how to use it. 3.In the "stack-c.h", there are a lot useful API. I only understand a few of them util now, such as "GetType,GetRhsVar,CreateVar,LhsVar,Rhs", May I need know all of the rest of them if I want to support the scilab language in swig? If so, are there any docs or examples that could help me understand them? 4.I want to write a test-suit file that could test the wrapper file.But I could not find a similiar file in the docs? Could you give me a simple file like that? As in octave, it may like this:(rumme.m) #!/usr/local/bin/octave example example.cvar.ivar = 42; example.cvar.svar = -31000; printf("ivar = %i\n", example.cvar.ivar); printf("svar = %i\n", example.cvar.svar); Thank you for any reply. Baozeng ? 2009-05-26?? 09:14 +0200?Allan CORNET??? > Hi, > > A example with string and double variables > > if haveacompiler() then > > chdir(TMPDIR); > src = ['#include ' > '#include ""stack-c.h""' > '#include ""sciprint.h""' > '#include ""Scierror.h""' > '' > 'static char *cvar = NULL;' > 'static int ivar = 0;' > 'int sci_cvar_set (char *fname)' > '{' > ' char *arg = NULL;' > ' int m1 = 0 ;' > ' int n1 = 0 ;' > ' int l1 = 0 ;' > > ' if (GetType(1) == sci_strings)' > ' {' > ' GetRhsVar(1,STRING_DATATYPE ,&m1,&n1,&l1);' > ' cvar = strdup(cstk(l1));' > ' }' > ' else if (GetType(1) == sci_matrix)' > ' {' > ' GetRhsVar(1,MATRIX_OF_DOUBLE_DATATYPE ,&m1,&n1,&l1);' > ' ivar = (int)*stk(l1);' > ' }' > ' else' > ' {' > ' Scierror(999,""error ...\n"");' > ' }' > '' > ' return 0;' > '} ' > '' > 'int sci_cvar_get (char *fname)' > '{' > '' > ' if (GetType(1) == sci_strings)' > ' {' > ' int m1 = 0, n1 = 0, l1 = 0;' > ' int m = 1, n = 0, l = 0;' > '' > ' GetRhsVar(1,STRING_DATATYPE ,&m1,&n1,&l1);' > ' if (strcmp(cstk(l1),""string"") == 0)' > ' {' > ' m = 1;' > '' > ' if (cvar) n = (int)strlen(cvar);' > ' else n = (int)strlen("""");' > '' > ' CreateVar(Rhs+1,STRING_DATATYPE ,&m,&n,&l); ' > ' if (cvar) strcpy(cstk(l),cvar);' > ' else strcpy(cstk(l),"""");' > ' }' > ' else' > ' if (strcmp(cstk(l1),""number"") == 0)' > ' {' > ' m = 1;' > ' n = 1;' > ' CreateVar(Rhs+1,MATRIX_OF_DOUBLE_DATATYPE ,&m,&n,&l); ' > ' *stk(l) = (double)ivar;' > ' }' > ' else' > ' {' > ' Scierror(999,""error ...\n"");' > ' return 0;' > ' }' > ' LhsVar(1) = Rhs+1;' > ' }' > ' else' > ' {' > ' Scierror(999,""error ...\n"");' > ' }' > ' return 0;' > '}' > ]; > mputl(src,'example_cvar.c'); > files=['example_cvar.c']; > ilib_build('addinter',['cvar_get','sci_cvar_get';'cvar_set','sci_cvar_set'], > files,[]); > exec loader.sce; > cvar_set(33) > cvar_set('my string') > cvar_get('string') > cvar_get('number') > end > > Allan > > > -----Message d'origine----- > De : sploving [mailto:sploving1 at 163.com] > Envoy? : mardi 26 mai 2009 06:41 > ? : dev at lists.scilab.org > Objet : [Scilab-Dev] quetion > > hi all, > > I want to wrap a C variable for scialb. and my wrapper is as follows: > > extern char cvar; > > int _wrap_cvar_set (char *fname){ > char arg1 ; > int m1 ; > int n1 ; > int l1 ; > > { > GetRhsVar(1,STRING_DATATYPEE ,&m1,&n1,&l1); > arg1=(char)(*stk(l1)); > } > cvar = arg1; > > return 0; > } > > > int _wrap_cvar_get (char *fname){ > char result; > int m ; > int n ; > int l ; > > result = (char)cvar; > { > m=1,n=1; > CreateVar(Rhs+1,STRING_DATATYPE ,&m,&n,&l); > *stk(l)=result; > LhsVar(1)=Rhs+1; > } > return 0; > } > > It could not work. Then I use the "MATRIX_OF_STRING_DATATYPE" , it does > not work either. At last I use the "MATRIX_OF_DOUBLE_DATATYPE", it > works. But it could not set a char to cvar, as follows: > > -->cvar_set(3) > > -->cvar_get() > ans = > > 3. > > -->cvar_set("b") > !--error 246 > > What is the matter? Thanks for any reply. > > > Baozeng > > > > > > > > From vincent.lejeune at institutoptique.fr Fri May 29 14:14:49 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Fri, 29 May 2009 14:14:49 +0200 Subject: Overloading Scilab functions Message-ID: <02301B7BF01B4EB6AF0236E4418D05DE@VLJMAISON> Hi, I wanted to know if it was possible to overload operator in SciLab, eg +, *, .*, \, .\ ... and where I can find some sample of this feature in Scilab sources. For now, I use function like gpuAdd, gpuMult... on my custom gpuMatrix type, but I think it could be better if the enduser had only to write "C=A+B" instead of "C=gpuAdd(A,B)". Thank, Vincent. -------------- next part -------------- An HTML attachment was scrubbed... URL: From BlanchardJ at ieee.org Fri May 29 14:35:46 2009 From: BlanchardJ at ieee.org (Jonathan Blanchard) Date: Fri, 29 May 2009 09:35:46 -0300 Subject: [Scilab-Dev] Overloading Scilab functions In-Reply-To: <02301B7BF01B4EB6AF0236E4418D05DE@VLJMAISON> References: <02301B7BF01B4EB6AF0236E4418D05DE@VLJMAISON> Message-ID: Hi, It's actually quite easy. But first you need to have a new type using a TYPED_LIST_DATATYPE or a MATRIX_ORIENTED_TYPED_LIST_DATATYPE. The first variable in those list can be used to defined the name of a new type. So assuming that I used a type named MY_TYPE I can overload the + operators like this function x = %MY_TYPE_a_MY_TYPE(a,b) x = my_add( a, b ); endfunction This macro can be run in a toolbox init script. It is also possible to over cross-typed operators like this : function x = %s_a_My_TYPE(a,b) x = my_add( b, a ); endfunction More info can be found in the scilab help with keyword overloading. Jonathan Blanchard On Fri, May 29, 2009 at 9:14 AM, Vincent Lejeune wrote: > Hi, > > I wanted to know if it was possible to overload operator in SciLab, eg +, > *,? .*, \, .\ ... and where I can find some sample of this feature in Scilab > sources. > For now, I use function like gpuAdd, gpuMult... on my custom gpuMatrix type, > but I think it could be better if the enduser had only to write "C=A+B" > instead of "C=gpuAdd(A,B)". > > Thank, Vincent. From ycollet at freesurf.fr Sat May 30 10:21:55 2009 From: ycollet at freesurf.fr (Collette Yann) Date: Sat, 30 May 2009 10:21:55 +0200 Subject: HDF compilation problem Message-ID: <4A20ECA3.4090509@freesurf.fr> Hello, I have some problems compiling the current master. This is due to hdf. First, under mandriva 2009.1 64 bits, the version of hdf is 1.8.1. In libhdf , the H5Dopen symbol doesn't exist. I found H5Dopen1 and H5Dopen2. So I modified the configure script to detect H5Dopen1. Once this is done, the configure script goes without problems. During compilation, here is what I have: gcc -DHAVE_CONFIG_H -I. -I../../modules/core/includes -I./includes/ -I./src/c/ -I../../libs/MALLOC/includes/ -I../../modules/output_stream/includes -I../../modules/io/includes -I../../modules/string/includes -I../../modules/localization/includes -I/usr/lib/openmpi/include -g -O2 -pipe -Wformat -Wshadow -Wfloat-equal -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-noreturn -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wwrite-strings -Winline -Wredundant-decls -Wall -Wchar-subscripts -Wextra -Wuninitialized -Wno-format-y2k -Wmissing-format-attribute -Wno-missing-field-initializers -Wno-strict-aliasing -Wold-style-definition -g3 -fdiagnostics-show-option -Werror=format-security -fno-stack-protector -DNARROWPROTO -m64 -I../../modules/core/includes/ -I../../libs/MALLOC/includes/ -I../../modules/localization/includes/ -MT libscifileio_la-h5_writeDataToFile.lo -MD -MP -MF .deps/libscifileio_la-h5_writeDataToFile.Tpo -c src/c/h5_writeDataToFile.c -fPIC -DPIC -o .libs/libscifileio_la-h5_writeDataToFile.o src/c/h5_writeDataToFile.c: In function ?addAttribute?: src/c/h5_writeDataToFile.c:38: attention : implicit declaration of function ?strlen? [-Wimplicit-function-declaration] src/c/h5_writeDataToFile.c:38: attention : incompatible implicit declaration of built-in function ?strlen? src/c/h5_writeDataToFile.c:42: erreur: too few arguments to function ?H5Acreate2? src/c/h5_writeDataToFile.c: In function ?writeString?: src/c/h5_writeDataToFile.c:67: attention : incompatible implicit declaration of built-in function ?strlen? src/c/h5_writeDataToFile.c:72: erreur: too few arguments to function ?H5Dcreate2? src/c/h5_writeDataToFile.c:78: attention : passing argument 2 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:78: attention : passing argument 3 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c: In function ?writeStringMatrix?: src/c/h5_writeDataToFile.c:95: attention : incompatible implicit declaration of built-in function ?strlen? src/c/h5_writeDataToFile.c:110: erreur: too few arguments to function ?H5Gcreate2? src/c/h5_writeDataToFile.c:120: attention : implicit declaration of function ?log10? [-Wimplicit-function-declaration] src/c/h5_writeDataToFile.c:120: attention : incompatible implicit declaration of built-in function ?log10? src/c/h5_writeDataToFile.c:120: attention : cast from function call of type ?double? to non-matching type ?int? [-Wbad-function-cast] src/c/h5_writeDataToFile.c:148: erreur: too few arguments to function ?H5Dcreate2? src/c/h5_writeDataToFile.c:155: attention : passing argument 2 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:155: attention : passing argument 3 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:92: attention : unused variable ?memtype? [-Wunused-variable] src/c/h5_writeDataToFile.c:92: attention : unused variable ?filetype? [-Wunused-variable] src/c/h5_writeDataToFile.c: In function ?writeDoubleMatrix?: src/c/h5_writeDataToFile.c:196: erreur: too few arguments to function ?H5Dcreate2? src/c/h5_writeDataToFile.c:203: attention : passing argument 2 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:203: attention : passing argument 3 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:173: attention : unused variable ?memtype? [-Wunused-variable] src/c/h5_writeDataToFile.c:173: attention : unused variable ?filetype? [-Wunused-variable] make[2]: *** [libscifileio_la-h5_writeDataToFile.lo] Erreur 1 make[2]: quittant le r?pertoire ? /home/collette/scilab-dev/master/scilab/modules/fileio ? make[1]: *** [all-recursive] Erreur 1 make[1]: quittant le r?pertoire ? /home/collette/scilab-dev/master/scilab/modules? make: *** [all-recursive] Erreur 1 YC From ycollette at free.fr Sat May 30 09:32:17 2009 From: ycollette at free.fr (Collette Yann) Date: Sat, 30 May 2009 09:32:17 +0200 Subject: HDF compilation problem Message-ID: <4A20E101.5010507@free.fr> Hello, I have some problems compiling the current master. This is due to hdf. First, under mandriva 2009.1 64 bits, the version of hdf is 1.8.1. In libhdf , the H5Dopen symbol doesn't exist. I found H5Dopen1 and H5Dopen2. So I modified the configure script to detect H5Dopen1. Once this is done, the configure script goes without problems. During compilation, here is what I have: gcc -DHAVE_CONFIG_H -I. -I../../modules/core/includes -I./includes/ -I./src/c/ -I../../libs/MALLOC/includes/ -I../../modules/output_stream/includes -I../../modules/io/includes -I../../modules/string/includes -I../../modules/localization/includes -I/usr/lib/openmpi/include -g -O2 -pipe -Wformat -Wshadow -Wfloat-equal -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-noreturn -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wwrite-strings -Winline -Wredundant-decls -Wall -Wchar-subscripts -Wextra -Wuninitialized -Wno-format-y2k -Wmissing-format-attribute -Wno-missing-field-initializers -Wno-strict-aliasing -Wold-style-definition -g3 -fdiagnostics-show-option -Werror=format-security -fno-stack-protector -DNARROWPROTO -m64 -I../../modules/core/includes/ -I../../libs/MALLOC/includes/ -I../../modules/localization/includes/ -MT libscifileio_la-h5_writeDataToFile.lo -MD -MP -MF .deps/libscifileio_la-h5_writeDataToFile.Tpo -c src/c/h5_writeDataToFile.c -fPIC -DPIC -o .libs/libscifileio_la-h5_writeDataToFile.o src/c/h5_writeDataToFile.c: In function ?addAttribute?: src/c/h5_writeDataToFile.c:38: attention : implicit declaration of function ?strlen? [-Wimplicit-function-declaration] src/c/h5_writeDataToFile.c:38: attention : incompatible implicit declaration of built-in function ?strlen? src/c/h5_writeDataToFile.c:42: erreur: too few arguments to function ?H5Acreate2? src/c/h5_writeDataToFile.c: In function ?writeString?: src/c/h5_writeDataToFile.c:67: attention : incompatible implicit declaration of built-in function ?strlen? src/c/h5_writeDataToFile.c:72: erreur: too few arguments to function ?H5Dcreate2? src/c/h5_writeDataToFile.c:78: attention : passing argument 2 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:78: attention : passing argument 3 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c: In function ?writeStringMatrix?: src/c/h5_writeDataToFile.c:95: attention : incompatible implicit declaration of built-in function ?strlen? src/c/h5_writeDataToFile.c:110: erreur: too few arguments to function ?H5Gcreate2? src/c/h5_writeDataToFile.c:120: attention : implicit declaration of function ?log10? [-Wimplicit-function-declaration] src/c/h5_writeDataToFile.c:120: attention : incompatible implicit declaration of built-in function ?log10? src/c/h5_writeDataToFile.c:120: attention : cast from function call of type ?double? to non-matching type ?int? [-Wbad-function-cast] src/c/h5_writeDataToFile.c:148: erreur: too few arguments to function ?H5Dcreate2? src/c/h5_writeDataToFile.c:155: attention : passing argument 2 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:155: attention : passing argument 3 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:92: attention : unused variable ?memtype? [-Wunused-variable] src/c/h5_writeDataToFile.c:92: attention : unused variable ?filetype? [-Wunused-variable] src/c/h5_writeDataToFile.c: In function ?writeDoubleMatrix?: src/c/h5_writeDataToFile.c:196: erreur: too few arguments to function ?H5Dcreate2? src/c/h5_writeDataToFile.c:203: attention : passing argument 2 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:203: attention : passing argument 3 of ?addAttribute? discards qualifiers from pointer target type src/c/h5_writeDataToFile.c:173: attention : unused variable ?memtype? [-Wunused-variable] src/c/h5_writeDataToFile.c:173: attention : unused variable ?filetype? [-Wunused-variable] make[2]: *** [libscifileio_la-h5_writeDataToFile.lo] Erreur 1 make[2]: quittant le r?pertoire ? /home/collette/scilab-dev/master/scilab/modules/fileio ? make[1]: *** [all-recursive] Erreur 1 make[1]: quittant le r?pertoire ? /home/collette/scilab-dev/master/scilab/modules? make: *** [all-recursive] Erreur 1 YC From vincent.lejeune at institutoptique.fr Sat May 30 20:23:48 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Sat, 30 May 2009 20:23:48 +0200 Subject: How to make SciLab aware of a module at startup ? Message-ID: <22D6EE2783C84446B6CAA7C24FC7219D@VLJMAISON> Hi, I used the toolbox_skeleton to make my toolbox until now, but I would like to integrate it into my current SciLab installation. I used the build and loader scripts shipped inside the toolbox_skeleton, but they are not summoned at scilab startup, I must "exec" them manually. I put my toolbox in my "module" directory, but I think I must tell somehow SciLab to seek for loading script at startup inside the directory tree of my toolbox somehow. I dont know how to do this, as it seems that the process described here : http://wiki.scilab.org/Scilab_Module_Architecture need to re-compile SciLab to enable the module... At the installation process, it's possible to select which module the enduser wants to install, without any recompilation on the fly, so there must be a not hardcoded way to make my toolbox recognisable by SciLab... Thank, Vincent. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ycollet at freesurf.fr Sat May 30 20:51:55 2009 From: ycollet at freesurf.fr (Collette Yann) Date: Sat, 30 May 2009 20:51:55 +0200 Subject: [Scilab-Dev] How to make SciLab aware of a module at startup ? In-Reply-To: <22D6EE2783C84446B6CAA7C24FC7219D@VLJMAISON> References: <22D6EE2783C84446B6CAA7C24FC7219D@VLJMAISON> Message-ID: <4A21804B.5030203@freesurf.fr> Vincent Lejeune a ?crit : > Hi, > > I used the toolbox_skeleton to make my toolbox until now, but I would > like to integrate it into my current SciLab installation. > I used the build and loader scripts shipped inside the > toolbox_skeleton, but they are not summoned at scilab startup, I must > "exec" them manually. > I put my toolbox in my "module" directory, but I think I must tell > somehow SciLab to seek for loading script at startup inside the > directory tree of my toolbox somehow. I dont know how to do this, as > it seems that the process described here : > http://wiki.scilab.org/Scilab_Module_Architecture > need to re-compile SciLab to enable the module... > At the installation process, it's possible to select which module the > enduser wants to install, without any recompilation on the fly, so > there must be a not hardcoded way to make my toolbox recognisable by > SciLab... > > Thank, Vincent. What about adding your commands (exec loader.sce) in a file scilab.ini in SCIHOME ? This file (scilab.ini) is detected at startup. If it is found, the it is executed. You can also add your toolbox in the contrib directory: In SCI/contrib, scilab.start tries to find loader.sce and if it finds it, it launches it. So, add the commands necessary to launch your modules in this loader. SCI = SCILAB_INSTALL_DIR/share/scilab/ YC From vincent.lejeune at institutoptique.fr Sat May 30 23:53:39 2009 From: vincent.lejeune at institutoptique.fr (Vincent Lejeune) Date: Sat, 30 May 2009 23:53:39 +0200 Subject: Issue with the Stack in Linux Message-ID: <200905302353.39964.vincent.lejeune@institutoptique.fr> Hi, I'm trying to make my toolbox running on Kubuntu 9.04 (Jaunty 64bits), and I'm facing a issue with the management of SCILAB_POINTER_DATATYPE. It seems that the pointer is not recorded into the stack : when I'm tryng to get it back, I only get a NULL pointer, according to gdb and several sciprint in my code. I'm using CreateListVarFromPtr and GetListRhsVar to put and retrieve the pointer. It works on my Windows Vista 32 bits, however, so I suspected an issue with pointer size : I changed (unsigned long) cast to (intptr_t), but it didnt change anything. gMatrix is an alias to a pointer. I've attached my gatewayfunctions in sci_togpu.c, the header file cuLU.h (needed for compilation), and libcuLU.so, the library generated by my /src (with -g flags, so it holds debugging symbol) in order to make the problem reproduceable if necessary. I think that I'm just misusing the stk() function with 64bits code... -------------- next part -------------- A non-text attachment was scrubbed... Name: sci_toGPU.c Type: text/x-csrc Size: 3640 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: libcuLU.so Type: application/x-sharedlib Size: 335377 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cuLU.h Type: text/x-chdr Size: 725 bytes Desc: not available URL: