[SimGrid-user] segmentation fault in replay_multiple

yao hu huyao0107 at gmail.com
Sat Nov 17 10:36:31 CET 2018


Hi Augustin,

My fault...
I just changed my computer. For this machine, simgrid3.21 is installed in
/opt/simgrid3.21. I already specified the path to mpi.h and simgrid/msg.h,
but it still does not work due to a lot of undefined references.
(mpi.h is in /opt/simgrid3.21/include/smpi and simgrid/msg.h is in
/opt/simgrid3.21/include)

Thanks a lot.

$ gcc replay_multiple.c -o replay_multiple -I/opt/simgrid3.21/include
-I/opt/simgrid3.21/include/smpi
/tmp/cc00GQcr.o: In function
`_simgrid_log_category__msg_test__constructor__':
replay_multiple.c:(.text+0x19): undefined reference to `_xbt_log_cat_init'
/tmp/cc00GQcr.o: In function `smpi_replay':
replay_multiple.c:(.text+0x3e): undefined reference to `smpi_replay_run'
/tmp/cc00GQcr.o: In function `main':
replay_multiple.c:(.text+0x80): undefined reference to `sg_version_check'
replay_multiple.c:(.text+0x99): undefined reference to `MSG_init_nocheck'
replay_multiple.c:(.text+0xa3): undefined reference to `SMPI_init'
replay_multiple.c:(.text+0xb8): undefined reference to
`_simgrid_log_category__root'
replay_multiple.c:(.text+0xc6): undefined reference to
`_simgrid_log_category__root'
replay_multiple.c:(.text+0xcb): undefined reference to `_xbt_log_cat_init'
replay_multiple.c:(.text+0xd5): undefined reference to
`_simgrid_log_category__root'
replay_multiple.c:(.text+0xe5): undefined reference to
`_simgrid_log_category__root'
replay_multiple.c:(.text+0x13c): undefined reference to `_xbt_log_event_log'
replay_multiple.c:(.text+0x142): undefined reference to `xbt_log_no_loc'
replay_multiple.c:(.text+0x150): undefined reference to
`xbt_backtrace_display_current'
replay_multiple.c:(.text+0x16b): undefined reference to
`MSG_create_environment'
replay_multiple.c:(.text+0x1a1): undefined reference to
`_simgrid_log_category__xbt'
replay_multiple.c:(.text+0x1af): undefined reference to
`_simgrid_log_category__xbt'
replay_multiple.c:(.text+0x1b4): undefined reference to `_xbt_log_cat_init'
replay_multiple.c:(.text+0x1be): undefined reference to
`_simgrid_log_category__xbt'
replay_multiple.c:(.text+0x1ce): undefined reference to
`_simgrid_log_category__xbt'
replay_multiple.c:(.text+0x21f): undefined reference to `_xbt_log_event_log'
replay_multiple.c:(.text+0x224): undefined reference to `xbt_abort'
replay_multiple.c:(.text+0x259): undefined reference to
`_simgrid_log_category__root'
replay_multiple.c:(.text+0x267): undefined reference to
`_simgrid_log_category__root'
replay_multiple.c:(.text+0x26c): undefined reference to `_xbt_log_cat_init'
replay_multiple.c:(.text+0x276): undefined reference to
`_simgrid_log_category__root'
replay_multiple.c:(.text+0x286): undefined reference to
`_simgrid_log_category__root'
replay_multiple.c:(.text+0x2d0): undefined reference to `_xbt_log_event_log'
replay_multiple.c:(.text+0x2d6): undefined reference to `xbt_log_no_loc'
replay_multiple.c:(.text+0x2e4): undefined reference to
`xbt_backtrace_display_current'
replay_multiple.c:(.text+0x2f8): undefined reference to
`xbt_str_split_quoted_in_place'
replay_multiple.c:(.text+0x30e): undefined reference to `xbt_dynar_length'
replay_multiple.c:(.text+0x31a): undefined reference to
`_simgrid_log_category__xbt'
replay_multiple.c:(.text+0x328): undefined reference to
`_simgrid_log_category__xbt'
replay_multiple.c:(.text+0x32d): undefined reference to `_xbt_log_cat_init'
replay_multiple.c:(.text+0x337): undefined reference to
`_simgrid_log_category__xbt'
replay_multiple.c:(.text+0x347): undefined reference to
`_simgrid_log_category__xbt'
replay_multiple.c:(.text+0x38a): undefined reference to `_xbt_log_event_log'
replay_multiple.c:(.text+0x38f): undefined reference to `xbt_abort'
replay_multiple.c:(.text+0x39e): undefined reference to `xbt_dynar_to_array'
replay_multiple.c:(.text+0x3d1): undefined reference to `xbt_str_parse_int'
replay_multiple.c:(.text+0x3f9): undefined reference to `_xbt_log_cat_init'
replay_multiple.c:(.text+0x46a): undefined reference to `_xbt_log_event_log'
replay_multiple.c:(.text+0x484): undefined reference to
`SMPI_app_instance_register'
replay_multiple.c:(.text+0x4dc): undefined reference to
`MSG_launch_application'
replay_multiple.c:(.text+0x4e6): undefined reference to `MSG_main'
replay_multiple.c:(.text+0x50e): undefined reference to `_xbt_log_cat_init'
replay_multiple.c:(.text+0x563): undefined reference to `MSG_get_clock'
replay_multiple.c:(.text+0x57c): undefined reference to `_xbt_log_event_log'
replay_multiple.c:(.text+0x586): undefined reference to `SMPI_finalize'
/tmp/cc00GQcr.o:(.data+0x0): undefined reference to
`_simgrid_log_category__root'
collect2: error: ld returned 1 exit status

2018年11月17日(土) 17:58 Augustin DEGOMME <adegomme at gmail.com>:

> Hi,
> it's -I with an i, not -l with an L for the include path.
> Best regards,
>
> Le sam. 17 nov. 2018 à 09:45, yao hu <huyao0107 at gmail.com> a écrit :
>
>> Hi Augustin,
>>
>> Thanks for your reply.
>> I am afraid there is no target for replay_multiple in Makefile.
>> When using gcc, it seems it still misses a path to mpi.h. Any workaround
>> for this? Thanks a lot.
>>
>> $ gcc replay_multiple.c -o replay_multiple -lsimgrid -l/usr/include/smpi
>> replay_multiple.c:8:10: fatal error: mpi.h: No such file or directory
>>  #include "mpi.h"
>>           ^~~~~~~
>> compilation terminated.
>>
>>
>>
>>
>> 2018年11月17日(土) 17:01 Augustin DEGOMME <adegomme at gmail.com>:
>>
>>> Hi,
>>> I think this example should not be compiled with smpicc, which is meant
>>> only for codes launched later by smpirun. It should be built with the rest
>>> of simgrid, and you can rebuild it with with "make replay_multiple" if
>>> needed, or by hand with gcc/clang/icc, using -lsimgrid and
>>> -I/path/to/simgrid/include/smpi.
>>> Best regards,
>>> Augustin
>>>
>>>
>>> Le sam. 17 nov. 2018 à 08:21, yao hu <huyao0107 at gmail.com> a écrit :
>>>
>>>> Hi,
>>>>
>>>> I intend to execute multiple applications on the same time.
>>>> I looked into the example of smpi/replay_multiple, however it crashes
>>>> after doing the following:
>>>>
>>>> $ smpicc -O3 replay_multiple.c -o replay_multiple
>>>> $ ./generate_multiple_deployment.sh -platform
>>>> ../../platforms/small_platform_with_routers.xml -hostfile ../hostfile
>>>> description_file deployment.xml
>>>> $ ./replay_multiple description_file
>>>> ../../platforms/small_platform_with_routers.xml deployment.xml
>>>> --log=smpi.:info --cfg=maxmin/concurrency-limit:100
>>>> Segmentation fault
>>>>
>>>> The description file and platform file are originally from the example
>>>> folder.
>>>> Is there something wrong with the setting? Thanks very much for your
>>>> help.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Simgrid-user mailing list
>>>> Simgrid-user at lists.gforge.inria.fr
>>>> https://lists.gforge.inria.fr/mailman/listinfo/simgrid-user
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/simgrid-user/attachments/20181117/c78e7c02/attachment-0001.html>


More information about the Simgrid-user mailing list