niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » SGI/IRIX » apps
TD-DFT program Octopus on SGI IRIX
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
Author Message
corn
*nix forums beginner


Joined: 13 Jul 2005
Posts: 3

PostPosted: Sat Jun 03, 2006 2:35 am    Post subject: TD-DFT program Octopus on SGI IRIX Reply with quote

Here's how to make the time-dependent density functional theory (TD-DFT)
program Octopus 2.0.1 from http://www.tddft.org/ work on SGI IRIX.

Software used:
SGI IRIX 6.5.29f
SGI MIPSPro f90 7.4.2 + patches 4605, 5075, 5845, 7005, 7009
SGI Scientific Library (SCSL) 1.4.1.3
gcc 3.3 from http://freeware.sgi.com
GNU make-3.80 from http://freeware.sgi.com
gsl 1.8 from http://www.gnu.org/software/gsl
fftw 3.1.1 from http://www.fftw.org
blas from http://www.netlib.org/blas/index.html
lapack from http://www.netlib.org/lapack/index.html
arpack from http://www.netlib.org/arpack/index.html
SPARSKIT 2 from http://www-users.cs.umn.edu/~saad/software/SPARSKIT/sparskit.html

0. gunzip -c octopus-2.0.1.tar.gz | tar -xvf - ; cd octopus-2.0.1

1. vi +209 liboct/oct_f.c
change
*sec = 0
*usec = 0
to
*sec = 0;
*usec = 0;

2. vi +48 libxc/lca.c
move
int j;
double rs, drsdd, vs, vs2, kf, dkfdrs, f, s, dsdrs;
to right after
int i;
a few lines up.

3. vi +/"rk(3" src/crystal.F90
change
FLOAT :: rk(3,*), w(*) , al(3,3)
to
FLOAT :: rk(3,nrk), w(*) , al(3,3)

4. vi +49 liboct/varinfo.c
before "char *get_token(char *s, char **dest)" add

/* --------------------------------------------------------- */
/* strndup is a GNU extension, which is another way of saying
* it's not portable. The code below allows machines without
* it to use Octopus. */
char* strndup(const char* src, size_t max_len)
{ size_t len = strnlen( src, max_len );
char* ret = malloc( len + 1 );
if( ret ) {
strncpy( ret, src, len );
ret[ len ] = 0; }
return ret; }

int strnlen(const char* s, size_t max)
{ size_t i = 0;
while ( i < max && *s)
++i, ++s;
return i; }

and a few lines below, make the additions/changes shown with <<<<

void get_text(FILE *in, char **dest)
{
char c, line[256];
int b; <<<<

for(;Wink{
/* check if the next line starts by a space */
if((b=getc(in)) == EOF) return; <<<<
c=(char) b; <<<<
ungetc(c, in);

5. vi +16 build/var2html.pl
replace
mkdir("$out_dir");
with
`mkdir $out_dir`;

6. Configure, build and install. This assume that the gsl and fftw libraries
were installed in /usr/local/lib, and that the octopus executable will end
up in /usr/local/bin.

setenv LD_LIBRARY_PATH /usr/lib32:/usr/freeware/lib32:/usr/local/lib
setenv LD_LIBRARYN32_PATH /usr/lib32:/usr/freeware/lib32:/usr/local/lib
setenv GSL_CONFIG /usr/local/bin/gsl-config
setenv CFLAGS "-s -O3"
setenv FCFLAGS "-INLINE -s -O3"
setenv FCFLAGS_f90 "-s -O3"
setenv MAKE gmake
../configure CC=/usr/freeware/bin/gcc FC="/usr/bin/f90 -cpp" CPP="/usr/freeware/bin/cpp
-C -ansi" FCCPP="/usr/freeware/bin/cpp -C -ansi" --with-fft-lib=/usr/local/lib/libfftw3.a
--with-gsl-prefix=/usr/local/lib --exec-prefix=/usr/local
gmake install

You can use various additional libraries, just keep adding the appropriate
--with-xxx for them, such as:

--with-blas='-L/usr/local/lib -lblas'
--with-lapack='-L/usr/local/lib -llapack'
--with-sparskit='-L/usr/local/lib -lskit'
--with-arpack='-L/usr/local/lib -larpack'

I suppose this depends on how much time you're willing to kill waiting for
them to compile before you first compile Octopus. I wasn't very patient and
just installed gsl and fftw at first, and then the other libraries later and
did another configure, compile and install. Also, '-lscs' works for
--with-blas if you installed SGI's SCSL.

Then copy over an input file to any directory you happen to be in later,
naming the input file "inp" and type in

/usr/local/bin/octopus >&! someoutputfilename &

and that's it. (">&!" redirect assumes csh or tcsh, change if need be)

--
pen7cmc / yahoo
--
You don't expect me to actually test my code before posting?
-- bena@xenon.triode.net.au / alt.unix.wizards / 26 May 1998 05:43:15 GMT
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] View previous topic :: View next topic
The time now is Thu Dec 04, 2008 1:03 am | All times are GMT
navigation Forum index » *nix » SGI/IRIX » apps
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Need help getting Sony DAT tape drive to work on Irix 6.5 trebor SGI/IRIX 1 Sun Apr 13, 2008 3:19 am
No new posts can u solve this program :P bawen C++ 0 Mon Jul 24, 2006 6:26 pm
No new posts Need Help with Program in Perl on a Netware Server fhadzocos@gmail.com Perl 3 Fri Jul 21, 2006 1:57 pm
No new posts bind keyboard POWER button to start some program Vladi Lemurov Debian 1 Fri Jul 21, 2006 6:00 am
No new posts Recommend an email program for the debian-user-digest? DJ Hackenbruch Debian 5 Fri Jul 21, 2006 3:20 am

Loans | Share Prices | Mortgage Calculator | Hipster Blog | Free Credit Report
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 1.1478s ][ Queries: 16 (1.0255s) ][ GZIP on - Debug on ]