Hello Jeff Squyres, I’ m using: openmpi-1.10.2.tar.gz <https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-1.10.2.tar.gz>
The file first.c: #include "mpi.h" #include <stdio.h> #include <stdlib.h> #include <string.h> //#include <linux/types.h> #include "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/machine/types.h" //using namespace std; int main(int argc, char **argv ) { char text[20]; int myrank, size, sender=0, adressat=1, tag=99; MPI_Status status; MPI_Init( & argc, & argv ); MPI_Comm_rank(MPI_COMM_WORLD, & myrank); MPI_Comm_size(MPI_COMM_WORLD, & size); printf(" myrank = %d \n",myrank); printf(" size = %d \n", size); //printf("Hello, world! " // "from process %d of %d\n", myrank, size); if (size > 2 ) { printf("Beispiel für 2 Tasks \n"); MPI_Finalize(); exit(1); } if ( myrank == 0 ) { strcpy(text, "Hallo zusammen"); MPI_Send(text, strlen(text), MPI_CHAR, adressat, tag, MPI_COMM_WORLD); } else { MPI_Recv(text, 20, MPI_CHAR, sender, tag, MPI_COMM_WORLD, & status); printf("Task %d empfing: %s: \n", myrank, text); } MPI_Finalize(); return 0; } is working, but it is much simpler. On opensuse 13.2 second runs fine. Test second.c on your machine. I cannot debug it. Regards, Hans-Juergen Greif Hans-Jürgen Greif hans_juergen.gr...@kabelbw.de > Am 05.03.2016 um 16:54 schrieb Jeff Squyres (jsquyres) <jsquy...@cisco.com>: > > What version of Open MPI are you using? > > Can you send all the information listed here: > > https://www.open-mpi.org/community/help/ > > >> On Mar 5, 2016, at 5:35 AM, Hans-Jürgen Greif >> <hans_juergen.gr...@kabelbw.de> wrote: >> >> >> >> >> Hello, >> >> on mac os 10.11.3 I have found an error: >> >> mpirun -np 2 valgrind ./second >> ==612== Memcheck, a memory error detector >> ==612== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. >> ==612== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info >> ==612== Command: ./second >> ==612== >> ==611== Memcheck, a memory error detector >> ==611== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. >> ==611== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info >> ==611== Command: ./second >> ==611== >> --612-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option >> --611-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option >> --612-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 >> times) >> --611-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 >> times) >> --611-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 >> times) >> --612-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4 >> times) >> --611-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 8 >> times) >> --612-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 8 >> times) >> ==612== Conditional jump or move depends on uninitialised value(s) >> ==611== Conditional jump or move depends on uninitialised value(s) >> ==611== at 0x100000BED: main (second.c:39) >> ==611== >> ==612== at 0x100000D1C: main (second.c:60) >> ==612== >> ==611== Conditional jump or move depends on uninitialised value(s) >> ==611== at 0x100060781: MPI_Win_post (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x100000C69: main (second.c:43) >> ==611== >> ==611== Conditional jump or move depends on uninitialised value(s) >> ==611== at 0x100413E98: __ultoa (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x10041136C: __vfprintf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x1004396C8: __v2printf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x10040EF51: _vasprintf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x1001C379E: opal_show_help_vstring (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x100128231: orte_show_help (in >> /usr/local/openmpi/lib/libopen-rte.12.dylib) >> ==611== by 0x10002069E: backend_fatal (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000203EC: ompi_mpi_errors_are_fatal_comm_handler (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000201BD: ompi_errhandler_invoke (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x100000C69: main (second.c:43) >> ==611== >> ==611== Conditional jump or move depends on uninitialised value(s) >> ==611== at 0x100413F06: __ultoa (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x10041136C: __vfprintf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x1004396C8: __v2printf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x10040EF51: _vasprintf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x1001C379E: opal_show_help_vstring (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x100128231: orte_show_help (in >> /usr/local/openmpi/lib/libopen-rte.12.dylib) >> ==611== by 0x10002069E: backend_fatal (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000203EC: ompi_mpi_errors_are_fatal_comm_handler (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000201BD: ompi_errhandler_invoke (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x100000C69: main (second.c:43) >> ==611== >> ==611== Conditional jump or move depends on uninitialised value(s) >> ==611== at 0x100413F71: __ultoa (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x10041136C: __vfprintf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x1004396C8: __v2printf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x10040EF51: _vasprintf (in /usr/lib/system/libsystem_c.dylib) >> ==611== by 0x1001C379E: opal_show_help_vstring (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x100128231: orte_show_help (in >> /usr/local/openmpi/lib/libopen-rte.12.dylib) >> ==611== by 0x10002069E: backend_fatal (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000203EC: ompi_mpi_errors_are_fatal_comm_handler (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000201BD: ompi_errhandler_invoke (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x100000C69: main (second.c:43) >> ==611== >> ==611== Conditional jump or move depends on uninitialised value(s) >> ==611== at 0x10000B359: strlen (vg_replace_strmem.c:470) >> ==611== by 0x10019922D: opal_dss_pack_string (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x100198CFD: opal_dss_pack (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x100128633: orte_show_help_norender (in >> /usr/local/openmpi/lib/libopen-rte.12.dylib) >> ==611== by 0x100128249: orte_show_help (in >> /usr/local/openmpi/lib/libopen-rte.12.dylib) >> ==611== by 0x10002069E: backend_fatal (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000203EC: ompi_mpi_errors_are_fatal_comm_handler (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000201BD: ompi_errhandler_invoke (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x100000C69: main (second.c:43) >> ==611== >> ==611== Thread 2: >> ==611== Syscall param write(buf) points to uninitialised byte(s) >> ==611== at 0x10051C9FE: write (in /usr/lib/system/libsystem_kernel.dylib) >> ==611== by 0x1012C9926: send_bytes (in >> /usr/local/openmpi/lib/openmpi/mca_oob_tcp.so) >> ==611== by 0x1012C916F: mca_oob_tcp_send_handler (in >> /usr/local/openmpi/lib/openmpi/mca_oob_tcp.so) >> ==611== by 0x1001CDC10: opal_libevent2021_event_base_loop (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x10013BC6C: orte_progress_thread_engine (in >> /usr/local/openmpi/lib/libopen-rte.12.dylib) >> ==611== by 0x10066CC12: _pthread_body (in >> /usr/lib/system/libsystem_pthread.dylib) >> ==611== by 0x10066CB8F: _pthread_start (in >> /usr/lib/system/libsystem_pthread.dylib) >> ==611== by 0x10066A374: thread_start (in >> /usr/lib/system/libsystem_pthread.dylib) >> ==611== Address 0x101c7f7cd is 157 bytes inside a block of size 512 alloc'd >> ==611== at 0x100009D5A: realloc (vg_replace_malloc.c:789) >> ==611== by 0x100197E32: opal_dss_buffer_extend (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x10019926B: opal_dss_pack_string (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x100198CFD: opal_dss_pack (in >> /usr/local/openmpi/lib/libopen-pal.13.dylib) >> ==611== by 0x100128633: orte_show_help_norender (in >> /usr/local/openmpi/lib/libopen-rte.12.dylib) >> ==611== by 0x100128249: orte_show_help (in >> /usr/local/openmpi/lib/libopen-rte.12.dylib) >> ==611== by 0x10002069E: backend_fatal (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000203EC: ompi_mpi_errors_are_fatal_comm_handler (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x1000201BD: ompi_errhandler_invoke (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==611== by 0x100000C69: main (second.c:43) >> ==611== >> [alpha:611] *** An error occurred in MPI_Win_post >> [alpha:611] *** reported by process [122543980675073,1095216660480] >> [alpha:611] *** on communicator MPI_COMM_WORLD >> [alpha:611] *** MPI_ERR_WIN: invalid window >> [alpha:611] *** MPI_ERRORS_ARE_FATAL (processes in this communicator will >> now abort, >> [alpha:611] *** and potentially your MPI job) >> --611:0:schedule VG_(sema_down): read returned -4 >> ==611== >> ==611== HEAP SUMMARY: >> ==611== in use at exit: 2,644,595 bytes in 7,919 blocks >> ==611== total heap usage: 13,035 allocs, 5,116 frees, 3,399,345 bytes >> allocated >> ==611== >> ==611== LEAK SUMMARY: >> ==611== definitely lost: 680 bytes in 16 blocks >> ==611== indirectly lost: 24 bytes in 1 blocks >> ==611== possibly lost: 0 bytes in 0 blocks >> ==611== still reachable: 2,621,733 bytes in 7,710 blocks >> ==611== suppressed: 22,158 bytes in 192 blocks >> ==611== Rerun with --leak-check=full to see details of leaked memory >> ==611== >> ==611== For counts of detected and suppressed errors, rerun with: -v >> ==611== Use --track-origins=yes to see where uninitialised values come from >> ==611== ERROR SUMMARY: 75 errors from 7 contexts (suppressed: 0 from 0) >> ==612== >> ==612== Process terminating with default action of signal 15 (SIGTERM) >> ==612== at 0x10002E490: ompi_request_default_wait_all (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==612== by 0x101446397: ompi_coll_tuned_allreduce_intra_recursivedoubling >> (in /usr/local/openmpi/lib/openmpi/mca_coll_tuned.so) >> ==612== by 0x10001CA18: ompi_comm_allreduce_intra (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==612== by 0x10001C829: ompi_comm_nextcid (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==612== by 0x10001B55E: ompi_comm_dup_with_info (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==612== by 0x10140B8B1: component_select (in >> /usr/local/openmpi/lib/openmpi/mca_osc_pt2pt.so) >> ==612== by 0x100032FE5: ompi_win_create (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==612== by 0x10005F1FF: MPI_Win_create (in >> /usr/local/openmpi/lib/libmpi.12.dylib) >> ==612== by 0x100000D75: main (second.c:62) >> ==612== >> ==612== HEAP SUMMARY: >> ==612== in use at exit: 2,589,509 bytes in 7,918 blocks >> ==612== total heap usage: 12,962 allocs, 5,044 frees, 3,252,656 bytes >> allocated >> ==612== >> ==612== LEAK SUMMARY: >> ==612== definitely lost: 210,011 bytes in 92 blocks >> ==612== indirectly lost: 279,210 bytes in 6,023 blocks >> ==612== possibly lost: 53,392 bytes in 9 blocks >> ==612== still reachable: 2,024,738 bytes in 1,602 blocks >> ==612== suppressed: 22,158 bytes in 192 blocks >> ==612== Rerun with --leak-check=full to see details of leaked memory >> ==612== >> ==612== For counts of detected and suppressed errors, rerun with: -v >> ==612== Use --track-origins=yes to see where uninitialised values come from >> ==612== ERROR SUMMARY: 14 errors from 1 contexts (suppressed: 0 from 0) >> >> The program second.c runs well on opensuse 13.3. >> >> <second.c> >> >> Hans-Jürgen Greif >> >> hans_juergen.gr...@kabelbw.de >> >> >> >> >> _______________________________________________ >> users mailing list >> us...@open-mpi.org >> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users >> Link to this post: >> http://www.open-mpi.org/community/lists/users/2016/03/28638.php > > > -- > Jeff Squyres > jsquy...@cisco.com > For corporate legal information go to: > http://www.cisco.com/web/about/doing_business/legal/cri/ > > _______________________________________________ > users mailing list > us...@open-mpi.org > Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/users > Link to this post: > http://www.open-mpi.org/community/lists/users/2016/03/28640.php