| 查看: 534 | 回复: 3 | |||||
| 当前主题已经存档。 | |||||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||||
beefly专家顾问 (职业作家)
地沟油冶炼专家
|
[交流]
【交流】pc-gamess for linux出现semget failed问题的解决办法
|
||||
|
如果多次杀死pc-gamess的进程,经常会导致后面的pc-gamess任务无法正常提交,在输出文件中出现如下的出错信息: p0_30545: p4_error: semget failed for setnum: 8 这是某些通信端口没有正常关闭造成的。在网上找到了解决办法:把以下命令(两行星号之间)存成可执行的脚本文件,并运行。 这个脚本仅对pc-gamess有效,对gamess-us不起作用。 ******************* #! /bin/sh # courtesy of Jarek Nieplocha, to clean ipc's # Modified by Bill Gropp to apply only to calling user ipccmd=ipcrm for arg in "$@" ; do case $arg in -help|-u|-us*|-h) echo "cleanipcs [-show] [-echo]" exit 1 ;; -echo) set -x ;; -show) ipccmd="echo ipcrm" ;; *) if [ -n "$arg" ] ; then echo "Unrecognized argument $arg" exit 1 fi ;; esac done # # LINUX uses an incompatible form of the ipcrm command! Try to detect this # An earlier version looked at the output of ipcrm, but that output # keeps changing. The following code from Ralf Wildenhues attempts to # use the Linux /proc interface. #statvalue=`ipcrm 2>&1` #if [ $? != 0 ] ; then # if [ "$statvalue" = 'usage: ipcrm [shm | msg | sem] id' ] ; then # UseLinux=1 # fi #fi #if [ $UseLinux = 0 ] ; then if [ x`uname -s` = xLinux ] ; then # try to use /proc interface if possible # and hope it does not change too often if [ -r /proc/sysvipc/shm ] ; then cat /proc/sysvipc/shm \ | gawk '{if ($8 == uid) printf("%s %s\n", comm, $2)}' uid=$UID comm="$ipccmd shm " \ | sh > /dev/null else ipcs -m \ | gawk '{if ($3 == name) printf("%s %s\n", comm, $2)}' name=$LOGNAME comm="$ipccmd shm " \ | sh > /dev/null fi if [ -r /proc/sysvipc/sem ] ; then cat /proc/sysvipc/sem \ | gawk '{if ($5 == uid) printf("%s %s\n", comm, $2)}' uid=$UID comm="$ipccmd sem " \ | sh > /dev/null else ipcs -s \ | gawk '{if ($3 == name) printf("%s %s\n", comm, $2)}' name=$LOGNAME comm="$ipccmd sem " \ | sh > /dev/null fi else $ipccmd `ipcs | awk '{if ((($1 == "m" || ($1 == "s" ) && ($5 == "'$LOGNAME'" ) print sprintf("-%s %s",$1,$2) }'`fi # # Here is the old LINUX code # # # # For LINUX, we need this instead: # ipcs -m | gawk '{if ($3 == name) printf("%s %s\n", comm, $2)}' name=$LOGNAME comm="$ipccmd shm " | sh > /dev/null # ipcs -s | gawk '{if ($3 == name) printf("%s %s\n", comm, $2)}' name=$LOGNAME comm="$ipccmd sem " | sh > /dev/null # # mpirun could call this for systems that use SYSV shared memory features, # just to keep them friendly. ******************* [ Last edited by mingdong on 2009-9-14 at 16:58 ] |
» 猜你喜欢
全日制(定向)博士
已经有5人回复
假如你的研究生提出不合理要求
已经有10人回复
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有4人回复
Materials Today Chemistry审稿周期
已经有4人回复
参与限项
已经有3人回复
实验室接单子
已经有4人回复
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复

snoopyzhao
至尊木虫 (职业作家)
- 应助: 157 (高中生)
- 贵宾: 0.02
- 金币: 18844.7
- 红花: 29
- 帖子: 3803
- 在线: 1422.4小时
- 虫号: 183750
- 注册: 2006-02-13
- 专业: 污染生态化学
3楼2008-12-02 12:22:47
marklee1975
木虫 (小有名气)
- 应助: 1 (幼儿园)
- 金币: 1137.9
- 散金: 50
- 帖子: 82
- 在线: 13.4小时
- 虫号: 312992
- 注册: 2007-02-24
- 专业: 电化学
2楼2008-12-02 11:54:38













|| ($1 == "s"
回复此楼
虽然没有遇见过你提到的问题但是还是顶一下,呵呵,头一次在这个论坛里看见用PC GAMESS的!