Skip to content

Commit 2f72e84

Browse files
committed
Add files via upload
1 parent 19db114 commit 2f72e84

File tree

3 files changed

+104
-0
lines changed

3 files changed

+104
-0
lines changed

Makefile

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
2+
3+
#-----------------------------------------------------------#
4+
# #
5+
# LoopParallelism Library V3.0 #
6+
# #
7+
#-----------------------------------------------------------#
8+
# #
9+
# Description: Handles threads, scheduling #
10+
# & dependencies #
11+
# Author: Loic MARECHAL #
12+
# Creation date: feb 25 2008 #
13+
# Last modification: mar 12 2010 #
14+
# #
15+
#-----------------------------------------------------------#
16+
17+
18+
CC = /usr/bin/gcc
19+
CFLAGS = -O3
20+
21+
22+
# Working directories
23+
24+
LIBDIR = $(HOME)/lib/$(ARCHI)
25+
INCDIR = $(HOME)/include
26+
SRCSDIR = sources
27+
OBJSDIR = objects/$(ARCHI)
28+
ARCHDIR = archives
29+
DIRS = objects $(LIBDIR) $(OBJSDIR) $(ARCHDIR) $(INCDIR)
30+
VPATH = $(SRCSDIR)
31+
32+
33+
# Files to be compiled
34+
35+
SRCS = $(wildcard $(SRCSDIR)/*.c)
36+
HDRS = $(wildcard $(SRCSDIR)/*.h)
37+
OBJS = $(patsubst $(SRCSDIR)%, $(OBJSDIR)%, $(SRCS:.c=.o))
38+
LIB = lplib3.a
39+
40+
41+
# Definition of the compiling implicit rule
42+
43+
$(OBJSDIR)/%.o : $(SRCSDIR)/%.c
44+
$(CC) -c $(CFLAGS) -I$(SRCSDIR) $< -o $@
45+
46+
47+
# Install the library
48+
49+
$(LIBDIR)/$(LIB): $(DIRS) $(OBJS)
50+
cp $(OBJSDIR)/lplib3.o $@
51+
cp $(SRCSDIR)/*lplib3.h $(SRCSDIR)/*lplib3.ins $(INCDIR)
52+
53+
54+
# Objects depends on headers
55+
56+
$(OBJS): $(HDRS)
57+
58+
59+
# Build the working directories
60+
61+
$(DIRS):
62+
@[ -d $@ ] || mkdir $@
63+
64+
65+
# Remove temporary files
66+
67+
clean:
68+
rm -f $(OBJS) $(LIBDIR)/$(LIB)
69+
70+
# Build a dated archive including sources, patterns and makefile
71+
72+
tar: $(DIRS)
73+
tar czf $(ARCHDIR)/lplib3.`date +"%Y.%m.%d"`.tgz sources Makefile
74+
75+
zip: $(DIRS)
76+
archive_lp3.sh

copyright.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
All LP3 code is Copyright 2008 - by Loïc Maréchal, Inria.
2+
This program is a free software.
3+
You can redistribute it and/or modify it under the terms of the GNU Lesser General Public License
4+
as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
5+
6+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
7+
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
8+
9+
You should have received a copy of the GNU Lesser General Public License along with this program as the file LICENSE_lgpl.txt; if not, please see :
10+
http://www.gnu.org/licenses/lgpl.txt

howto.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Building the sample parallel codes is fairly easy:
2+
3+
1 - Open a shell
4+
2 - "cd lp3/examples"
5+
3 - "make"
6+
7+
Then you may run:
8+
"basic_test 1" (serial run)
9+
"basic_test n" (replace n with the number threads you want to launch)
10+
"basic_test" (launch as many threads as the number of cores of your system)
11+
12+
"indirect_writes 1" (serial run)
13+
"indirect_writes n" (replace n with the number threads you want to launch)
14+
"indirect_writes" (launch as many threads as the number of cores of your system)
15+
16+
"tetrahedra_neighbours -in tet.meshb -out surface.meshb -nproc 1" (serial run)
17+
"tetrahedra_neighbours -in tet.meshb -out surface.meshb -nproc n" (replace n with the number threads you want to launch)
18+
"tetrahedra_neighbours -in tet.meshb -out surface.meshb" (launch as many threads as the number of cores of your system)

0 commit comments

Comments
 (0)