问题描述
只需升级到osx catalina。我有一些F90代码可以编译/运行。 运行gfortran 8.2.0
Makefile包含在下面
我必须重新安装xcode和命令工具才能使用“ make”,这看起来不错,但是在使用附加的makefile进行编译时,在最后一个链接命令中,出现以下错误。 Google搜索未返回相关问题,并且我在此处未看到相关文章。有人遇到过这个吗?
谢谢
mpif90 -O3 -o bin/lare3d obj/shared_data.o obj/mpi_routines.o obj/openboundary.o obj/mpiboundary.o obj/boundary.o obj/normalise.o obj/conduct.o obj/diagnostics.o obj/setup.o obj/lagran.o obj/remap.o obj/xremap.o obj/yremap.o obj/zremap.o obj/initial_conditions.o obj/output_cartesian.o obj/iocontrol.o obj/output.o obj/iocommon.o obj/input.o obj/inputfunctions.o obj/input_cartesian.o obj/eos.o obj/neutral.o obj/control.o obj/welcome.o obj/lare3d.o
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status
make: *** [bin/lare3d] Error 1
MAKEFILE IS HERE:
# Set the compiler flags
#FFLAGS = -fast#-fast #-arch pn4 -tpp7 -tune pn4 -ax
#FFLAGS = -r8 -fast -fastsse -O3 -Mipa=fast -Minline -Munroll #PGI optimised
#FFLAGS = -Mbounds -g #PGI Debug
#FFLAGS = -O3 -fast #Intel
#FFLAGS = -fpe0 -nothreads -traceback -fltconsistency -CB -g #Intel Debug
FFLAGS = -O3 #-fallow-argument-mismatch
# Set some of the build parameters
TARGET = lare3d
#Uncomment the following line to use Qmono viscosity
#QMONO = -DQ_MONO
#Uncomment the following line to run in single precision
#QSINGLE = -DQ_SINGLE
#Uncomment the following line to use fourth order RK scheme for resistive update
#QFOURTHORDER = -DQ_FOURTHTORDER
# --------------------------------------------------
# Shouldn't need to touch below here
# --------------------------------------------------
SRCDIR = src
OBjdiR = obj
BINDIR = bin
MODULEFLAG = #-module
OPFLAGS = $(QMONO) $(QSINGLE) $(QFirsTORDER)
FC = mpif90 $(OPFLAGS)
PREPROFLAGS = $(NONMPIIO)
OBJFILES = shared_data.o mpi_routines.o openboundary.o mpiboundary.o boundary.o normalise.o conduct.o diagnostics.o setup.o lagran.o \
remap.o xremap.o yremap.o zremap.o initial_conditions.o\
output_cartesian.o iocontrol.o output.o iocommon.o input.o inputfunctions.o\
input_cartesian.o eos.o neutral.o control.o\
welcome.o lare3d.o
FULLTARGET = $(BINDIR)/$(TARGET)
#vpath %.f90 $(SRCDIR)
#vpath %.o $(OBjdiR)
VPATH = $(SRCDIR):$(OBjdiR):$(SRCDIR)/core:$(SRCDIR)/io/
# Rule to build the fortran files
%.o: %.f90
@mkdir -p $(BINDIR) $(OBjdiR)
$(FC) -c $(FFLAGS) -o $(OBjdiR)/$@ $<
%.o: %.F90
@mkdir -p $(BINDIR) $(OBjdiR)
$(FC) -c $(FFLAGS) -o $(OBjdiR)/$@ $(PREPROFLAGS) $<
$(FULLTARGET): $(OBJFILES)
$(FC) $(FFLAGS)-o $@ $(addprefix $(OBjdiR)/,$(OBJFILES))
.PHONEY: clean
clean:
@rm -rf *~ $(BINDIR) $(OBjdiR) *.pbs.* *.sh.* $(SRCDIR)/*~ $(SRCDIR)/core/*~ $(SRCDIR)/io/*~ *.log
.PHONEY: tidy
tidy:
@rm -rf $(OBjdiR) *.pbs.* *.sh.* $(SRCDIR)/*~ *.log
.PHONEY: touch
touch:
@touch src/* ; touch src/core/*
.PHONEY: datatidy
datatidy:
@rm -rf Data/*
.PHONEY: visit
visit:
@cd VisIT;xml2makefile -clobber cfd.xml;make
.PHONEY: visitclean
visitclean:
@cd VisIT;make clean;rm -f .depend
# All the dependencies
shared_data.o:shared_data.F90
mpi_routines.o:mpi_routines.f90 shared_data.o
normalise.o:normalise.f90 shared_data.o
setup.o:setup.F90 shared_data.o normalise.o iocommon.o iocontrol.o input.o input_cartesian.o
mpiboundary.o: mpiboundary.f90 shared_data.o
openboundary.o: openboundary.f90 shared_data.o
boundary.o:boundary.f90 shared_data.o mpiboundary.o
xremap.o:xremap.f90 shared_data.o boundary.o
yremap.o:yremap.f90 shared_data.o boundary.o
zremap.o:zremap.f90 shared_data.o boundary.o
diagnostics.o:diagnostics.F90 shared_data.o boundary.o normalise.o output_cartesian.o output.o iocontrol.o eos.o
iocommon.o:iocommon.f90 shared_data.o
output.o:output.f90 shared_data.o iocommon.o
output_cartesian.o: output_cartesian.f90 shared_data.o iocommon.o output.o
iocontrol.o: iocontrol.f90 shared_data.o iocommon.o output.o input.o
input.o: input.f90 shared_data.o iocommon.o inputfunctions.o
inputfunctions.o: inputfunctions.f90 shared_data.o iocommon.o
input_cartesian.o: input_cartesian.f90 iocommon.o inputfunctions.o
conduct.o:conduct.f90 shared_data.o boundary.o eos.o
lagran.o:lagran.F90 shared_data.o boundary.o diagnostics.o normalise.o eos.o neutral.o conduct.o
remap.o:remap.f90 shared_data.o xremap.o yremap.o zremap.o
initial_conditions.o:initial_conditions.f90 shared_data.o normalise.o eos.o neutral.o
eos.o:eos.F90 shared_data.o normalise.o
neutral.o: neutral.f90 shared_data.o boundary.o normalise.o eos.o
control.o: control.f90 shared_data.o normalise.o
welcome.o: welcome.f90 shared_data.o
lare3d.o:lare3d.f90 shared_data.o setup.o boundary.o diagnostics.o lagran.o remap.o mpi_routines.o welcome.o initial_conditions.o openboundary.o eos.o control.o
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)