Re: [OMPI users] Problem to Run Hello World on a desktop with Cygwin and OpenMPI 1.7.5
On 30/05/2014 13:45, Sergii Veremieiev wrote: Dear Sir/Madam, I'm trying to compile and run a simple "Hello World" C++/MPI code on my personal desktop machine (6-core Intel Core i7-3930K CPU with Windows 7 SP1 and Cygwin with the default built-in Open MPI 1.7.5 and GCC 4.8.2). I'm beginner with this, never run parallel codes on desktops, only on a cluster. Here is the code: using namespace std; #include "mpi.h" int main(int argc, char *argv[]) { int noprocs, nid; MPI::Init(argc,argv); nid = MPI::COMM_WORLD.Get_rank(); noprocs = MPI::COMM_WORLD.Get_size(); if (nid==0) cout << "Hello from processor " << nid << " of " << noprocs << endl; MPI::Finalize(); } Using “mpicxx -o Hello Hello.cpp” the code compiles without any problems and generates an executable. However when I try to run the code using “mpirun -np 1 Hello” or “mpiexec -n 1 Hello” the following error message is returned: Hi Sergii mpirun -np 1 ./Hello works fine for me : "Hello from processor 0 of 1" As the message is "opal_os_dirpath_create: Error: Unable to create the sub-directory /tmp/openmpi-sessions-enrsvere@byenr502b-01f_0/11302" you need to check the location and permission of /tmp You can also follows guidelines on https://cygwin.com/problems.html and follow up on cygwin mailing list https://cygwin.com/lists.html Not relevant, but please note your code is missing something as $ mpirun -np 4 ./Hello Hello from processor 0 of 4 While the standard hello_cxx.cc #include "mpi.h" #include int main(int argc, char **argv) { int rank, size, len; char version[MPI_MAX_LIBRARY_VERSION_STRING]; MPI::Init(); rank = MPI::COMM_WORLD.Get_rank(); size = MPI::COMM_WORLD.Get_size(); MPI_Get_library_version(version, ); std::cout << "Hello, world! I am " << rank << " of " << size << "(" << version << ", " << len << ")" << std::endl; MPI::Finalize(); return 0; } --- produces $ mpirun -np 4 ./hello_cxx Hello, world! I am 1 of 4 ... Hello, world! I am 0 of 4 ... Hello, world! I am 2 of 4 ... Hello, world! I am 3 of 4 ...
[OMPI users] Problem to Run Hello World on a desktop with Cygwin and OpenMPI 1.7.5
Dear Sir/Madam, I'm trying to compile and run a simple "Hello World" C++/MPI code on my personal desktop machine (6-core Intel Core i7-3930K CPU with Windows 7 SP1 and Cygwin with the default built-in Open MPI 1.7.5 and GCC 4.8.2). I'm beginner with this, never run parallel codes on desktops, only on a cluster. Here is the code: using namespace std; #include "mpi.h" int main(int argc, char *argv[]) { int noprocs, nid; MPI::Init(argc,argv); nid = MPI::COMM_WORLD.Get_rank(); noprocs = MPI::COMM_WORLD.Get_size(); if (nid==0) cout << "Hello from processor " << nid << " of " << noprocs << endl; MPI::Finalize(); } Using “mpicxx -o Hello Hello.cpp” the code compiles without any problems and generates an executable. However when I try to run the code using “mpirun -np 1 Hello” or “mpiexec -n 1 Hello” the following error message is returned: [byenr502b-01f:06620] opal_os_dirpath_create: Error: Unable to create the sub-directory (/tmp/openmpi-sessions-enrsvere@byenr502b-01f_0/11302) of (/tmp/openmpi-sessions-enrsvere@byenr502b-01f_0/11302/0/0), mkdir failed [1] [byenr502b-01f:06620] [[11302,0],0] ORTE_ERROR_LOG: Error in file /pub/devel/openmpi/openmpi-1.7.5-1/src/openmpi-1.7.5/orte/util/session_dir.c at line 107 [byenr502b-01f:06620] [[11302,0],0] ORTE_ERROR_LOG: Error in file /pub/devel/openmpi/openmpi-1.7.5-1/src/openmpi-1.7.5/orte/util/session_dir.c at line 402 [byenr502b-01f:06620] [[11302,0],0] ORTE_ERROR_LOG: Error in file /pub/devel/openmpi/openmpi-1.7.5-1/src/openmpi-1.7.5/orte/mca/ess/hnp/ess_hnp_module.c at line 604 -- It looks like orte_init failed for some reason; your parallel process is likely to abort. There are many reasons that a parallel process can fail during orte_init; some of which are due to configuration or environment problems. This failure appears to be an internal failure; here's some additional information (which may only be relevant to an Open MPI developer): orte_session_dir failed --> Returned value Error (-1) instead of ORTE_SUCCESS -- Please help me to understand what is the problem. For your information here is the output of the following commands: $ echo $PATH /usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/d/Program Files/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/d/SIMULIA/Abaqus/Commands $ echo $LD_LIBRARY_PATH $ ompi_info -v ompi full --parsable ompi_info: Error: unknown option "-v" Type 'ompi_info --help' for usage. I also attach a lengthy output of "ompi_info --all". Please do not hesitate if you require any further information. Best regards, Sergii