From 66cf3da363aafe8b667822fcc66f34520875a8cf Mon Sep 17 00:00:00 2001
From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be>
Date: Wed, 8 Aug 2001 14:30:33 +0000
Subject: [PATCH] *** empty log message ***

---
 Makefile            | 22 +++++++++++----
 Parallel/Makefile   | 11 ++------
 Parallel/ParUtil.cc | 68 ++-------------------------------------------
 Parallel/ParUtil.h  | 14 ----------
 4 files changed, 23 insertions(+), 92 deletions(-)

diff --git a/Makefile b/Makefile
index f1bc83c9fc..d21cbe0c9b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.124 2001-08-08 14:05:26 remacle Exp $
+# $Id: Makefile,v 1.125 2001-08-08 14:30:33 remacle Exp $
 # ----------------------------------------------------------------------
 #  Makefile for Gmsh  
 # ----------------------------------------------------------------------
@@ -53,10 +53,10 @@ FLTK_LIB_SOLARIS_SCOREC = /users/develop/develop/visual/fltk/1.0/lib/sun4_5/libf
 # ----------------------------------------------------------------------
 
                GMSH_DIR = Adapt Common DataStr Geo Graphics Mesh Parser\
-                          Motif Fltk Plugin jpeg utils
-        GMSH_XMOTIF_DIR = Adapt Common DataStr Geo Graphics Mesh Parser Motif jpeg
-          GMSH_FLTK_DIR = Adapt Common DataStr Geo Graphics Mesh Parser Fltk jpeg Plugin
-           GMSH_BOX_DIR = Adapt Box Common DataStr Geo Mesh Parser Plugin
+                          Motif Fltk Plugin jpeg utils Parallel
+        GMSH_XMOTIF_DIR = Adapt Common DataStr Geo Graphics Mesh Parser Motif jpeg Parallel
+          GMSH_FLTK_DIR = Adapt Common DataStr Geo Graphics Mesh Parser Fltk jpeg Plugin Parallel
+           GMSH_BOX_DIR = Adapt Box Common DataStr Geo Mesh Parser Plugin Parallel
            GMSH_BIN_DIR = bin
            GMSH_LIB_DIR = lib
            GMSH_DOC_DIR = doc
@@ -274,6 +274,18 @@ bb: tag
         ); done
 	$(CC) -o $(GMSH_BIN_DIR)/gmsh-bb $(GMSH_BOX_LIB) -lm
 
+bb-parallel: tag
+	PARALLEL=1
+	@for i in $(GMSH_BOX_DIR); do (cd $$i && $(MAKE) \
+           "CC=mpiCC" \
+           "C_FLAGS=-O3" \
+           "OS_FLAGS=" \
+           "VERSION_FLAGS=-D_BLACKBOX -DPARALLEL" \
+           "GL_INCLUDE=" \
+           "GUI_INCLUDE=" \
+        ); done
+	mpiCC -o $(GMSH_BIN_DIR)/gmsh-bb $(GMSH_BOX_LIB) -lm
+
 bbn: tag
 	@for i in $(GMSH_BOX_DIR) ; do (cd $$i && $(MAKE) \
            "CC=g++ -mno-cygwin -I/mingw/include" \
diff --git a/Parallel/Makefile b/Parallel/Makefile
index 9816d57f22..fc2dc73f95 100644
--- a/Parallel/Makefile
+++ b/Parallel/Makefile
@@ -1,19 +1,14 @@
-# $Id: Makefile,v 1.1 2001-08-08 14:06:07 remacle Exp $
+# $Id: Makefile,v 1.2 2001-08-08 14:30:33 remacle Exp $
 #
 # Makefile for "libBox.a"
 #
 
 .IGNORE:
-ifeq ($(PARALLEL),1)
-CC       = mpiCC
-else
-CC       = c++
-endif
 AR       = ar ruvs
 RM       = rm
 RANLIB   = ranlib
 LIB      = ../lib/libParallel.a
-INCLUDE  = 
+INCLUDE  := $(INCLUDE) -I/usr/local/mpich/latest/include/
 
 C_FLAGS       = -g
 OS_FLAGS      = 
@@ -32,7 +27,7 @@ $(LIB): $(OBJ)
 	$(AR) $(LIB) $(OBJ) 
 	$(RANLIB) $(LIB)
 
-.cpp.o:
+.cc.o:
 	$(CC) $(CFLAGS) -c $<
 
 clean:
diff --git a/Parallel/ParUtil.cc b/Parallel/ParUtil.cc
index 4f171d2b1b..03492eead8 100644
--- a/Parallel/ParUtil.cc
+++ b/Parallel/ParUtil.cc
@@ -1,14 +1,9 @@
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
-#ifdef SUN4
-#include <sys/varargs.h>
-#else
-#include <stdarg.h>
-#endif
 #include "ParUtil.h"
 #ifdef PARALLEL
-#include "autopack.h"
+#include "mpi.h"
 #else
 #include <sys/time.h>
 #endif
@@ -40,17 +35,10 @@ void ParUtil::init(int &argc, char **&argv) {
   MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
   MPI_Comm_size(MPI_COMM_WORLD, &mysize);
   
-  MPI_Comm_dup(MPI_COMM_WORLD, &seq_local_comm);
   MPI_Errhandler_set(MPI_COMM_WORLD,MPI_ERRORS_RETURN);
-  AP_init(&argc, &argv);
-  AP_setparam(10*4096, 1, 1024, -1);
   MPI_Get_processor_name(name,&namelen);
   procName = new char[namelen+1];
   strcpy(procName,name);
-  char logname[256];
-  sprintf(logname,"log-proc%d-%s.dat",myrank,procName);
-  log = fopen (logname,"w");
-  vl = 1;
 #endif
 }
 
@@ -82,55 +70,6 @@ void ParUtil::processorName(char *name) const
 #endif
 }
 
-void ParUtil:: Msg(ParUtil::MessageLevel level, char *fmt, ...)
-{ 
-  char buff[1024];
-  va_list  args;
-  va_start (args, fmt);
-  vsprintf(buff, fmt, args);
-  va_end (args);
-
-  switch(level)
-    {
-    case DEBUG1:
-      if(vl > 1)
-	{
-	  fprintf(log,"%s",buff);
-	  fflush(log);
-	}
-      break;
-    case DEBUG2:
-      if(vl > 2)
-	{
-	  fprintf(log,"%s",buff);
-	  fflush(log);
-	}
-      break;
-    case INFO:
-      if(vl >= 0 && master())
-	{
-	  //	  fprintf(log,"%s",buff);
-	  fprintf(stdout,"%s",buff);
-	  //	  fflush(log);
-	}
-      if(vl > 2)
-	{
-	  //	  fprintf(log,"%s",buff);
-	  //	  fflush(log);
-	}
-      break;
-    case WARNING:
-      fprintf(stdout,"Processor %d AOMD WARNING : %s",rank(),buff);
-      fflush(stdout);
-      break;
-    case ERROR:
-      fprintf(stdout,"AOMD FATAL ERROR : %s",buff);
-      fflush(stdout);
-      Abort();
-      break;
-    }
-}
-
 void ParUtil::Abort()
 {
 #ifdef PARALLEL
@@ -143,10 +82,9 @@ void ParUtil::Abort()
 void ParUtil::Barrier(int line, const char *fn)
 {
 #ifdef PARALLEL
-  Msg(DEBUG2,"BARRIER : Line %d in %s\n",line,fn);
   MPI_Barrier(MPI_COMM_WORLD);
-  Msg(DEBUG2,"BARRIER PASSED : Line %d in %s\n",line,fn);
 #endif
 }
 
 ParUtil* ParUtil::instance = 0;
+
diff --git a/Parallel/ParUtil.h b/Parallel/ParUtil.h
index b3fb948c60..218072b555 100644
--- a/Parallel/ParUtil.h
+++ b/Parallel/ParUtil.h
@@ -2,10 +2,6 @@
 #define _H_ParUtil
 #include <stdio.h>
 
-#ifdef PARALLEL
-#include "mpi.h"
-#endif
-
 /**
    ParUtil is a Singleton. It gives some
    general services for parallel implementation.
@@ -15,8 +11,6 @@ class ParUtil {
   ParUtil();
   ~ParUtil();
 public:
-  /// Message severity level
-  typedef enum MessageLevel {DEBUG1,DEBUG2,INFO,WARNING,ERROR};
   /// returne the only instance
   static ParUtil* Instance();
   /// initialization, needed for mpi and autopack
@@ -27,10 +21,6 @@ public:
   double wTime () const;
   /// gets the processor name
   void processorName(char *name) const;
-  /// set the verbosity level (0,1,2,3)
-  inline void setVertbosityLevel(int i){vl = i;}
-  /// prints a message, same format as printf
-  void Msg(MessageLevel lev, char *fmt, ...);
   /// abort a calculation
   void Abort();
 #ifdef PARALLEL
@@ -47,14 +37,10 @@ public:
 #endif
 private:
   static ParUtil *instance;
-  FILE *log;
-  int vl;
-  int procSpeed;
   char *procName;
 #ifdef PARALLEL
   int myrank;
   int mysize;
-  MPI_Comm seq_local_comm;
 #endif
 };
 
-- 
GitLab