public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* OpenMPI Problem
@ 2016-12-18 14:56 Bahadır Öncel
  2016-12-18 17:52 ` cyg Simple
  2016-12-19  6:58 ` Marco Atzeri
  0 siblings, 2 replies; 4+ messages in thread
From: Bahadır Öncel @ 2016-12-18 14:56 UTC (permalink / raw)
  To: cygwin

Hello all!
I've installed cygwin and openmpi successfully. I can compile and run
mpi programs. Twist is, even the openmpi test program hello_c.c approx
takes a minute to run. When I try in my virtual machine (linux) the
same program takes less than a second to run.
I've found that other users asked the same question but did not find
any solution.
Thanks in advance.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OpenMPI Problem
  2016-12-18 14:56 OpenMPI Problem Bahadır Öncel
@ 2016-12-18 17:52 ` cyg Simple
  2016-12-19  6:58 ` Marco Atzeri
  1 sibling, 0 replies; 4+ messages in thread
From: cyg Simple @ 2016-12-18 17:52 UTC (permalink / raw)
  To: cygwin

On 12/18/2016 9:55 AM, Bahadır Öncel wrote:
> Hello all!
> I've installed cygwin and openmpi successfully. I can compile and run
> mpi programs. Twist is, even the openmpi test program hello_c.c approx
> takes a minute to run. When I try in my virtual machine (linux) the
> same program takes less than a second to run.
> I've found that other users asked the same question but did not find
> any solution.

Windows itself is inherently slow.  Adding in the emulation layer slows
it even more.  So if you want to port the compiler to Windows native you
may find a bit faster execution but that may be debatable.

> Problem reports:       http://cygwin.com/problems.html
Use the above when reporting issues, even in a question.

> FAQ:                   http://cygwin.com/faq/
Since speed of execution is a frequently asked question, you might find
some tidbits in the FAQ.

And don't forget about BLODA issues.

-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OpenMPI Problem
  2016-12-18 14:56 OpenMPI Problem Bahadır Öncel
  2016-12-18 17:52 ` cyg Simple
@ 2016-12-19  6:58 ` Marco Atzeri
  2016-12-19  9:58   ` Marco Atzeri
  1 sibling, 1 reply; 4+ messages in thread
From: Marco Atzeri @ 2016-12-19  6:58 UTC (permalink / raw)
  To: cygwin

On 18/12/2016 15:55, Bahadır Öncel wrote:
> Hello all!
> I've installed cygwin and openmpi successfully. I can compile and run
> mpi programs. Twist is, even the openmpi test program hello_c.c approx
> takes a minute to run. When I try in my virtual machine (linux) the
> same program takes less than a second to run.
> I've found that other users asked the same question but did not find
> any solution.
> Thanks in advance.
>
> --

the most likely issue is a network interface timeout.
Try disabling WIFI network or VPN interface as test.

Regards
Marco


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: OpenMPI Problem
  2016-12-19  6:58 ` Marco Atzeri
@ 2016-12-19  9:58   ` Marco Atzeri
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Atzeri @ 2016-12-19  9:58 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]

On 19/12/2016 07:58, Marco Atzeri wrote:
> On 18/12/2016 15:55, Bahadır Öncel wrote:
>> Hello all!
>> I've installed cygwin and openmpi successfully. I can compile and run
>> mpi programs. Twist is, even the openmpi test program hello_c.c approx
>> takes a minute to run. When I try in my virtual machine (linux) the
>> same program takes less than a second to run.
>> I've found that other users asked the same question but did not find
>> any solution.
>> Thanks in advance.
>>
>> --
>
> the most likely issue is a network interface timeout.
> Try disabling WIFI network or VPN interface as test.
>
> Regards
> Marco
>

Hi Bahadır,
this is the normal behaviour of the hello_c run on my machine.

$ time mpirun -n 2 ./hello_c.exe
Hello, world, I am 0 of 2, (Open MPI v1.10.4, package: Open MPI , ident: 
1.10.4, repo rev: v1.10.3-45-gaafbd34, Sep 01, 2016, 129)
Hello, world, I am 1 of 2, (Open MPI v1.10.4, package: Open MPI , ident: 
1.10.4, repo rev: v1.10.3-45-gaafbd34, Sep 01, 2016, 129)

real    0m3.428s
user    0m1.293s
sys     0m2.930s

The timing should be in the second range.


Attached a program that will allow you to identify all the
network interfaces as seen by Cygwin with their Windows name.

$ gcc -o get-interface get-interface.c

$ ./get-interface
internal_name:  {EC2ABB5C-42A8-431D-A133-8F4BE0F309AF}
  flags:         AF_INET6 up multicast
  address:       fe80::a479:1393:b7d0:fb25%18
  friendly_name: Local Area Connection 2

internal_name:  {EC2ABB5C-42A8-431D-A133-8F4BE0F309AF}
  flags:         AF_INET  up broadcast multicast
  address:       169.254.251.37
  friendly_name: Local Area Connection 2
...and so on.



[-- Attachment #2: get-interface.c --]
[-- Type: text/plain, Size: 2969 bytes --]

/* #define _GNU_SOURCE  * To get defns of NI_MAXSERV and NI_MAXHOST */
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netdb.h>
#include <ifaddrs.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/ioctl.h>
#include <net/if.h>


void print_flags(unsigned int flags)
{
        const char* sep = "", *sp = " ";
        if (flags & IFF_UP) {
                printf("%sup", sep);
                sep = sp;
        }
        if (flags & IFF_BROADCAST) {
                printf("%sbroadcast", sep);
                sep = sp;
        }
        if (flags & IFF_LOOPBACK) {
                printf("%sloopback", sep);
                sep = sp;
        }
        if (flags & IFF_NOTRAILERS) {
                printf("%snotrailers", sep);
                sep = sp;
        }
        if (flags & IFF_RUNNING) {
                printf("%srunning", sep);
                sep = sp;
        }
        if (flags & IFF_PROMISC) {
                printf("%spromisc", sep);
                sep = sp;
        }
        if (flags & IFF_MULTICAST) {
                printf("%smulticast", sep);
                sep = sp;
        }
}

int main(int argc, char *argv[])
{
    struct ifaddrs *ifaddr, *ifa;
    int family, s, n;
    char host[NI_MAXHOST];

    struct ifreq ifr;
    struct ifreq_frndlyname iff;
    struct ifreq_frndlyname * iffp;
    
    struct ifaddrs_hwdata * ifhwdata;

    if (getifaddrs(&ifaddr) == -1) {
        perror("getifaddrs");
        exit(EXIT_FAILURE);
    }

    /* Walk through linked list, maintaining head pointer so we
       can free list later */

    for (ifa = ifaddr, n = 0; ifa != NULL; ifa = ifa->ifa_next, n++) {
        if (ifa->ifa_addr == NULL)
            continue;

        family = ifa->ifa_addr->sa_family;

        /* Display interface name and family (including symbolic
           form of the latter for the common families) */

        printf("internal_name: \t%s\n",ifa->ifa_name);

	printf(" flags: \t%s ",
               (family == AF_INET) ? "AF_INET " :
               (family == AF_INET6) ? "AF_INET6" : "unknown ");

        print_flags(ifa->ifa_flags);
	printf("\n");

        /* For an AF_INET* interface address, display the address */

        if (family == AF_INET || family == AF_INET6) {
            s = getnameinfo(ifa->ifa_addr,
                    (family == AF_INET) ? sizeof(struct sockaddr_in) :
                                          sizeof(struct sockaddr_in6),
                    host, NI_MAXHOST,
                    NULL, 0, NI_NUMERICHOST);
            if (s != 0) {
                printf("getnameinfo() failed: %s\n", gai_strerror(s));
                exit(EXIT_FAILURE);
            }

            printf(" address:\t%s\n", host);
            ifhwdata=ifa->ifa_data;
            iffp=&(ifhwdata->ifa_frndlyname);
            printf(" friendly_name:\t%s\n\n", iffp->ifrf_friendlyname);

        }
    }

    freeifaddrs(ifaddr);
    exit(EXIT_SUCCESS);
}

[-- Attachment #3: Type: text/plain, Size: 219 bytes --]


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-19  9:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-18 14:56 OpenMPI Problem Bahadır Öncel
2016-12-18 17:52 ` cyg Simple
2016-12-19  6:58 ` Marco Atzeri
2016-12-19  9:58   ` Marco Atzeri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).