Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F98676356
Makefile
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jan 15, 13:24
Size
4 KB
Mime Type
text/x-makefile
Expires
Fri, Jan 17, 13:24 (2 d)
Engine
blob
Format
Raw Data
Handle
23625870
Attached To
rFUTILS futils
Makefile
View Options
#
# @file Makefile
#
# @brief Makefile for futils library examples
#
# @copyright
# Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne)
# SPC (Swiss Plasma Center)
#
# futils is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# futils is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# @authors
# (in alphabetical order)
# @author Sohrab Khosh Aghdam <sohrab.aghdam@epfl.ch>
# @author Paolo Angelino <paolo.angelino@epfl.ch>
# @author Trach-Minh Tran <trach-minh.tran@epfl.ch>
#
F90 = mpif90
OPT = -g -traceback -CB
F90FLAGS = $(OPT) -I$(FUTILS)/include -I${HDF5}/include -I${HDF5}/lib
CC = cc
CFLAGS = -O2
LDFLAGS = $(OPT) -L$(FUTILS)/lib -L${HDF5}/lib
LIBS = -lfutils -lhdf5_fortran -lhdf5 -lz -lgcc_s -lcrypt -lssl
LIBS = -lfutils -lhdf5_fortran -lhdf5 -lz
MPIRUN = mpiexec -n 4
SERIAL = ex1 ex2 ex3 ex4 ex7 ex8 ex9 ex11 ex12 ex13 ex14 ex15 ex16
PARA = pex1 pex3 pex4 pex5 pex6 pex7 pex8 pex9 ex10
PARA_ALL = $(PARA) pex5r pex10 pex11 pex12 pex13 pex14 pex15 pex16
.SUFFIXES:
.SUFFIXES: .o .c .f90
.f90.o:
$(F90) $(F90FLAGS) -c $<
examples: $(SERIAL) ex6 ex5 $(PARA_ALL)
lib:
# make -C ../src -f Makefile_mac
# touch lib
ex1: ex1.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex2: ex2.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex3: ex3.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex4: ex4.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex5: ex5.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex6: ex6.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex7: ex7.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex8: ex8.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex9: ex9.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex10: ex10.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex11: ex11.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex12: ex12.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex13: ex13.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex14: ex14.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex15: ex15.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
ex16: ex16.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex1: pex1.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex3: pex3.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex3D: pex3D.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex4: pex4.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex5: pex5.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex5r: pex5r.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex6: pex6.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex7: pex7.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex8: pex8.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex9: pex9.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex10: pex10.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex11: pex11.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex12: pex12.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex14: pex14.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex13: pex13.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex15: pex15.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex16: pex16.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
pex17: pex17.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
getfile: getfile.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
testmem: testmem.o
$(F90) $(LDFLAGS) -o $@ $< $(LIBS)
test_s: $(SERIAL) ex5
@for x in $(SERIAL); do \
echo === Running $$x ===;\
./$$x ;\
echo ;\
done
@echo === Running ex5 ===;\
./ex5 < ex5.in ;\
echo ;\
test_p: $(PARA_ALL)
@for x in $(PARA); do \
echo === Running $$x ===;\
$(MPIRUN) ./$$x ;\
echo ;\
done ;\
echo === Running pex10 ===;\
mpiexec -n 12 ./pex10 ;\
echo ;\
echo === Running pex11 ===;\
mpiexec -n 8 ./pex11 ;\
echo ;\
echo === Running pex12 ===;\
mpiexec -n 4 ./pex12 2 2;\
echo ;\
echo === Running pex13 ===;\
mpiexec -n 6 ./pex13 3 2 ;\
echo ;\
echo === Running pex14 ===;\
mpiexec -n 4 ./pex14 2 2;\
echo ;\
echo === Running pex15 ===;\
mpiexec -n 6 ./pex15 3 2 ;\
echo ;\
echo === Running pex16 ===;\
mpiexec -n 4 ./pex16 ;\
echo ;\
ex1.o: lib
ex2.o: lib
ex3.o: lib
ex4.o: lib
ex5.o: lib
ex6.o: lib
ex7.o: lib
ex8.o: lib
ex9.o: lib
ex10.o: lib
ex11.o: lib
ex12.o: lib
ex13.o: lib
ex14.o: lib
ex15.o: lib
ex16.o: lib
pex1.o: lib
pex3.o: lib
pex3D.o : lib
pex4.o: lib
pex5.o: lib
pex5r.o: lib
pex6.o: lib
pex7.o: lib
pex8.o: lib
pex9.o: lib
pex10.o: lib
pex11.o: lib
pex12.o: lib
pex14.o: lib
pex13.o: lib
pex15.o: lib
pex16.o: lib
pex17.o: lib
getfile.o: lib
clean:
make -C ../src clean
rm -f *.o *~ a.out fort.* *.h5*
distclean: clean
make -C ../src distclean
rm -f lib
rm -f $(SERIAL) ex5 ex6 $(PARA_ALL) *.mod TAGS
Event Timeline
Log In to Comment