Skip to content

Commit 4973e77

Browse files
author
Paulo Vinicius da Costa Medeiros
committed
Hello, world. I'm BandUP, now on GitHub.
1 parent 3d697c6 commit 4973e77

File tree

117 files changed

+45532
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+45532
-0
lines changed

COPYING

+674
Large diffs are not rendered by default.

build.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
4+
working_dir=`pwd`
5+
bin_folder="${working_dir}/BandUP_bin"
6+
mkdir -p ${bin_folder}
7+
rm -f ${bin_folder}/BandUP.x
8+
cd src
9+
make
10+
make clean
11+
mv -f BandUP.x ${bin_folder}
12+
cd ${working_dir}

build_MPI.sh

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
mpi="impi/4.0.3.008"
4+
5+
working_dir=`pwd`
6+
bin_folder="${working_dir}/BandUP_bin"
7+
mkdir -p ${bin_folder}
8+
rm -f ${bin_folder}/BandUP_MPI.x
9+
cd src
10+
module load $mpi
11+
make -f Makefile_MPI
12+
make clean -f Makefile_MPI
13+
mv -f BandUP_MPI.x ${bin_folder}
14+
cd ${working_dir}

src/Makefile

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Adapted from:
2+
# Makefile-Fortran: A Makefile for a simple Fortran project
3+
# Copyright (C) 2009 Davide Cesari, dcesari <at> arpa.emr.it
4+
# Available at http://www.webalice.it/o.drofa/davide/makefile-fortran/makefile-fortran.html
5+
# Distributed according to the GNU GPL license.
6+
# This makefile works with the GNU make command, the one find on
7+
# GNU/Linux systems and often called gmake on non-GNU systems
8+
# ======================================================================
9+
# Declarations
10+
# ======================================================================
11+
# The compiler
12+
FC = ifort
13+
# Required flags: "-assume byterecl" is required for the compilation of the read_wavecar_mod module
14+
FCFLAGS = -assume byterecl
15+
# Shared memory parallelization
16+
FCFLAGS += -openmp -parallel
17+
# Flags for maximum performance, portability, etc. Comment (or modify) as necessary.
18+
#FCFLAGS += -static
19+
FCFLAGS += -O2 -ipo
20+
#FCFLAGS += -O2 -ipo -xHost
21+
#FCFLAGS += -O2 -xAVX # Uncomment if you have an Intel processor supporting the AVX instruction set
22+
# Enable/disable warnings and remarks
23+
FCFLAGS += -warn unused
24+
FCFLAGS += -diag-disable remark
25+
26+
# List of executables to be built within the package
27+
SRC = main_BandUP.f90
28+
OBJ = ${SRC:.f90=.o}
29+
EXE = BandUP.x
30+
31+
# "make" builds all
32+
all: $(EXE)
33+
34+
band_unfolding_routines_mod.o: math_mod.o
35+
read_wavecar_mod.o: math_mod.o general_io_mod.o
36+
io_routines_mod.o: math_mod.o strings_mod.o general_io_mod.o read_wavecar_mod.o
37+
$(OBJ): math_mod.o io_routines_mod.o read_wavecar_mod.o band_unfolding_routines_mod.o
38+
$(EXE): math_mod.o band_unfolding_routines_mod.o general_io_mod.o read_wavecar_mod.o strings_mod.o io_routines_mod.o $(OBJ)
39+
40+
# ======================================================================
41+
# General rules
42+
# ======================================================================
43+
$(EXE): $(OBJ)
44+
$(FC) $(FCFLAGS) -o $@ $^ $(LDFLAGS)
45+
46+
%.o: %.f90
47+
$(FC) $(FCFLAGS) -c $<
48+
49+
%.o: %.F90
50+
$(FC) $(FCFLAGS) -c $<
51+
52+
# Utility targets
53+
.PHONY: clean veryclean
54+
55+
clean:
56+
rm -f *.o *.mod *.MOD
57+
58+
veryclean: clean
59+
rm -f *~ $(EXE)
60+

src/Makefile_MPI

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Adapted from:
2+
# Makefile-Fortran: A Makefile for a simple Fortran project
3+
# Copyright (C) 2009 Davide Cesari, dcesari <at> arpa.emr.it
4+
# Available at http://www.webalice.it/o.drofa/davide/makefile-fortran/makefile-fortran.html
5+
# Distributed according to the GNU GPL license.
6+
# This makefile works with the GNU make command, the one find on
7+
# GNU/Linux systems and often called gmake on non-GNU systems
8+
# ======================================================================
9+
# Declarations
10+
# ======================================================================
11+
# The compiler
12+
FC = ifort
13+
# Required flags: "-assume byterecl" is required for the compilation of the read_wavecar_mod module
14+
FCFLAGS = -assume byterecl
15+
# Parallelization
16+
FCFLAGS += -Nmpi -openmp -parallel
17+
# Flags for maximum performance, portability, etc. Comment (or modify) as necessary.
18+
FCFLAGS += -O2 -ipo
19+
#FCFLAGS += -O2 -ipo -xHost
20+
#FCFLAGS += -O2 -xAVX # Uncomment if you have an Intel processor supporting the AVX instruction set
21+
# Enable/disable warnings and remarks
22+
FCFLAGS += -warn unused
23+
FCFLAGS += -diag-disable remark
24+
25+
# List of executables to be built within the package
26+
SRC = main_BandUP_MPI.f90
27+
OBJ = ${SRC:.f90=.o}
28+
EXE = BandUP_MPI.x
29+
30+
# "make" builds all
31+
all: $(EXE)
32+
33+
band_unfolding_routines_mod.o: math_mod.o
34+
read_wavecar_mod.o: math_mod.o general_io_mod.o
35+
io_routines_mod.o: math_mod.o strings_mod.o general_io_mod.o read_wavecar_mod.o
36+
$(OBJ): math_mod.o io_routines_mod.o read_wavecar_mod.o band_unfolding_routines_mod.o
37+
$(EXE): math_mod.o band_unfolding_routines_mod.o general_io_mod.o read_wavecar_mod.o strings_mod.o io_routines_mod.o $(OBJ)
38+
39+
# ======================================================================
40+
# General rules
41+
# ======================================================================
42+
$(EXE): $(OBJ)
43+
$(FC) $(FCFLAGS) -o $@ $^ $(LDFLAGS)
44+
45+
%.o: %.f90
46+
$(FC) $(FCFLAGS) -c $<
47+
48+
%.o: %.F90
49+
$(FC) $(FCFLAGS) -c $<
50+
51+
# Utility targets
52+
.PHONY: clean veryclean
53+
54+
clean:
55+
rm -f *.o *.mod *.MOD
56+
57+
veryclean: clean
58+
rm -f *~ $(EXE)
59+

0 commit comments

Comments
 (0)