1. 完成linux的c++程序
举例:
#include<stdio.h>
int main(int argc, char** argv){
printf("hello world\n");
return 0;
}
2. 完成makefile文件,编译程序
举例:
CXX=mpiicpc
CXXFLAGS="-O2"
all:test
test:test.cpp
clean:
rm -f test
makefile文件说明:
test是生成的可执行程序名。
test.cpp是依赖的程序文件。
CXXFLAGS可以不指定。
3. 执行脚本impi.ljrs
#LJRS -N wangpeng-test
#LJRS -S /bin/bash
#LJRS -l nodes=1:ppn=1
echo this script pid is $$
echo Working directory is $LJRS_O_WORKDIR
echo \$LJRS_0_WORKDIR = $LJRS_O_WORKDIR
cd $LJRS_O_WORKDIR
echo Runing on host `hostname`
echo Time is `date`
echo Directory is `pwd`