Skip to content

Commit 25bb9aa

Browse files
committed
Update to revision 1.0.7. Updates to the makefile and fixing compilation issues. See HISTORY.md.
1 parent e476f43 commit 25bb9aa

6 files changed

Lines changed: 52 additions & 27 deletions

File tree

HISTORY.md

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

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

527
- 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)

src/Makefile

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,58 +67,57 @@ endif
6767

6868
SRC = sorting.f90 enumeration_types.f90 io_utils.f90 arrow_related.f90 tree_class.f90 \
6969
labeling_related.f90 \
70-
derivative_structure_generator.f90 enumeration_utilities.f90 #\
71-
#kgrid_utilities.f90 cwrapper.f90
70+
derivative_structure_generator.f90 enumeration_utilities.f90
7271

73-
OBJS = ${SRC:.f90=.o}
72+
OBJS = ${SRC:.f90=.o}
7473
LIBS = $(LBD1)/libcomparestructs.a $(LBD1)/libutils.a $(LBD1)/libsym.a \
7574
$(LBD1)/librational.a $(LBD1)/libcombinatorics.a $(LBD2)/libpolya.a
7675
VPATH:= ../aux_src: ../src
7776

7877
.SUFFIXES :
7978
.SUFFIXES : .f .f90 .f95 .o
8079

80+
pre_comp:
81+
+$(MAKE) -C ../symlib/src
82+
+$(MAKE) -C ../polya/fortran
8183

8284
libenum.a: ${OBJS}
8385
ar ru $@ $?
8486
ranlib $@
8587

8688
all: libenum.a enum.x find_structure_in_list.x 2Dplot.x makestr.x compare_enum_files.x polya.x
8789

88-
enum.x: ${OBJS} driver.o
90+
enum.x: pre_comp ${OBJS} driver.o
8991
${F90} ${LDFLAGS} -o $@ ${OBJS} driver.o ${LIBS}
9092

91-
polya.x: ${OBJS} driver_polya.o
93+
polya.x: pre_comp ${OBJS} driver_polya.o
9294
${F90} ${LDFLAGS} -o $@ ${OBJS} driver_polya.o ${LIBS}
9395

9496
#HNF_counter.x: ${OBJS} HNF_counter.o
9597
# ${F90} ${LDFLAGS} -o $@ kgrid_utilities.o HNF_counter.o libenum.a ${#LIBS}
9698

97-
2Dplot.x: make2Dplot.o splot.o
99+
2Dplot.x: pre_comp make2Dplot.o splot.o
98100
${F90} ${LDFLAGS} -o $@ splot.o make2Dplot.o ${LIBS}
99101

100-
makestr.x: makeStr.o
102+
makestr.x: pre_comp libenum.a makeStr.o
101103
${F90} ${LDFLAGS} -o $@ makeStr.o libenum.a ${LIBS}
102104

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

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}
108+
convert_structures_to_enumformat.x: pre_comp ${OBJS} convert_structures_to_enumformat.o
109+
${F90} ${LDFLAGS} -o $@ convert_structures_to_enumformat.o libenum.a ${LIBS}
108110

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

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

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

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
120+
compare_enum_files.x: pre_comp compare_two_enum_files.o
122121
${F90} ${LDFLAGS} -o $@ compare_two_enum_files.o libenum.a ${LIBS}
123122

124123
.f95.o :
@@ -131,8 +130,12 @@ compare_enum_files.x: compare_two_enum_files.o
131130

132131

133132
CLEAN = *.o *.mod *.a *.x svn-commit.*
134-
clean :
133+
clean :
134+
+$(MAKE) clean -C ../symlib/src
135+
+$(MAKE) clean -C ../polya/fortran
135136
rm -f ${CLEAN}
136137
clobber :
138+
+$(MAKE) clobber -C ../symlib/src
139+
+$(MAKE) clobber -C ../polya/fortran
137140
rm -f ${CLEAN} *~ \#*
138141
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)