FORTRAN运行程序出现 fatal error lnk1104F1002: compiler is out of heap space in pass 2(fortran4.0)

翻译机,easytran,音标,读音,翻译,英文例句,英语词典
说明:双击或选中下面任意单词,将显示该词的音标、读音、翻译等;选中中文或多个词,将显示翻译。
您的位置: ->
1)&&easytran
2)&&interpreter
[英][?n't?:pr?t?(r)]&&[美][?n't?pr?t?]
翻译程序,翻译机
3)&&machine translation
Research on processing of Chinese directional verbs in Chinese-English machine translation;
汉英机器翻译中趋向动词处理研究
Lexicon design and organization of dictionary of machine translation
一种机器翻译系统用词典的设计及其结构
On reservable structural ambiguities in Japanese-Chinese machine translation;
日中机器翻译中的可保留歧义关系
4)&&machine translation(MT)
Although remarkable improvements have been seen in the independent word sense disambiguation(WSD) models,there are still debates about the necessity to integrate the WSD models with the machine translation(MT)systems.
独立的词义消歧模型性能已经获得很大提高,但是对于独立消歧模型布机器翻译系统中应用的必要性和作用一直存在着不同的观点。
Wrapped Sentence Ecdysis (WSE), as a common structure in sentence, exists widely in natural languages and is not processed properly in Machine Translation(MT) systems at present.
文中针对一种特殊的语言现象(HNC称为包装句蜕)进行了分析,目的是为机器翻译提供一些理论支持。
Based on these findings,some implications are drawn in the hope that the knowledge of humans\' unique word-segmentation process may shed light on Chinese word-segmentation techniques in machine translation(MT)and contribute to future MT system designing,especially regarding the part of Chinese word segmentation.
本文作者接着讨论了问卷与采访的结果,将其与机器翻译实验中的相关结果进行了对比分析,并在对比中凸现人与机器在汉语分词过程中所表现出来的方法和策略差异。
It s a very import step of EBMT to find the best matched example from the example library for the sentence to be translated.
基于例子的机器翻译,其很关键的步骤之一就是如何从语料库中找到待译句子的最佳相似句。
The way is based on the NLU (Natural Language Understanding)and integrates some technologies of NLU and MT(Machine Translation).
针对军事文本标图的需求和汉语语言的特点 ,提出了一套综合利用多种自然语言处理技术和机器翻译方法的完整的面向受限领域的“类”机器翻译解决方案 ,设计出一个受限领域内的军事文本标图系统。
The past decade and over has witnessed in the realm of machine translation a worldwide surge of innovative thoughts, theories, technologies and techniques, which has contributed to the rapid commercialization of quite a number of MT systems.
现有机器翻译系统的汉英翻译水平还远不能满足人们的要求,其主要原因在于缺少一种功能强大的自然语言理论的支持。
6)&&Computer-aided machine translation
补充资料:翻译程序
&&&&  把一种程序设计语言所写的程序翻译成与之等价的另一种程序设计语言所表示的程序的软件。被翻译的程序称为源程序,书写源程序所用的程序设计语言称为源语言。相应地,翻译程序翻译出的程序称为目标程序(或结果程序),用于构成目标程序所用的语言称为目标语言(或结果语言)。    翻译程序最初是为了解决计算机不能直接执行程序设计语言所描述的程序而研制的。至今,这仍是翻译程序的主要用途。但是,随着计算机应用范围的不断扩大,又相继出现了各种类型的翻译程序,有的用于研制和调试新的软件,有的用于分析、移植和模拟已有的软件。      典型的实现途径  为了使计算机能执行程序设计语言所描述的程序,翻译程序有两种典型的实现途径,一种称为生成性途径,另一种称为解释性途径。生成性途径(图中a)的基本思想,是先由翻译程序把源程序静态地翻译为目标程序(通常是机器语言程序),然后再由计算机执行目标程序,并利用输入数据产生所需的输出结果。这种实现途径划分为两个明显的阶段,前一阶段称为生成阶段,后一阶段称为运行阶段。为了支持目标程序在运行阶段运行,通常要配置各种各样的子程序(如内存动态分配子程序、数组元素地址计算子程序等)。这些子程序的全体称为运行程序。解释性实现途径(图中 b)的基本思想,是按照源程序中语句的动态执行顺序逐句翻译,并立即予以执行。这种实现途径是将源程序的翻译和运行合并成一个解释阶段完成。两种实现途径相比,生成性途径能多遍扫视和加工源程序,翻译出运行效率较高的目标程序,但缺点是灵活性较差,且算法较繁,不易实现;相反,解释性途径易于实现,且能灵活地插入各种调试措施和动态修改源程序的功能,其缺点是重复执行的语句要多次重复翻译,运行效率较差。生成性途径适用于以加工和计算为主、要求高效运行的场合,通常用于实现面向过程的程序设计语言(如FORTRAN、ALGOL、COBOL、PL/1、PASCAL)的翻译程序,一般在成批处理方式下工作。解释性途径适用于以研究、调试和修改程序为主的场合,通常用于实现各种交互会话式语言(如BASIC、APL)的翻译程序。    具体实现翻译程序时,其实现途径可有多种变形:有的只有生成阶段,而无运行阶段;有的要经历多个生成阶段,再转入运行阶段;还有一些是在生成阶段后用解释阶段替代运行阶段。    常用的翻译程序  基于实现途径,翻译程序有生成性和解释性之分。对于生成性翻译程序,如果源语言是某一高级程序设计语言,目标语言是某一计算机(或计算机族)的汇编语言或机器语言,则这种翻译程序特称为编译程序。如果源语言是某一计算机的汇编语言,目标语言是相应计算机的机器语言,则这种翻译程序称为汇编程序。当运行目标程序的计算机内存较小,难以支持翻译程序运行(如单板机),或其程序研制环境较差不易研制系统软件或应用软件(如向量计算机)时,一种较为有效的办法是在一台研制环境较好的计算机上,配置一个能产生目标机的机器语言程序的编译程序或汇编程序。这种在某台计算机上运行,产生另一台计算机的机器语言程序的编译程序或汇编程序,称之为交叉编译程序(或交叉汇编程序)。与编译程序和汇编程序的翻译过程相反,如果源语言是?骋患扑慊?幕惚嘤镅曰蚧?饔镅?,而目标语言是某种高级程序设计语言,则这种翻译程序称为相应高级程序设计语言的逆编译程序(或反编译程序)。如果源语言是某一计算机的机器语言,而目标语言是相应计算机的汇编语言,则这种翻译程序称为逆汇编程序(或反汇编程序)。逆编译程序或逆汇编程序通常在剖析只有目标程序的软件的内部结构和实现算法时,或是在调试目标程序需要给出源程序一级上的调试信息时使用。对于解释性途径,一般将解释性翻译程序简称为解释程序。    翻译程序编写系统 (TWS)  凡有助于减轻编写翻译程序(包括编译程序、解释程序、汇编程序)工作的任何软件系统或一组软件系统,统称为翻译程序编写系统,如产生式语言的编译程序和自动分析语法的构造程序等。设计这种系统的目的,在于简化翻译程序的实现。这种系统包含很多翻译程序所必须执行的各种基本操作,如建立、查找符号表操作,生成目标代码操作等。    翻译程序编写系统可归纳为三类:①自动产生编译程序的"编译程序的编译程序"。只要给出某一高级程序设计语言的语法规则和语义描述,这些程序即能自动地产生相应语言的编译程序。②面向语法的符号加工程序。这些程序比较通用,可用于表达式的符号化简、数据格式的转换、把一种高级语言翻译为另一种高级语言等。③由可扩充语言组成的集合,允许程序员利用已有的数据类型和语句去定义新的数据类型和语句。    如果没有可供使用的翻译程序编写系统时,可采用自展法实现语言的编译程序。自展法的基本思想,是先对语言选择一小子集语言并用汇编语言或机器语言写出其编译程序;然后,利用这个小子集语言及其编译程序,编写并产生更大子集语言的编译程序;如此重复,经过一系列的扩充步骤,最后产生出最初语言的编译程序。    参考书目   D. Gries, Compiler Construction for Digital Computers, Wiley, New York,1971.  
说明:补充资料仅用于学习参考,请勿用于其它任何用途。Compaq Visual Fortran -Complier Errors Manual_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
Compaq Visual Fortran -Complier Errors Manual
阅读已结束,下载文档到电脑
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,方便使用
还剩24页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢My main question is why arrays do such weird things and whether there is any way at all to do the following in a "clean" way.
I currently have a C program foo.c interfacing a Fortran program bar.f90 via dlopen/dlsym, roughly like in the code below:
#include &dlfcn.h&
#include &stdio.h&
int main()
int i, k = 4;
double arr[k];
void * bar = dlopen("Code/Test/bar.so", RTLD_NOW | RTLD_LOCAL);
void (*allocArray)(int*);
*(void **)(&allocArray) = dlsym(bar, "__bar_MOD_allocarray");
void (*fillArray)(double*);
*(void **)(&fillArray) = dlsym(bar, "__bar_MOD_fillarray");
void (*printArray)(void);
*(void **)(&printArray) = dlsym(bar, "__bar_MOD_printarray");
double *a = (double*)dlsym(bar, "__bar_MOD_a");
for(i = 0; i & i++)
arr[i] = i * 3.14;
(*allocArray)(&k);
(*fillArray)(arr);
(*printArray)();
for(i = 0; i & 4; i++)
printf("%f ", a[i]);
printf("\n");
module bar
integer, parameter :: pa = selected_real_kind(15, 307)
real(pa), dimension(:), allocatable :: a
integer :: as
subroutine allocArray(asize)
integer, intent(in) :: asize
as = asize
allocate(a(asize))
end subroutine
subroutine fillArray(values)
real(pa), dimension(as), intent(in) :: values
a = values
end subroutine
subroutine printArray()
write(*,*) a
end subroutine
end module
Running main yields
0.000000 -nan 0..000000
which shows that Fortran allocates the array correctly and even correctly stores the given values but they are not accessible via dlsym anymore (working on that data results in segfaults). I also tried this for fixed-size arrays - the results stay the same.
Does anyone know the reason for this behaviour? I, personally, would have expected things to either work out bidirectional or alternatively not at all - this "Fortran accepting C arrays but not vice versa" makes me wonder whether there's some basic mistake I made on accessing the array from C in this fashion.
The other (and even more important) question is, how to do array accesses like these "the right way". Currently I'm not even sure if sticking to the "Fortran as .so" interface is a good way at all - I think it would also be possible to attempt mixed programming in this case. Nonetheless, the arrays issue remains - I read that this could be solved somehow using the ISO C Binding, but I couldn't figure out how, yet (I haven't worked a lot with Fortran, yet, especially not with said Binding), so help on this issue would be greatly appreciated.
Okay, so I read into the ISO C Binding a little more and found a quite useful approach . Using C_LOC I can get C pointers to my Fortran structures. Unfortunately, pointers to arrays seem to be pointers to pointers and need to be dereferenced in the C code before they can be treates as C arrays - or something like that.
Got my program to work now using C binding the way Vladimir F pointed out, at least for the most part. The C file and Fortran files are now linked together, so I can avoid the libdl interface, at least for the Fortran part - I still need to load a dynamic C library, get a function pointer to one of the symbols in there and pass that as a function pointer to Fortran, which later calls that function as part of its calculation. As said function expects double*s [arrays], I couldn't manage to pass my Fortran arrays using C_LOC, strangely - neither C_LOC(array) nor C_LOC(array(1)) passed the correct pointers back to the C function. array(1) did the trick though. Sadly, this isn't the "cleanest" way to do this. If anyone got a hint for me how to do this using the C_LOC function, that would be great. Nonetheless I accept Vladimir F's answer, as I deem it to be the safer solution.
解决方案 In my opinion it is not good practice to try to access global data in Fortran library. It can be done using COMMON blocks, but they are evil and require statically sized arrays. Generally storage association is a bad thing.
Never access the module symbols as "__bar_MOD_a" they are compiler specific and not meant to be used directly. Pass poiters using functions and subroutines.
Pass the array as a subroutine argument. You can also allocate the array in C and pass it to Fortran. What can be also done is getting a pointer to the first element of the array. It will serve es the C pointer to the array.
My solution, for simplicity without the .so, it is trivial to add it:
module bar
use iso_C_binding
implicit none
integer, parameter :: pa = selected_real_kind(15, 307)
real(pa), dimension(:), allocatable,target :: a
integer :: as
subroutine allocArray(asize,ptr) bind(C,name="allocArray")
integer, intent(in) :: asize
type(c_ptr),intent(out) :: ptr
as = asize
allocate(a(asize))
ptr = c_loc(a(1))
end subroutine
subroutine fillArray(values) bind(C,name="fillArray")
real(pa), dimension(as), intent(in) :: values
a = values
end subroutine
subroutine printArray()
bind(C,name="printArray")
write(*,*) a
end subroutine
end module
#include &dlfcn.h&
#include &stdio.h&
int main()
int i, k = 4;
double arr[k];
double *a;
void allocArray(int*,double**);
void fillArray(double*);
void allocArray();
for(i = 0; i & i++)
arr[i] = i * 3.14;
allocArray(&k,&a);
fillArray(arr);
printArray();
for(i = 0; i & 4; i++)
printf("%f ", a[i]);
printf("\n");
compile and run:
gcc -c -g main.c
gfortran -c -g -fcheck=all bar.f90
gfortran main.o bar.o
0....420000
Note: There is no reason for the returns in your Fortran subroutines, they only obscure the code.
本文地址: &
我的主要问题是,为什么阵列做这种怪异的东西,以及是否有做一个“干净”的方式下列任何方式都没有。我现在有一个C程序 foo.c的通过的dlopen / dlsym进行,大致是如下code:
的#include<&dlfcn.h中GT;#包括LT&;&stdio.h中GT;诠释的main(){INT I,K = 4;双ARR [k]的;字符* E;void *的栏=的dlopen(“code /测试/ bar.so”,RTLD_NOW | RTLD_LOCAL);无效(* allocArray)为(int *);*(无效**)(安培; allocArray)=的dlsym(巴“__bar_MOD_allocarray”);无效(* fillArray)(双*);*(无效**)(安培; fillArray)=的dlsym(巴“__bar_MOD_fillarray”);无效(* printArray)(无效);*(无效**)(安培; printArray)=的dlsym(巴“__bar_MOD_printarray”);双* A =(双*)的dlsym(巴“__bar_MOD_a”);对于(i = 0; I<我++)
改编[I] = I * 3.14;(* allocArray)(安培; K);(* fillArray)(ARR);(* printArray)();对于(I = 0; I&下; 4;我+ +)
的printf(“%F”,一个[我]);的printf(“\\ n”);返回0;}
模块吧整数参数:: PA = selected_real_kind(15,307)实(PA),尺寸(:),可分配::一整数::作为包含子程序allocArray(asize的)
整数,意图(中):: asize的
作为= asize的
分配(一(asize的))
返回结束子程序子程序fillArray(值)
实(PA),尺寸(AS),意图(中)::值
返回结束子程序子程序printArray()
返回结束子程序前端模块 运行主产
0.1 6.90..000000 -NAN 0.000000 这表明的Fortran正确分配阵列,甚至正确地存储在给定值,但它们不是通过对dlsym再访问(在段错误上的数据的结果的工作)。我也试过这个固定大小的数组 - 的结果保持不变。。有谁知道这种行为的原因是什么?我个人而言,本来期望的东西要么制定出双向或替代根本 - 这“的Fortran接受C数组而不是相反”使我怀疑是否有一些基本的错误,我在访问从C数组以这种方式进行。 其他的(甚至更重要)的问题是,如何做数组访问像这些“正确的方式”。目前,我甚至不知道是否坚持了“的Fortran作为。所以”接口是所有的好办法 - 我想这也将有可能试图在这种情况下,混合编程。尽管如此,阵列问题仍然是 - 我读这可以在某种程度上使用ISO C绑定来解决,但我无法弄清楚如何,但(我没有工作了很多的Fortran,但是,尤其不能与所述绑定) ,这样有利于对这个问题将大大AP preciated。 编辑: 好吧,所以我读入ISO C绑定多一点,发现了一个非常有用的方法here.使用 C_LOC 我能得到C指针到我的Fortran语言结构。不幸的是,指向数组的指针似乎指向指针的指针,并需要在C code到解除引用才可以作为treates C数组 - 或者类似的东西。。 编辑: 得到了我的计划,现在用C结合的方式弗拉基米尔?F指出,至少在大多数情况下工作。 C文件和Fortran文件现在是连在一起的,这样我就可以避开libdl接口,至少在Fortran语言的一部分 - 我还需要加载动态C库,在那里,通过获得一个函数指针的标志之一是作为函数指针的Fortran,后来调用函数作为其计算的一部分。至于说功能预计双* S [数组],我无法管理使用我的Fortran数组C_LOC,奇怪的传递 - 既不 C_LOC(阵列)也不 C_LOC(阵列(1))传递正确的指针回C函数。 阵列(1)的伎俩虽然。可悲的是,这是不是“最干净”的方式来做到这一点。如果任何人有一个提示,我如何做到这一点使用 C_LOC 的功能,那将是巨大的。不过我接受弗拉基米尔·F公司的答案,因为我认为它是更安全的解决方案。解决方案 在我看来,这是不好的做法,尝试用Fortran库访问全局数据。它可以使用通用模块来完成,但他们是邪恶的,需要静态大小的数组。一般存储协会是一件坏事。从不访问模块的符号为“__bar_MOD_a”它们是编译器的具体和并不意味着被直接使用。使用函数和子程序poiters通过。传递数组作为子程序的参数。您也可以分配数组中的C和它传递给Fortran语言。什么也可以做的是得到一个指针数组的第一个元素。它将成为ES的C指针数组。我的解决办法,因为没有了。所以简单,它是微不足道的添加: bar.f90
模块吧 使用ISO_C_BINDING隐无整数参数:: PA = selected_real_kind(15,307)实(PA),尺寸(:),可分配,目标::一整数::作为包含子程序allocArray(asize的,PTR)绑定(C,名字=“allocArray”)
整数,意图(中):: asize的
类型(c_ptr),意图(出):: PTR
作为= asize的
分配(一(asize的))
PTR = C_LOC(一(1))结束子程序子程序fillArray(值)绑定(C,名字=“fillArray”)
实(PA),尺寸(AS),意图(中)::值
A =值结束子程序子程序printArray()绑定(C,名字=“printArray”)
写一个结束子程序前端模块 的main.c
的#include<&dlfcn.h中GT;#包括LT&;&stdio.h中GT;诠释的main(){INT I,K = 4;双ARR [k]的;字符* E;双*一个;无效allocArray为(int *,**双);无效fillArray(双*);无效allocArray();对于(i = 0; I<我++)
改编[I] = I * 3.14;allocArray(安培; K,和放大器;一个);fillArray(ARR);printArray();对于(I = 0; I&下; 4;我+ +)
的printf(“%F”,一个[我]);的printf(“\\ n”);返回0;} 编译并运行: 的gcc -c -g main.c中gfortran -c -g -fcheck =所有bar.f90gfortran main.o中文件bar.o./a.out0.1 6.90....420000 注:没有理由在你的Fortran子程序的回报,他们只模糊了code 。
本文地址: &
扫一扫关注官方微信CMake,configue出错,以下是错误信息。怎么弄? vs2010的。_百度知道
CMake,configue出错,以下是错误信息。怎么弄? vs2010的。
The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:16 (project):
The CMAKE_C_COMPILER:
is not a full path and was not found in the PATH.
Tell CMa...
我有更好的答案
fatal error LNK1123: failure during conversion to COFF:\Program Files\Microsoft Visual Studio 10,这样的,然后粘贴到网上找就能很容易找到的。其实就是把E,我解决了。你要会读C语言的错误: file
invalid or corrupt你把这个复制。(这里我的vs2010安装在 E盘Program Files里,其实就是看这条(fatal error)&gt:您的问题我也碰到了您好;LINK .0\VC\bin里的cvtres.exe删除就好了
为您推荐:
其他类似问题
cmake的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。您所在位置: &
&nbsp&&nbsp&nbsp&&nbsp
Fortran65使用流程.doc 9页
本文档一共被下载:
次 ,您可全文免费在线阅读后下载本文档。
下载提示
1.本站不保证该用户上传的文档完整性,不预览、不比对内容而直接下载产生的反悔问题本站不予受理。
2.该文档所得收入(下载+内容+预览三)归上传者、原创者。
3.登录后可充值,立即自动返金币,充值渠道很便利
Fortran65使用流程
你可能关注的文档:
··········
··········
简单说明一次编译程序的过程:
建立一个新的Project(File-new-选择Project选项卡-Utility Project,给定project的名称),确定生成Project。
生成一个新的程序文件(File-new-选择Files选项卡-Fortran Free Format Source File,给定文件名),或是插入一个已有的程序文件(选项Project/Add to Project/Files).
用Build菜单中的Excute选项来编译并运行程序,或是只单击Build选项来只做编译,不运行程序。
要写新的程序可以另外建立一个新的Project,或是直接跟换Project中的文件。千万不要把两个独立的程序文件放入同一个Project中,否则导致编译过程出现错误。
下次修改程序时,可以直接使用File/Open Workspace来打开*.dsw的Project工程文件。
Fortran6.5安装包中包括以下文件(夹)
本人电脑-x86
进入X86文件夹,运行,中间需要输入序列号,记事本打开获取,进过中间一些文件位置的选择,到百分之九十多的时候,需要选择是否安装运行环境,选是,最后安装完成。
开始---Compaq Visual Fortran 6---Developer Studio
如果提示打开失败,则选中Developer Studio,右键 ----管理员获得所有权---就可以了
出现如下对话框:
熟悉一些tips:
If your program hangs应用程序瘫痪while running outside the debugger在调试器外运行程序, attach贴上、附加 the debugger调试器 to your program程序 by choosing Start Debug调试、除错 form the Build menu, and then choosing Attach to Process.
如果你的程序在调试器外运行,导致应用程序瘫痪,通过选择Build---Start Dubug---attach to program,讲调试器连接到你的程序。
Visual可视化 Fortran【公式翻译程式语言(formula translator)】 uses the file extension文件扩展名. F90 to indicate表示 Free Form source code自由形式的源代码, and the extensions .FOR or .F to indicate Fixed Form source code.
Visual Fortran采用拓展名为 .F90的文件来表示自由形式的源代码,扩展名为.FOR或.F的文件来表示固定形式的源代码。
You can have multiple projects in a workspace工作区. Use the Insert Project into Workspace command or select the Add to current workspace check box when you create a new project.
你可以在可以工作区拥有多个项目。使用Insert Project插入当前命令工作区,或者选择create a new project增加一个当前工作区的复选框。
When debugging调试以排除故障, you can press Alt+6 to display the Memory window.
调试的时候,你可以按Alt+6去显示记忆窗口。
Visual Fortran samples are installed in folders in …\df98\samples. You can also copy folders in …\df\samples form the CD-ROM. Samples are described in the file samples.htm.
Visual Fortran的例子被安装在文件夹 …\df98\samples中。你也可以在CD-ROM的…\df\samples文件夹中复制。例子在文件samples.htm中有描述。
Tutorial Samples教程的例子 contains one source源程序 with build instructions构建指令 as sourse comments注释. Other samples include source files源文件 and a makefil
正在加载中,请稍后...
403页48页153页34页51页183页57页57页114页153页

我要回帖

更多关于 lowlevelfatalerror 的文章

 

随机推荐