[ExM Users] mkstatic questions

Ketan Maheshwari ketan at mcs.anl.gov
Fri May 30 10:34:13 CDT 2014


Hi,

At runtime, on Cetus, I am getting the following:

Error while loading Tcl code originally from file
/home/ketan/rosetta/flexpep_docking/user-code.tcl:
Error while loading Tcl code originally from file
/home/ketan/rosetta/flexpep_docking/user-code.tcl:
Error executing compiled in main script (source
/home/ketan/rosetta/flexpep_docking/user-code.tcl): turbine error
TURBINE_ERROR_UNKNOWN (15)
Error executing compiled in main script (source
/home/ketan/rosetta/flexpep_docking/user-code.tcl): turbine error
TURBINE_ERROR_UNKNOWN (15)

My qsub line is as follows:

qsub --env BG_COREDUMPONEXIT=1:BG_SHAREDMEMSIZE=32MB -t 50 -n 3 --proccount
2 --mode c1 ./static_leaf_main

Any ideas on how I can further debug this or probable causes?

Thanks,
Ketan




On Thu, May 29, 2014 at 12:03 PM, Tim Armstrong <tim.g.armstrong at gmail.com>
wrote:

>  Yeah, with static linking it wants everything to be available as a .a
> archive.  It's a pain, since if you're static linking, everything needs to
> be static, but if you're using any dynamic linking, it defaults to using
> the .so and it's difficult to override.
>
>  - Tim
>
>
> On Thu, May 29, 2014 at 10:11 AM, Justin M Wozniak <wozniak at mcs.anl.gov>
> wrote:
>
>>
>> I just fixed the perms on libtclturbine.a
>>
>> For Tcl, there is currently no static archive in that directory- I will
>> try to make one.
>>
>> On 05/29/2014 09:59 AM, Ketan Maheshwari wrote:
>>
>> Thanks! Trying to link with the following:
>>
>>  /soft/compilers/wrappers/xl/mpixlcxx -o static_leaf_main
>> static_leaf_main.o /home/ketan/rosetta/flexpep_docking/leaf_main.a \
>>  -pg -qsmp=omp -g -O0 -qarch=qp -qtune=qp -qhot
>> -Wl,--allow-multiple-definition \
>>  /projects/ExM/ketan/openmp-gnu-july16-mini/build/src/debug/linux/2.6/64/ppc64/xlc/static-mpi/apps/public/flexpep_docking/FlexPepDocking.o
>> \
>>  -L$TCL_HOME/lib -L$TURBINE_HOME/lib
>> -L/projects/ExM/ketan/openmp-gnu-july16-mini/external/lib \
>>  -L/projects/ExM/ketan/openmp-gnu-july16-mini/build/src/debug/linux/2.6/64/ppc64/xlc/static-mpi
>> \
>>  -Lsrc
>> -L/projects/ExM/ketan/openmp-gnu-july16-mini/build/external/debug/linux/2.6/64/ppc64/xlc/static-mpi
>> \
>>  -Lexternal -L/home/vsachde/ROSETTA/zlib/lib -ldevel -lprotocols.7
>> -lprotocols.6 -lprotocols_f.5 -lprotocols_e.5 \
>>  -lprotocols_d.5 -lprotocols_c.5 -lprotocols_b.5 -lprotocols_a.5
>> -lprotocols_h.4 -lprotocols_g.4 -lprotocols_f.4 \
>>  -lprotocols_e.4 -lprotocols_d.4 -lprotocols_c.4 -lprotocols_b.4
>> -lprotocols_a.4 -lprotocols.3 -lprotocols_b.2 \
>>  -lprotocols_a.2 -lprotocols.1 -lcore.5 -lcore.4 -lcore.3 -lcore.2
>> -lcore.1 -lbasic -lnumeric -lutility -lObjexxFCL \
>>  -lz -lcppdb -lsqlite3 -lz -ltclstub8.5 -ltcl8.5 -ltclturbine
>> -ltclturbinestatic -ltclturbinestaticres
>>
>>  Getting the error message:
>>  /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/bin/ld: cannot
>> find -ltcl8.5
>> /bgsys/drivers/ppcfloor/gnu-linux/powerpc64-bgq-linux/bin/ld: cannot find
>> -ltclturbine
>>
>>
>>  $TCL_HOME is /home/wozniak/Public/sfw/ppc64/tcl-8.5.12
>> $TURBINE_HOME is /home/wozniak/Public/sfw/ppc64/turbine/lib
>>
>>  and the libs that ld is complaining about does seem to be available at
>> the above locations. Any suggestions?
>>
>>  Thanks,
>> Ketan
>>
>>
>> On Thu, May 29, 2014 at 9:09 AM, Tim Armstrong <tim.g.armstrong at gmail.com
>> > wrote:
>>
>>>
>>>  Forgot to send this to the list.
>>>
>>>
>>>  On Thu, May 29, 2014 at 8:06 AM, Tim Armstrong <
>>> tim.g.armstrong at gmail.com> wrote:
>>>
>>>>   Another thing I should mention is that you can source the
>>>> turbine-build-config,sh script under turbine to get many of the variables
>>>> you need e.g. install dirs, tcl version, linker flags.
>>>>
>>>>  - Tim
>>>>
>>>>
>>>>  On Wed, May 28, 2014 at 9:40 AM, Tim Armstrong <
>>>> tim.g.armstrong at gmail.com> wrote:
>>>>
>>>>>   main_script lets you specify the Tcl script that's run on
>>>>> application startup.  To run a compiled Swift program, you set main_script
>>>>> to point to the Tcl output file.  mkstatic.tcl doesn't need Swift source
>>>>> files.
>>>>>
>>>>>  Note that you only need to fill in the fields in the "Manifest info"
>>>>> section to generate the C main program.  You probably only need the follow
>>>>> to generate the C code:
>>>>>
>>>>> # Name and version of Tcl package
>>>>> pkg_name=flex_pep_docking_or_whatever
>>>>> pkg_version=0.0
>>>>>
>>>>> # C function names to initialise Tcl modules
>>>>> # These follow the Tcl naming convention, e.g., Userlib_Init
>>>>> # Use nm on your extension object code to find this symbol
>>>>> lib_init=_Z24FlexPepDocking_wrap_InitP10Tcl_Interp
>>>>>
>>>>> # lib scripts are executed in specified order, before main_script and
>>>>> # after lib_inits
>>>>> lib_script=../flexpep_docking/user-code.tcl
>>>>>
>>>>> # headers for user Tcl code, e.g. lib_init functions
>>>>> lib_include=../flexpep_docking/FlexPepDocking_wrap.h
>>>>>
>>>>> # main script (generated by STC).
>>>>> # If provided, always runs this main script.
>>>>> # Otherwise, the script file is specified at run time as the
>>>>> # first command line argument (like tclsh)
>>>>> main_script = stc_output_file.tcl
>>>>>
>>>>>
>>>>>  - Tim
>>>>>
>>>>>
>>>>>  On Wed, May 28, 2014 at 9:17 AM, Ketan Maheshwari <ketan at mcs.anl.gov>
>>>>> wrote:
>>>>>
>>>>>> Thanks. One more question:
>>>>>>
>>>>>>  I am not sure where should I provide the application source file in
>>>>>> the manifest files?
>>>>>>
>>>>>>  Thanks,
>>>>>> Ketan
>>>>>>
>>>>>>
>>>>>>  On Tue, May 27, 2014 at 2:14 PM, Tim Armstrong <
>>>>>> tim.g.armstrong at gmail.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>  On Tue, May 27, 2014 at 1:50 PM, Ketan Maheshwari <
>>>>>>> ketan at mcs.anl.gov> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>>  Trying to get the Rosetta application static build for Turbine
>>>>>>>> using mkstatic.tcl.
>>>>>>>>
>>>>>>>>  I am a bit confused about the entries in the manifest file:
>>>>>>>>
>>>>>>>>  1. The purpose of lib_script option is not very clear to me. What
>>>>>>>> scripts are supposed to go in there? The template lists user_stuff1.tcl,
>>>>>>>> user_stuff2.tcl.
>>>>>>>>
>>>>>>>>    Any Tcl scripts that you want to run when the library loads.
>>>>>>> E.g. if you set pkg_name=the_pkg and lib_script=the_pkg.tcl, then pkg.tcl
>>>>>>> will be included in the executable.  It's run when the Tcl user script does
>>>>>>> a "package require the_pkg".
>>>>>>>
>>>>>>>
>>>>>>>>  2. The lib_include entry: does it accept both include dirs and
>>>>>>>> header files?
>>>>>>>>
>>>>>>>  It has to be a header file - it will just add a #include at the
>>>>>>> top of the C main file.  You have to provide any include directory flags to
>>>>>>> the C compiler later when you compile it.
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>>  3. From the documentation
>>>>>>>> http://www.mcs.anl.gov/exm/local/guides/swift.html#mkstatic, I see
>>>>>>>> that there are options at commandline such as --include-lib and
>>>>>>>> --include-system-lib. Are these in lieu of the ones in the manifest?
>>>>>>>>
>>>>>>>  These let you link in entire library directories.
>>>>>>>
>>>>>>> --include-system-lib is for the Tcl standard library directory that
>>>>>>> is always loaded on startup - it links the files into the executable so
>>>>>>> that it doesn't need to load them off disk.  It's mainly for performance,
>>>>>>> but it can help build entirely self-contained executables.
>>>>>>>
>>>>>>>  --include-lib  lets you link in an external library, e.g. a
>>>>>>> directory of Tcl files, or a directory with a pkgIndex.tcl file.  These are
>>>>>>> set up to to be loaded on demand with "package require".  --include-lib
>>>>>>> <dir> is essentially an alternative to setting TURBINE_USER_LIB=<dir>.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>>  Thanks,
>>>>>>>> Ketan
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> ExM-user mailing list
>>>>>>>> ExM-user at lists.mcs.anl.gov
>>>>>>>> https://lists.mcs.anl.gov/mailman/listinfo/exm-user
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>>
>> _______________________________________________
>> ExM-user mailing listExM-user at lists.mcs.anl.govhttps://lists.mcs.anl.gov/mailman/listinfo/exm-user
>>
>>
>>   --
>> Justin M Wozniak
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/exm-user/attachments/20140530/d94727d5/attachment.html>


More information about the ExM-user mailing list