对Fortran源代码(.F、.F90之类的文件)采用cpp -P -C预处理时,如果生成的.f、.f90之类文件中含有以下内容,可以在预处理时对cpp命令添加-nostdinc变成cpp -P -C -nostdinc。
/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
. */
从4.7版本开始支持C++ 11版。
Intel编译器默认对.f文件采用固定格式编译,可以考虑添加-free参数试试。
一般是程序中数组访问越界导致的,采用Intel编译器编译时可以添加-check bounds检查此项(运行时当访问越界时会报错),采用GCC可以添加-fcheck=bounds选项。
ldd 可执行文件,可以查看其所连接的动态共享库。
module程序负责在程序运行前设定所需要的环境变量,中心系统没有预先加载默认的软件执行环境,用户需要针对不同的应用区别化加载对应所需的运行环境模块。
必知的关键使用示例:
其他用法见module -h 与中心网站资料手册。
.a文件是静态链接库文件,.so是动态链接库文件,系统的一般在/usr/lib64、/usr/lib下,或者locate 该文件名、find /opt -name "*文件":
.h文件是头文件,系统的一般在/usr/include下,或者locate 该.h文件名、find /opt -name "*头文件名.h":