【发布时间】:2021-12-22 13:49:51
【问题描述】:
我尝试在我的 macbook 上使用 gfortran 编译代码 https://github.com/msg-byu/enumlib。但是,它显示了以下错误。
use io_utils, only: co_ca
1
Error: Symbol ‘co_ca’ referenced at (1) not found in module ‘io_utils’
make: *** [makeStr.o] Error 1
我尝试添加 -cpp 标志,但没有成功。你能帮帮我吗? 这是 Makefile。
当我添加co_ca 以在public 中定义时,它起作用了,但显示了一些警告,如下所示:
gfortran -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I../symlib/src -c io_utils.f90
io_utils.f90:52:98:
52 | subroutine read_struct_enum_out(title,LatDim,pLV,nD,d,k,eq,Nmin,Nmax,eps,full,label,digit,cRange,fname)
| 1
Warning: Unused dummy argument ‘crange’ at (1) [-Wunused-dummy-argument]
gfortran -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I../symlib/src -c arrow_related.f90
gfortran -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I../symlib/src -c tree_class.f90
tree_class.f90:483:18:
483 | index = index + binomial(nLeft-site_i, count(new_labeling(site_i:)==1)-1)
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
tree_class.f90:224:14:
224 | I = I - nchoosek(ell-1,t-1)
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
tree_class.f90:110:37:
110 | self%branches(species_i) = nchoosek(sum(self%colors(species_i:)),self%colors(species_i))
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
gfortran -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I../symlib/src -c labeling_related.f90
labeling_related.f90:1624:9:
1624 | nl = multinomial(iConc)
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
labeling_related.f90:1550:18:
1550 | count = count + (-1)**p*nchoosek(m,p)*tc
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
labeling_related.f90:942:8:
942 | x = idx
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
labeling_related.f90:946:14:
946 | bnml = binomial(i-1,t-1)
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
labeling_related.f90:918:21:
918 | xTemp = xTemp + binomial(nLeft - iM, count(mask(iM:)==1)-1)
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
labeling_related.f90:888:15:
888 | C(iK) = binomial(nLeft,conc(iK))
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
labeling_related.f90:727:20:
727 | quot = labIndx/multiplier(ilab) ! How many times does k(i) divide the number
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
labeling_related.f90:310:83:
310 | SUBROUTINE generate_permutation_labelings(k,n,nD,perm,lab,iConc,parLabel,parDigit,degeneracy_list,fixed_cells)
| 1
Warning: Unused dummy argument ‘pardigit’ at (1) [-Wunused-dummy-argument]
labeling_related.f90:58:64:
58 | SUBROUTINE recursively_stabilized_enum(perm,conc,symsize,knary,SNF,LT,HNF,HNFcnt,hnf_degen,nfound,scount,fixOp,iBlock,equivalencies,inactives,permIndx,allowed,fixedcell,aperms)
| 1
Warning: Unused dummy argument ‘knary’ at (1) [-Wunused-dummy-argument]
labeling_related.f90:1487:35:
1487 | SUBROUTINE make_translation_group(d,trans)
| ^
Warning: ‘make_translation_group’ defined but not used [-Wunused-function]
labeling_related.f90:1583:52:
1583 | SUBROUTINE generate_disjoint_permutation_labelings(k,n,nD,perm,lab,iConc,parLabel,parDigit)
| ^
Warning: ‘generate_disjoint_permutation_labelings’ defined but not used [-Wunused-function]
gfortran -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I../symlib/src -c enumeration_routines.f90
gfortran -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I../symlib/src -c derivative_structure_generator.f90
derivative_structure_generator.f90:1600:17:
1600 | size_count = size_count + this_count*nHNF
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
derivative_structure_generator.f90:1601:18:
1601 | total_count = total_count + this_count*nHNF
| 1
Warning: Possible change of value in conversion from INTEGER(8) to INTEGER(4) at (1) [-Wconversion]
gfortran -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I../symlib/src -c enumeration_utilities.f90
enumeration_utilities.f90:86:57:
86 | if (minkowskiReduce) call minkowski_reduce_basis(sLV,sLV,eps)
| 1
Warning: Same actual argument associated with INTENT(OUT) argument ‘out’ and INTENT(IN) argument ‘in’ at (1)
ar ru libenum.a sorting.o enumeration_types.o io_utils.o arrow_related.o tree_class.o labeling_related.o enumeration_routines.o derivative_structure_generator.o enumeration_utilities.o
ar: creating archive libenum.a
ranlib libenum.a
gfortran -fPIC -g -fbounds-check -Wall -ffree-line-length-none -fno-underscoring -I../symlib/src -c ../aux_src/makeStr.f90
../aux_src/makeStr.f90:13:67:
13 | integer ioerr, iline, ic, i, ilab, pgOps, nD, hnfN, iAt, jAt, iSpec, nSpec, idx, foutput_unit
| 1
Warning: Unused variable ‘ispec’ declared at (1) [-Wunused-variable]
gfortran -o makestr.x makeStr.o libenum.a ../symlib/src/libcomparestructs.a ../symlib/src/libutils.a ../symlib/src/libsym.a ../symlib/src/librational.a ../symlib/src/libcombinatorics.a
【问题讨论】:
-
您是否正在使用上述库编译自写部分,因为看起来引用的
co_ca是库中的private成员 -
co_ca 写在模块 io_utils "call co_ca(10,err)" 中。我在图书馆里没看到。
-
私有函数可以在它定义的模块中使用,但很可能不会被导出也不会写入
.mod文件 -
我不确定我应该做什么。我已经向编码员报告了,但直到现在没有任何回应。
-
从院长和教学回来,我太忙了,无法跟上我所有的 github 存储库。我希望在 4 月底开始解决所有未解决的问题和 PRs
标签: gfortran