Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
66cf3da3
Commit
66cf3da3
authored
23 years ago
by
Jean-François Remacle
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
parent
cac543a4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+17
-5
17 additions, 5 deletions
Makefile
Parallel/Makefile
+3
-8
3 additions, 8 deletions
Parallel/Makefile
Parallel/ParUtil.cc
+3
-65
3 additions, 65 deletions
Parallel/ParUtil.cc
Parallel/ParUtil.h
+0
-14
0 additions, 14 deletions
Parallel/ParUtil.h
with
23 additions
and
92 deletions
Makefile
+
17
−
5
View file @
66cf3da3
# $Id: Makefile,v 1.12
4
2001-08-08 14:
05:26
remacle Exp $
# $Id: Makefile,v 1.12
5
2001-08-08 14:
30:33
remacle Exp $
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# Makefile for Gmsh
# Makefile for Gmsh
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
...
@@ -53,10 +53,10 @@ FLTK_LIB_SOLARIS_SCOREC = /users/develop/develop/visual/fltk/1.0/lib/sun4_5/libf
...
@@ -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
\
GMSH_DIR
=
Adapt Common DataStr Geo Graphics Mesh Parser
\
Motif Fltk Plugin jpeg utils
Motif Fltk Plugin jpeg utils
Parallel
GMSH_XMOTIF_DIR
=
Adapt Common DataStr Geo Graphics Mesh Parser Motif jpeg
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
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
GMSH_BOX_DIR
=
Adapt Box Common DataStr Geo Mesh Parser Plugin
Parallel
GMSH_BIN_DIR
=
bin
GMSH_BIN_DIR
=
bin
GMSH_LIB_DIR
=
lib
GMSH_LIB_DIR
=
lib
GMSH_DOC_DIR
=
doc
GMSH_DOC_DIR
=
doc
...
@@ -274,6 +274,18 @@ bb: tag
...
@@ -274,6 +274,18 @@ bb: tag
)
;
done
)
;
done
$(
CC
)
-o
$(
GMSH_BIN_DIR
)
/gmsh-bb
$(
GMSH_BOX_LIB
)
-lm
$(
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
bbn
:
tag
@
for
i
in
$(
GMSH_BOX_DIR
)
;
do
(
cd
$$
i
&&
$(
MAKE
)
\
@
for
i
in
$(
GMSH_BOX_DIR
)
;
do
(
cd
$$
i
&&
$(
MAKE
)
\
"CC=g++ -mno-cygwin -I/mingw/include"
\
"CC=g++ -mno-cygwin -I/mingw/include"
\
...
...
This diff is collapsed.
Click to expand it.
Parallel/Makefile
+
3
−
8
View file @
66cf3da3
# $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"
# Makefile for "libBox.a"
#
#
.IGNORE
:
.IGNORE
:
ifeq
($(PARALLEL),1)
CC
=
mpiCC
else
CC
=
c++
endif
AR
=
ar ruvs
AR
=
ar ruvs
RM
=
rm
RM
=
rm
RANLIB
=
ranlib
RANLIB
=
ranlib
LIB
=
../lib/libParallel.a
LIB
=
../lib/libParallel.a
INCLUDE
=
INCLUDE
:
=
$(
INCLUDE
)
-I
/usr/local/mpich/latest/include/
C_FLAGS
=
-g
C_FLAGS
=
-g
OS_FLAGS
=
OS_FLAGS
=
...
@@ -32,7 +27,7 @@ $(LIB): $(OBJ)
...
@@ -32,7 +27,7 @@ $(LIB): $(OBJ)
$(
AR
)
$(
LIB
)
$(
OBJ
)
$(
AR
)
$(
LIB
)
$(
OBJ
)
$(
RANLIB
)
$(
LIB
)
$(
RANLIB
)
$(
LIB
)
.c
pp
.o
:
.c
c
.o
:
$(
CC
)
$(
CFLAGS
)
-c
$<
$(
CC
)
$(
CFLAGS
)
-c
$<
clean
:
clean
:
...
...
This diff is collapsed.
Click to expand it.
Parallel/ParUtil.cc
+
3
−
65
View file @
66cf3da3
#include
<stdlib.h>
#include
<stdio.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<string.h>
#include
<string.h>
#ifdef SUN4
#include
<sys/varargs.h>
#else
#include
<stdarg.h>
#endif
#include
"ParUtil.h"
#include
"ParUtil.h"
#ifdef PARALLEL
#ifdef PARALLEL
#include
"
autopack
.h"
#include
"
mpi
.h"
#else
#else
#include
<sys/time.h>
#include
<sys/time.h>
#endif
#endif
...
@@ -40,17 +35,10 @@ void ParUtil::init(int &argc, char **&argv) {
...
@@ -40,17 +35,10 @@ void ParUtil::init(int &argc, char **&argv) {
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myrank
);
MPI_Comm_rank
(
MPI_COMM_WORLD
,
&
myrank
);
MPI_Comm_size
(
MPI_COMM_WORLD
,
&
mysize
);
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
);
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
);
MPI_Get_processor_name
(
name
,
&
namelen
);
procName
=
new
char
[
namelen
+
1
];
procName
=
new
char
[
namelen
+
1
];
strcpy
(
procName
,
name
);
strcpy
(
procName
,
name
);
char
logname
[
256
];
sprintf
(
logname
,
"log-proc%d-%s.dat"
,
myrank
,
procName
);
log
=
fopen
(
logname
,
"w"
);
vl
=
1
;
#endif
#endif
}
}
...
@@ -82,55 +70,6 @@ void ParUtil::processorName(char *name) const
...
@@ -82,55 +70,6 @@ void ParUtil::processorName(char *name) const
#endif
#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
()
void
ParUtil
::
Abort
()
{
{
#ifdef PARALLEL
#ifdef PARALLEL
...
@@ -143,10 +82,9 @@ void ParUtil::Abort()
...
@@ -143,10 +82,9 @@ void ParUtil::Abort()
void
ParUtil
::
Barrier
(
int
line
,
const
char
*
fn
)
void
ParUtil
::
Barrier
(
int
line
,
const
char
*
fn
)
{
{
#ifdef PARALLEL
#ifdef PARALLEL
Msg
(
DEBUG2
,
"BARRIER : Line %d in %s
\n
"
,
line
,
fn
);
MPI_Barrier
(
MPI_COMM_WORLD
);
MPI_Barrier
(
MPI_COMM_WORLD
);
Msg
(
DEBUG2
,
"BARRIER PASSED : Line %d in %s
\n
"
,
line
,
fn
);
#endif
#endif
}
}
ParUtil
*
ParUtil
::
instance
=
0
;
ParUtil
*
ParUtil
::
instance
=
0
;
This diff is collapsed.
Click to expand it.
Parallel/ParUtil.h
+
0
−
14
View file @
66cf3da3
...
@@ -2,10 +2,6 @@
...
@@ -2,10 +2,6 @@
#define _H_ParUtil
#define _H_ParUtil
#include
<stdio.h>
#include
<stdio.h>
#ifdef PARALLEL
#include
"mpi.h"
#endif
/**
/**
ParUtil is a Singleton. It gives some
ParUtil is a Singleton. It gives some
general services for parallel implementation.
general services for parallel implementation.
...
@@ -15,8 +11,6 @@ class ParUtil {
...
@@ -15,8 +11,6 @@ class ParUtil {
ParUtil
();
ParUtil
();
~
ParUtil
();
~
ParUtil
();
public:
public:
/// Message severity level
typedef
enum
MessageLevel
{
DEBUG1
,
DEBUG2
,
INFO
,
WARNING
,
ERROR
};
/// returne the only instance
/// returne the only instance
static
ParUtil
*
Instance
();
static
ParUtil
*
Instance
();
/// initialization, needed for mpi and autopack
/// initialization, needed for mpi and autopack
...
@@ -27,10 +21,6 @@ public:
...
@@ -27,10 +21,6 @@ public:
double
wTime
()
const
;
double
wTime
()
const
;
/// gets the processor name
/// gets the processor name
void
processorName
(
char
*
name
)
const
;
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
/// abort a calculation
void
Abort
();
void
Abort
();
#ifdef PARALLEL
#ifdef PARALLEL
...
@@ -47,14 +37,10 @@ public:
...
@@ -47,14 +37,10 @@ public:
#endif
#endif
private
:
private
:
static
ParUtil
*
instance
;
static
ParUtil
*
instance
;
FILE
*
log
;
int
vl
;
int
procSpeed
;
char
*
procName
;
char
*
procName
;
#ifdef PARALLEL
#ifdef PARALLEL
int
myrank
;
int
myrank
;
int
mysize
;
int
mysize
;
MPI_Comm
seq_local_comm
;
#endif
#endif
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment