Fetching contributors…
Cannot retrieve contributors at this time
88 lines (75 sloc) 2.3 KB
#! /usr/bin/perl
# setupscript
# setupscript for the exciting code
print "---------------------------------------------------------\n";
opendir(PDIR, "build/platforms") || die("Cannot open directory");
@makeincfiles= sort(readdir(PDIR));
#print @makeincfiles;
foreach $file (@makeincfiles){
if($file=~ m/make\.inc\.(.+$)/)
{ $platform=$1;
print $count." ".$platform;
print ("\n");
if ($count%20==0) {
print "type enter for more";
print "\nEnter the number of the platform that suites your system best: ";
if ($sel>$count-1 || $sel<1 || $sel=~m/^$/ || $sel!~m/^\d+$/) {
print "\ntry again\n\n";
print "\nYou use the makefile from:\n\n build/platforms/" . @fileslist[$sel];
print "\n\nIf it doesnt compile, edit build/ and type make again"
$filename="build/platforms/" . @fileslist[$sel];
$return= system(@args);
print "\nIf you have MPI installed you can build exciting with k-point parallelization support.\n\n";
print "build MPI binary ? (yes/No) ";
system("echo \"BUILDMPI=true\">>build/");
print "Select the mechanism to include MPI interface variables\n";
print " 1 use MPI module (f90 interfaces) recommended if available\n";
print " 2 use #include <mpif.h> required by some MPI implementations
(edit path in build if mpif.h is not in your includepath)\n";
if($mpiinclude==1) {$includefile="";}
if($mpiinclude==2) {$includefile="";}
system(("cp", "build/platforms/$includefile", "build/"));
}elsif($MPI=~m/no/i) {
system("echo \"BUILDMPI=false\">>build/");
print "please chose yes or no";
print "\nIf you have multithreaded BLAS/LAPACK installed you can build exciting with SMP support.\n\n";
print "build SMP lib binary (yes/No) ";
system("echo \"BUILDSMP=true\">>build/");
}elsif ($SMP=~m/no/i)
system("echo \"BUILDSMP=false\" >>build/");
print "please chose yes or no";