Skip to content

Commit 829db94

Browse files
authored
Merge pull request #39 from wsmorgan/master
Fixed errors with compilation of some of the lesser used executables. Removed polya submodule.
2 parents 9fdf547 + 209a2ca commit 829db94

8 files changed

Lines changed: 61 additions & 40 deletions

File tree

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "polya"]
2-
path = polya
3-
url = https://github.com/rosenbrockc/polya
41
[submodule "symlib"]
52
path = symlib
63
url = https://github.com/msg-byu/symlib

HISTORY.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Revision History for `enumlib`
22

3+
## Revision 1.0.8
4+
5+
- Removed Polya submodule.
6+
7+
## Revision 1.0.7
8+
9+
- Removed makestructin.x from the makefile since it's driver is no
10+
longer part of the repository.
11+
12+
- Swapped the order of fname in the calling interface of
13+
read_struct_enum_out in io_utils.f90 so that it appears last in the
14+
list as discussed is issue #33.
15+
16+
- Changed f2name in compare_two_enum_file.f90 so that it is
17+
allocatable as discussed in issue #33.
18+
19+
- Rewrote the driver so that it will compile the symlib and polya
20+
depenencies when it compiles enumlib.
21+
22+
- Removed the 'use io_utils' from
23+
aux_src/convert_structures_to_enumform.f90 as mentioned in issue
24+
#37. The convert_structures_to_enumform.x executable now compiles.
25+
26+
- Fixed the maxLabLength in makePerovStr.f90 to be 100. Also fixed the
27+
call to reduce_to_shortest_basis as described in issue #38.
28+
329
## Revision 1.0.6
430

531
- The maximum allowed binomial, max_binomial in

aux_src/compare_two_enum_files.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ program compare_two_struct_enum
88
use io_utils
99
use derivative_structure_generator
1010
implicit none
11-
character(800) f1name, title, f2name, dummy
11+
character(800) f1name, title, dummy
12+
character(len=:), allocatable :: f2name
1213
real(dp), dimension(3,3) :: pLV1, pLV2
1314
integer, dimension(3,3,1):: L, SNF
1415
real(dp), pointer :: dset1(:,:), dset2(:,:), sLVlist(:,:,:)
@@ -45,7 +46,7 @@ program compare_two_struct_enum
4546
call read_struct_enum_out_oldstyle(title,LatDim1,pLV1,nD1,dset1,k,eq,Nmin,Nmax,eps,full,dLabel,digit,f1name,crange)
4647
!call read_struct_enum_out(title,LatDim2,pLV2,nD2,dset2,k,eq,Nmin,Nmax,eps,full,pLabel,digit,f2name,crange,conc_check)
4748
!write(*,'("Read file ",a80)') f1name
48-
call read_struct_enum_out(title,LatDim2,pLV2,nD2,dset2,k,eq,Nmin,Nmax,eps,full,dLabel,digit,f2name,crange)
49+
call read_struct_enum_out(title,LatDim2,pLV2,nD2,dset2,k,eq,Nmin,Nmax,eps,full,dLabel,digit,crange,f2name)
4950
!!print *,"latdim1",latdim1,"latdim2"
5051
!!if (LatDim1/=LatDim2) stop "Bulk/surf modes are not the same in the input files"
5152
if (.not. equal(pLV2,pLV1,eps)) stop "Parent lattice vectors are not equivalent"

aux_src/convert_structures_to_enumformat.f90

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,9 @@ MODULE ce_types
563563
!! file to enumformat with the help of lat.in the main concept is
564564
!! taken from find_structure_in_list. </summary>
565565
program convert_structures_to_enumformat
566-
!use num_types
567566
use enumeration_utilities
568567
use ce_types
569568
use vector_matrix_utilities
570-
use io_utils
571569
use symmetry
572570
implicit none
573571

aux_src/makePerovStr.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
PROGRAM makeStr
55
use num_types
66
use vector_matrix_utilities
7+
use cwrapper
78
implicit none
89
character(80) fname, title, strname, strNstring
9-
character(maxLabLength) :: labeling
10+
character(100) :: labeling
1011
integer ioerr, iline, z1, z2, z3, ic, i, ilab, pgOps, nD, hnfN, iFace
1112
integer k, strN, sizeN, nAt, diag(3), a,b,c,d,e,f, HNF(3,3), L(3,3)
1213
real(dp) :: p(3,3), sLV(3,3), Sinv(3,3), sLVorig(3,3), eps, v(3), Binv(3,3), sLVinv(3,3), face(3,3)
@@ -94,7 +95,7 @@ PROGRAM makeStr
9495
write(12,'("scale factor")')
9596
! Make "nice" superlattice vectors (maximally orthogonal, Minkowski reduced)
9697
sLVorig = matmul(p,HNF)
97-
call reduce_to_shortest_basis(sLVorig,sLV,eps)
98+
call aflow_reduce_to_shortest_basis(sLVorig,sLV,eps)
9899
call matrix_inverse(sLV,sLVinv)
99100
do i = 1,3
100101
write(12,'(3f12.8)') sLV(:,i)

polya

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Makefile

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,43 @@ SHELL = /bin/bash
88

99
# enumlib library paths
1010
LBD1 = ../symlib/src
11-
LBD2 = ../polya/fortran
1211

1312
FOUND = false
1413
ifeq (${F90},gfortran) # gfortran compiler
1514
ifeq (${DEBUG},false)
16-
FFLAGS = -O3 -ffree-line-length-none -fno-underscoring -I${LBD1} -I${LBD2}
15+
FFLAGS = -O3 -ffree-line-length-none -fno-underscoring -I${LBD1}
1716
FOUND = true
1817
else
19-
FFLAGS = -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I${LBD1} -I${LBD2}
18+
FFLAGS = -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I${LBD1}
2019
FOUND = true
2120
endif
2221
endif
2322

2423
ifeq (${F90},ifc) # Intel compiler
25-
FFLAGS = -fPIC -g -error-limit 7 -traceback -check bounds -warn -I${LBD1} -I${LBD2}
24+
FFLAGS = -fPIC -g -error-limit 7 -traceback -check bounds -warn -I${LBD1}
2625
FOUND = true
2726
endif
2827

2928
ifeq (${F90},ifort) # Intel compiler
3029
ifeq (${DEBUG},false)
31-
FFLAGS = -fPIC -O3 -I${LBD1} -I${LBD2}
30+
FFLAGS = -fPIC -O3 -I${LBD1}
3231
FOUND = true
3332
else
3433
# F90 = /opt/intel/fc/10.0.016/bin/ifort
35-
FFLAGS = -fPIC -g -debug -error-limit 7 -heap-arrays -traceback -check bounds -warn -I${LBD1} -I${LBD2}
34+
FFLAGS = -fPIC -g -debug -error-limit 7 -heap-arrays -traceback -check bounds -warn -I${LBD1}
3635
FOUND = true
3736
#-prof-use -prof-dir .
3837
endif
3938
endif
4039

4140

4241
ifeq (${F90},xlf90) # IBM compiler
43-
FFLAGS = -g -C -fPIC -qsuffix=f=f90 -I${LBD1} -I${LBD2}
42+
FFLAGS = -g -C -fPIC -qsuffix=f=f90 -I${LBD1}
4443
FOUND = true
4544
endif
4645
ifeq (${F90},f95) # Absoft PPC compiler
4746
# FFLAGS = -profile -p ${LBDR}
48-
FFLAGS = -g -Rb -Rc -fPIC -nodefaultmod -p ${LBD1} -I${LBD2} #-ea
47+
FFLAGS = -g -Rb -Rc -fPIC -nodefaultmod -p ${LBD1} #-ea
4948
# B80 show entry in subprograms ; Rb bounds; Rc array conformance;
5049
# z2 warning level
5150
# -O3 optimization
@@ -67,58 +66,56 @@ endif
6766

6867
SRC = sorting.f90 enumeration_types.f90 io_utils.f90 arrow_related.f90 tree_class.f90 \
6968
labeling_related.f90 \
70-
derivative_structure_generator.f90 enumeration_utilities.f90 #\
71-
#kgrid_utilities.f90 cwrapper.f90
69+
derivative_structure_generator.f90 enumeration_utilities.f90
7270

73-
OBJS = ${SRC:.f90=.o}
71+
OBJS = ${SRC:.f90=.o}
7472
LIBS = $(LBD1)/libcomparestructs.a $(LBD1)/libutils.a $(LBD1)/libsym.a \
75-
$(LBD1)/librational.a $(LBD1)/libcombinatorics.a $(LBD2)/libpolya.a
73+
$(LBD1)/librational.a $(LBD1)/libcombinatorics.a
7674
VPATH:= ../aux_src: ../src
7775

7876
.SUFFIXES :
7977
.SUFFIXES : .f .f90 .f95 .o
8078

79+
pre_comp:
80+
+$(MAKE) -C ../symlib/src
8181

8282
libenum.a: ${OBJS}
8383
ar ru $@ $?
8484
ranlib $@
8585

8686
all: libenum.a enum.x find_structure_in_list.x 2Dplot.x makestr.x compare_enum_files.x polya.x
8787

88-
enum.x: ${OBJS} driver.o
88+
enum.x: pre_comp ${OBJS} driver.o
8989
${F90} ${LDFLAGS} -o $@ ${OBJS} driver.o ${LIBS}
9090

91-
polya.x: ${OBJS} driver_polya.o
91+
polya.x: pre_comp ${OBJS} driver_polya.o
9292
${F90} ${LDFLAGS} -o $@ ${OBJS} driver_polya.o ${LIBS}
9393

9494
#HNF_counter.x: ${OBJS} HNF_counter.o
9595
# ${F90} ${LDFLAGS} -o $@ kgrid_utilities.o HNF_counter.o libenum.a ${#LIBS}
9696

97-
2Dplot.x: make2Dplot.o splot.o
97+
2Dplot.x: pre_comp make2Dplot.o splot.o
9898
${F90} ${LDFLAGS} -o $@ splot.o make2Dplot.o ${LIBS}
9999

100-
makestr.x: makeStr.o
100+
makestr.x: pre_comp libenum.a makeStr.o
101101
${F90} ${LDFLAGS} -o $@ makeStr.o libenum.a ${LIBS}
102102

103-
find_structure_in_list.x: ${OBJS} find_structure_in_list.o
103+
find_structure_in_list.x: pre_comp ${OBJS} find_structure_in_list.o
104104
${F90} ${LDFLAGS} -o $@ enumeration_utilities.o find_structure_in_list.o libenum.a ${LIBS}
105105

106-
convert_structures_to_enumformat.x: ${OBJS} convert_structures_to_enumformat.o
107-
${F90} ${LDFLAGS} -o $@ enumeration_utilities.o convert_structures_to_enumformat.o libenum.a ${LIBS}
106+
convert_structures_to_enumformat.x: pre_comp ${OBJS} convert_structures_to_enumformat.o
107+
${F90} ${LDFLAGS} -o $@ convert_structures_to_enumformat.o libenum.a ${LIBS}
108108

109-
makestr.2d: makeStr2d.o
109+
makestr.2d: pre_comp makeStr2d.o
110110
${F90} ${LDFLAGS} -o $@ makeStr2d.o libenum.a ${LIBS}
111111

112-
makeperovstr.x: makePerovStr.o
113-
${F90} ${LDFLAGS} -o $@ makePerovStr.o ${LIBS}
112+
makeperovstr.x: pre_comp cwrapper.o makePerovStr.o
113+
${F90} ${LDFLAGS} -o $@ cwrapper.o makePerovStr.o ${LIBS}
114114

115-
makestructin.x: makeStrIn.o
116-
${F90} ${LDFLAGS} -o $@ makeStrIn.o libenum.a ${LIBS}
115+
randReduceTest.x: pre_comp cwrapper.o random_lattice_driver.o
116+
${F90} ${LDFLAGS} -o $@ cwrapper.o random_lattice_driver.o libenum.a ${LIBS}
117117

118-
randReduceTest.x: random_lattice_driver.o
119-
${F90} ${LDFLAGS} -o $@ random_lattice_driver.o libenum.a ${LIBS}
120-
121-
compare_enum_files.x: compare_two_enum_files.o
118+
compare_enum_files.x: pre_comp compare_two_enum_files.o
122119
${F90} ${LDFLAGS} -o $@ compare_two_enum_files.o libenum.a ${LIBS}
123120

124121
.f95.o :
@@ -131,8 +128,10 @@ compare_enum_files.x: compare_two_enum_files.o
131128

132129

133130
CLEAN = *.o *.mod *.a *.x svn-commit.*
134-
clean :
131+
clean :
132+
+$(MAKE) clean -C ../symlib/src
135133
rm -f ${CLEAN}
136134
clobber :
135+
+$(MAKE) clobber -C ../symlib/src
137136
rm -f ${CLEAN} *~ \#*
138137
make

src/io_utils.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ MODULE io_utils
3030
!!<parameter name="digit"></parameter>
3131
!!<parameter name="fname" regular="true"></parameter>
3232
!!<parameter name="cRange"></parameter>
33-
subroutine read_struct_enum_out(title,LatDim,pLV,nD,d,k,eq,Nmin,Nmax,eps,full,label,digit,fname,cRange)
33+
subroutine read_struct_enum_out(title,LatDim,pLV,nD,d,k,eq,Nmin,Nmax,eps,full,label,digit,cRange,fname)
3434

3535
character(80) :: title, pLatTyp, fullpart
3636
character(len=:), allocatable, optional :: fname

0 commit comments

Comments
 (0)