How to solve MANTYPE problem in NPACI Rocks 4.2

I have seen the first problem in using NPACI Rocks 4.2. The symptom is I was unable to submit just a basic job to SGE because of following error in standard error file.

MANTYPE: Undefined variable

The job script is as below.


echo Hello

However, it turned out that below job script worked just fine.

#$ -S /bin/sh

echo Hello

Interesting! That's mean there was some problem with csh since the default shell in SGE is csh. It seems there is no way to change default shell so I have to fix this problem other way around. And then I found a clue. The problem is somewhere in /etc/profile.d. So I looked for MANTYPE in there using grep MANTYPE /etc/profile.d/* and finally found a problem in java.csh. The cause is MANTYPE was referred to without declaration.

So the solution is to declare MANTYPE prior usage.

diff -u profile.d.orig/bio.csh profile.d/bio.csh
--- profile.d.orig/bio.csh      2006-09-15 11:19:32.000000000 +0700
+++ profile.d/bio.csh   2006-09-15 11:50:39.000000000 +0700
@@ -1,6 +1,10 @@
 set path = ( $path /opt/Bio/ncbi/bin /opt/Bio/mpiblast/bin/ /opt/Bio/Emboss/bin /opt/Bio/clustalw/bin /opt/Bio/t_coffee/bin /opt/Bio/phylip/exe /opt/Bio/mrbayes /opt/Bio/fasta /opt/Bio/glimmer/bin /opt/Bio/glimmer/scripts )

-setenv MANPATH ${MANPATH}:/opt/Bio/ncbi/doc/man:/opt/Bio/hmmer/man
+if !( ${?MANPATH} ) then
+    setenv MANPATH /opt/Bio/ncbi/doc/man:/opt/Bio/hmmer/man
+    setenv MANPATH ${MANPATH}:/opt/Bio/ncbi/doc/man:/opt/Bio/hmmer/man

 setenv BLASTDB  /share/bio/ncbi/db
 setenv BLASTMAT /opt/Bio/ncbi/data
diff -u profile.d.orig/java.csh profile.d/java.csh
--- profile.d.orig/java.csh     2006-09-14 23:01:00.000000000 +0700
+++ profile.d/java.csh  2006-09-15 11:53:01.000000000 +0700
@@ -82,6 +82,11 @@
 # java version differs by arch

+setenv SGE_ROOT /opt/gridengine
+setenv SGE_ARCH $SGE_ROOT/util/arch
+set DEFAULTMANPATH = $SGE_ROOT/util/arch -m
+set MANTYPE = $SGE_ROOT/util/arch -mt
 setenv JAVA_HOME  /usr/java/jdk1.5.0_07
 set path = ( $JAVA_HOME/bin $path)
 if ( $?MANPATH == 1 ) then
Common subdirectories: profile.d.orig/RCS and profile.d/RCS

Lastly, you have to distribute bio.csh and java.csh to all compute nodes to make SGE work.

Tags: technorai:npaci rocks, technorai:sge, technorai:csh

Post new comment

The content of this field is kept private and will not be shown publicly.