restored printing # of cores only for nodes with id >= 1 if world_size > 1
git-svn-id: svn://anubis/gvsu@341 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
4caa885007
commit
e314db9dcc
@ -2,18 +2,21 @@
|
|||||||
CXX := mpiCC
|
CXX := mpiCC
|
||||||
CXXFLAGS := `sdl-config --cflags` -fopenmp
|
CXXFLAGS := `sdl-config --cflags` -fopenmp
|
||||||
LDFLAGS := `sdl-config --libs` -fopenmp
|
LDFLAGS := `sdl-config --libs` -fopenmp
|
||||||
TARGET := mpi-fractals
|
TARGET1 := mpi-fractals
|
||||||
OBJS := mpi-fractals.o
|
TARGET2 := mpi-fractals-static
|
||||||
OBJS += NewtonComputation.o
|
OBJS := NewtonComputation.o
|
||||||
OBJS += FatouComputation.o
|
OBJS += FatouComputation.o
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET1) $(TARGET2)
|
||||||
|
|
||||||
$(TARGET): $(OBJS)
|
$(TARGET1): $(OBJS) $(TARGET1).o
|
||||||
|
$(CXX) -o $@ $^ $(LDFLAGS)
|
||||||
|
|
||||||
|
$(TARGET2): $(OBJS) $(TARGET2).o
|
||||||
$(CXX) -o $@ $^ $(LDFLAGS)
|
$(CXX) -o $@ $^ $(LDFLAGS)
|
||||||
|
|
||||||
%.o: %.cc
|
%.o: %.cc
|
||||||
$(CXX) -o $@ -c $< $(CXXFLAGS)
|
$(CXX) -o $@ -c $< $(CXXFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o *~ $(TARGET)
|
-rm -f *.o *~ $(TARGET1) $(TARGET2)
|
||||||
|
@ -268,7 +268,8 @@ void getSizes(int * rank, int * size, int * nprocs)
|
|||||||
{
|
{
|
||||||
int total_nprocs = 0;
|
int total_nprocs = 0;
|
||||||
cout << "Number of cores on each MPI node:" << endl;
|
cout << "Number of cores on each MPI node:" << endl;
|
||||||
for (int i = 0; i < *size; i++)
|
int i = (*size > 1) : 1 : 0;
|
||||||
|
for (; i < *size; i++)
|
||||||
{
|
{
|
||||||
cout << all_nprocs[i] << " ";
|
cout << all_nprocs[i] << " ";
|
||||||
total_nprocs += all_nprocs[i];
|
total_nprocs += all_nprocs[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user