Why is universe_size 1? I printed out universe size on my laptop and on vanquish, and it is 1 in both cases. Rajeev Begin forwarded message:
From: Silvan Brändli <[email protected]> Date: August 20, 2012 4:39:52 AM CDT To: [email protected] Subject: [mpich-discuss] Spawn MPI-Process Reply-To: [email protected]
Dear all
I try to start an application using the MPI_Comm_spawn command. However, when I execute my program I get a segmentation fault. I guess, this might be because universe_size is one. As I couldn't find helpful information on setting universe_size I hope some of you could help me.
Find the source code below or in the attached files. I compile the code using mpicxx main.cpp -o main mpicxx hi.cpp -o hi
and execute the case with
mpiexec -prepend-rank -np 1 ./main
The output is
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
[0] world_size 1 [0] universe size 1 [0] try to spawn
===================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = EXIT CODE: 11 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES ===================================================================================== APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Best regards Silvan
$$$$==main.cpp==$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include <sstream> #include <mpi.h>;
using std::string;
int main(int argc, char *argv[]) { int myrank; if (MPI_Init(&argc,&argv)!=MPI_SUCCESS) { printf("MPI_Init failed"); } MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
int world_size, universe_size, *universe_sizep, flag; MPI_Comm_size(MPI_COMM_WORLD, &world_size); printf("world_size %d\n",world_size);
MPI_Attr_get(MPI_COMM_WORLD, MPI_UNIVERSE_SIZE, &universe_sizep, &flag);
if (!flag) { printf("This MPI does not support UNIVERSE_SIZE. How many processes total?"); scanf("%d", &universe_size); } else universe_size = *universe_sizep; printf("universe size %d\n",universe_size);
char* hiargv[1]; char* m0=" "; hiargv[0]=m0;
MPI_Comm childComm; int spawnerror; printf("try to spawn\n"); MPI_Comm_spawn("./hi",hiargv, universe_size-1, MPI_INFO_NULL, myrank, MPI_COMM_SELF, &childComm, &spawnerror); printf("after spawn\n"); MPI_Finalize(); return 0; }
$$$$==hi.cpp==$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include <mpi.h>; int main(int argc, char** argv) { MPI_Init(NULL, NULL);
int world_size; MPI_Comm_size(MPI_COMM_WORLD, &world_size);
int world_rank; MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
printf("Hello world from, rank %d" " out of %d processors\n", world_rank, world_size);
MPI_Finalize(); return 0; }
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -- Dipl.-Ing. Silvan Brändli Numerische Strukturanalyse mit Anwendungen in der Schiffstechnik (M-10)
Technische Universität Hamburg-Harburg Schwarzenbergstraße 95c 21073 Hamburg
Tel. : +49 (0)40 42878 - 6187 Fax. : +49 (0)40 42878 - 6090 e-mail: [email protected] www : http://www.tuhh.de/skf
_______________________________________________ mpich-discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
Universe size depends on how many hosts you passed in. If you give a host file, it'll be larger. On 08/20/2012 08:48 AM, Rajeev Thakur wrote:
Why is universe_size 1? I printed out universe size on my laptop and on vanquish, and it is 1 in both cases.
Rajeev
Begin forwarded message:
From: Silvan Br�ndli <[email protected]> Date: August 20, 2012 4:39:52 AM CDT To: [email protected] Subject: [mpich-discuss] Spawn MPI-Process Reply-To: [email protected]
Dear all
I try to start an application using the MPI_Comm_spawn command. However, when I execute my program I get a segmentation fault. I guess, this might be because universe_size is one. As I couldn't find helpful information on setting universe_size I hope some of you could help me.
Find the source code below or in the attached files. I compile the code using mpicxx main.cpp -o main mpicxx hi.cpp -o hi
and execute the case with
mpiexec -prepend-rank -np 1 ./main
The output is
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
[0] world_size 1 [0] universe size 1 [0] try to spawn
===================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = EXIT CODE: 11 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES ===================================================================================== APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Best regards Silvan
$$$$==main.cpp==$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include <sstream> #include <mpi.h>;
using std::string;
int main(int argc, char *argv[]) { int myrank; if (MPI_Init(&argc,&argv)!=MPI_SUCCESS) { printf("MPI_Init failed"); } MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
int world_size, universe_size, *universe_sizep, flag; MPI_Comm_size(MPI_COMM_WORLD, &world_size); printf("world_size %d\n",world_size);
MPI_Attr_get(MPI_COMM_WORLD, MPI_UNIVERSE_SIZE, &universe_sizep, &flag);
if (!flag) { printf("This MPI does not support UNIVERSE_SIZE. How many processes total?"); scanf("%d", &universe_size); } else universe_size = *universe_sizep; printf("universe size %d\n",universe_size);
char* hiargv[1]; char* m0=" "; hiargv[0]=m0;
MPI_Comm childComm; int spawnerror; printf("try to spawn\n"); MPI_Comm_spawn("./hi",hiargv, universe_size-1, MPI_INFO_NULL, myrank, MPI_COMM_SELF, &childComm, &spawnerror); printf("after spawn\n"); MPI_Finalize(); return 0; }
$$$$==hi.cpp==$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include <mpi.h>; int main(int argc, char** argv) { MPI_Init(NULL, NULL);
int world_size; MPI_Comm_size(MPI_COMM_WORLD, &world_size);
int world_rank; MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
printf("Hello world from, rank %d" " out of %d processors\n", world_rank, world_size);
MPI_Finalize(); return 0; }
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -- Dipl.-Ing. Silvan Br�ndli Numerische Strukturanalyse mit Anwendungen in der Schiffstechnik (M-10)
Technische Universit�t Hamburg-Harburg Schwarzenbergstra�e 95c 21073 Hamburg
Tel. : +49 (0)40 42878 - 6187 Fax. : +49 (0)40 42878 - 6090 e-mail: [email protected] www : http://www.tuhh.de/skf
_______________________________________________ mpich-discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
-- Pavan Balaji http://www.mcs.anl.gov/~balaji
So even on a machine with 128 cores it will say 1? On Aug 20, 2012, at 9:05 AM, Pavan Balaji wrote:
Universe size depends on how many hosts you passed in. If you give a host file, it'll be larger.
On 08/20/2012 08:48 AM, Rajeev Thakur wrote:
Why is universe_size 1? I printed out universe size on my laptop and on vanquish, and it is 1 in both cases.
Rajeev
Begin forwarded message:
From: Silvan Brändli <[email protected]> Date: August 20, 2012 4:39:52 AM CDT To: [email protected] Subject: [mpich-discuss] Spawn MPI-Process Reply-To: [email protected]
Dear all
I try to start an application using the MPI_Comm_spawn command. However, when I execute my program I get a segmentation fault. I guess, this might be because universe_size is one. As I couldn't find helpful information on setting universe_size I hope some of you could help me.
Find the source code below or in the attached files. I compile the code using mpicxx main.cpp -o main mpicxx hi.cpp -o hi
and execute the case with
mpiexec -prepend-rank -np 1 ./main
The output is
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
[0] world_size 1 [0] universe size 1 [0] try to spawn
===================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = EXIT CODE: 11 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES ===================================================================================== APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Best regards Silvan
$$$$==main.cpp==$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include <sstream> #include <mpi.h>;
using std::string;
int main(int argc, char *argv[]) { int myrank; if (MPI_Init(&argc,&argv)!=MPI_SUCCESS) { printf("MPI_Init failed"); } MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
int world_size, universe_size, *universe_sizep, flag; MPI_Comm_size(MPI_COMM_WORLD, &world_size); printf("world_size %d\n",world_size);
MPI_Attr_get(MPI_COMM_WORLD, MPI_UNIVERSE_SIZE, &universe_sizep, &flag);
if (!flag) { printf("This MPI does not support UNIVERSE_SIZE. How many processes total?"); scanf("%d", &universe_size); } else universe_size = *universe_sizep; printf("universe size %d\n",universe_size);
char* hiargv[1]; char* m0=" "; hiargv[0]=m0;
MPI_Comm childComm; int spawnerror; printf("try to spawn\n"); MPI_Comm_spawn("./hi",hiargv, universe_size-1, MPI_INFO_NULL, myrank, MPI_COMM_SELF, &childComm, &spawnerror); printf("after spawn\n"); MPI_Finalize(); return 0; }
$$$$==hi.cpp==$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include <mpi.h>; int main(int argc, char** argv) { MPI_Init(NULL, NULL);
int world_size; MPI_Comm_size(MPI_COMM_WORLD, &world_size);
int world_rank; MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
printf("Hello world from, rank %d" " out of %d processors\n", world_rank, world_size);
MPI_Finalize(); return 0; }
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -- Dipl.-Ing. Silvan Brändli Numerische Strukturanalyse mit Anwendungen in der Schiffstechnik (M-10)
Technische Universität Hamburg-Harburg Schwarzenbergstraße 95c 21073 Hamburg
Tel. : +49 (0)40 42878 - 6187 Fax. : +49 (0)40 42878 - 6090 e-mail: [email protected] www : http://www.tuhh.de/skf
_______________________________________________ mpich-discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
-- Pavan Balaji http://www.mcs.anl.gov/~balaji
Not if you pass -host localhost:128. On 08/20/2012 09:07 AM, Rajeev Thakur wrote:
So even on a machine with 128 cores it will say 1?
On Aug 20, 2012, at 9:05 AM, Pavan Balaji wrote:
Universe size depends on how many hosts you passed in. If you give a host file, it'll be larger.
On 08/20/2012 08:48 AM, Rajeev Thakur wrote:
Why is universe_size 1? I printed out universe size on my laptop and on vanquish, and it is 1 in both cases.
Rajeev
Begin forwarded message:
From: Silvan Br�ndli <[email protected]> Date: August 20, 2012 4:39:52 AM CDT To: [email protected] Subject: [mpich-discuss] Spawn MPI-Process Reply-To: [email protected]
Dear all
I try to start an application using the MPI_Comm_spawn command. However, when I execute my program I get a segmentation fault. I guess, this might be because universe_size is one. As I couldn't find helpful information on setting universe_size I hope some of you could help me.
Find the source code below or in the attached files. I compile the code using mpicxx main.cpp -o main mpicxx hi.cpp -o hi
and execute the case with
mpiexec -prepend-rank -np 1 ./main
The output is
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
[0] world_size 1 [0] universe size 1 [0] try to spawn
===================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = EXIT CODE: 11 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES ===================================================================================== APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Best regards Silvan
$$$$==main.cpp==$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include <sstream> #include <mpi.h>;
using std::string;
int main(int argc, char *argv[]) { int myrank; if (MPI_Init(&argc,&argv)!=MPI_SUCCESS) { printf("MPI_Init failed"); } MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
int world_size, universe_size, *universe_sizep, flag; MPI_Comm_size(MPI_COMM_WORLD, &world_size); printf("world_size %d\n",world_size);
MPI_Attr_get(MPI_COMM_WORLD, MPI_UNIVERSE_SIZE, &universe_sizep, &flag);
if (!flag) { printf("This MPI does not support UNIVERSE_SIZE. How many processes total?"); scanf("%d", &universe_size); } else universe_size = *universe_sizep; printf("universe size %d\n",universe_size);
char* hiargv[1]; char* m0=" "; hiargv[0]=m0;
MPI_Comm childComm; int spawnerror; printf("try to spawn\n"); MPI_Comm_spawn("./hi",hiargv, universe_size-1, MPI_INFO_NULL, myrank, MPI_COMM_SELF, &childComm, &spawnerror); printf("after spawn\n"); MPI_Finalize(); return 0; }
$$$$==hi.cpp==$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include <mpi.h>; int main(int argc, char** argv) { MPI_Init(NULL, NULL);
int world_size; MPI_Comm_size(MPI_COMM_WORLD, &world_size);
int world_rank; MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);
printf("Hello world from, rank %d" " out of %d processors\n", world_rank, world_size);
MPI_Finalize(); return 0; }
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ -- Dipl.-Ing. Silvan Br�ndli Numerische Strukturanalyse mit Anwendungen in der Schiffstechnik (M-10)
Technische Universit�t Hamburg-Harburg Schwarzenbergstra�e 95c 21073 Hamburg
Tel. : +49 (0)40 42878 - 6187 Fax. : +49 (0)40 42878 - 6090 e-mail: [email protected] www : http://www.tuhh.de/skf
_______________________________________________ mpich-discuss mailing list [email protected] To manage subscription options or unsubscribe: https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
-- Pavan Balaji http://www.mcs.anl.gov/~balaji
-- Pavan Balaji http://www.mcs.anl.gov/~balaji
participants (2)
-
Pavan Balaji -
Rajeev Thakur