[galib] Galib and MPI Galib

Michael Kupfer Michael.Kupfer-1 at nasa.gov
Tue Jul 22 14:58:29 EDT 2008


Dear all!

I found the suggestion in the Galib mailing list, to use MPIGAlib for
parallel computing (message from April 23rd 2007).
Now, I am trying to install MPIGAlib, however encounter difficulties.
Unfortunately I was unable to find any installing troubleshooting tips or
FAQs.
Would someone be able to give me some installation help?
I am working on a MacBook Pro and I installed MPICH and of cause GAlib.
As in the installation guide described, I generated in the MPIga directory a
symbolic link to the Galib directory. Then, I adjusted the makefile and the
makevars.
When I now try to execute ³make² I get all sorts of errors and warnings such
as

-----
mpiCC -g -Wall -I.. -Iga -I. -IAM_INCLUDE -c MPIGAGeneticAlgorithm.cpp
MPIGAGeneticAlgorithm.h: In member function
'MPIGAGeneticAlgorithm::MPIGAReplacementType
MPIGAGeneticAlgorithm::replaceT(MPIGAGeneticAlgorithm::MPIGAReplacementType)
':
MPIGAGeneticAlgorithm.h:77: warning: no return statement in function
returning non-void
MPIGAGeneticAlgorithm.cpp: In constructor
'MPIGAGeneticAlgorithm::MPIGAGeneticAlgorithm(GAGeneticAlgorithm*, const
MPIGAGenome&)':
MPIGAGeneticAlgorithm.cpp:39: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp: In constructor
'MPIGAGeneticAlgorithm::MPIGAGeneticAlgorithm(GAGeneticAlgorithm&, const
MPIGAGenome&)':
MPIGAGeneticAlgorithm.cpp:66: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp: In member function 'void
MPIGAGeneticAlgorithm::migrate(MPIGAGenome&)':
MPIGAGeneticAlgorithm.cpp:142: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp:136: warning: unused variable 'flag'
MPIGAGeneticAlgorithm.cpp:178: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp:225: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp:316: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp:97: warning: enumeration value 'CUSTOM' not
handled in switch
MPIGAGeneticAlgorithm.cpp: In member function 'MPIGAGenome
MPIGAGeneticAlgorithm::bestFrom(unsigned int)':
MPIGAGeneticAlgorithm.cpp:381: error: 'cout' was not declared in this scope
MPIGAGeneticAlgorithm.cpp:382: error: 'endl' was not declared in this scope
make: *** [MPIGAGeneticAlgorithm.o] Error 1
---------

I was able to get rid of the cout and endl errors by adding ³#include
<iostream>² and ³using namespace std;²
However, then I get many more errors and warnings:

------
mpiCC -g -Wall -I.. -Iga -I. -IAM_INCLUDE -c MPIGAGeneticAlgorithm.cpp
MPIGAGeneticAlgorithm.h: In member function
'MPIGAGeneticAlgorithm::MPIGAReplacementType
MPIGAGeneticAlgorithm::replaceT(MPIGAGeneticAlgorithm::MPIGAReplacementType)
':
MPIGAGeneticAlgorithm.h:80: warning: no return statement in function
returning non-void
MPIGAGeneticAlgorithm.cpp: In constructor
'MPIGAGeneticAlgorithm::MPIGAGeneticAlgorithm(GAGeneticAlgorithm*, const
MPIGAGenome&)':
MPIGAGeneticAlgorithm.cpp:38: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp: In constructor
'MPIGAGeneticAlgorithm::MPIGAGeneticAlgorithm(GAGeneticAlgorithm&, const
MPIGAGenome&)':
MPIGAGeneticAlgorithm.cpp:65: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp: In member function 'void
MPIGAGeneticAlgorithm::migrate(MPIGAGenome&)':
MPIGAGeneticAlgorithm.cpp:141: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp:135: warning: unused variable 'flag'
MPIGAGeneticAlgorithm.cpp:177: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp:224: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp:315: warning: comparison between signed and
unsigned integer expressions
MPIGAGeneticAlgorithm.cpp:96: warning: enumeration value 'CUSTOM' not
handled in switch
mpiCC -g -Wall -I.. -Iga -I. -IAM_INCLUDE -c MPIGA1DArrayGenome.cpp
In file included from
/Users/mkupfer/NASA_UARC_work/Software_development/mpich2-1.0.7//include/mpi
.h:1142,
                 from MPIGA1DArrayGenome.cpp:16:
/Users/mkupfer/NASA_UARC_work/Software_development/mpich2-1.0.7//include/mpi
cxx.h:26:2: error: #error "SEEK_SET is #defined but must not be for the C++
binding of MPI"
/Users/mkupfer/NASA_UARC_work/Software_development/mpich2-1.0.7//include/mpi
cxx.h:30:2: error: #error "SEEK_CUR is #defined but must not be for the C++
binding of MPI"
/Users/mkupfer/NASA_UARC_work/Software_development/mpich2-1.0.7//include/mpi
cxx.h:35:2: error: #error "SEEK_END is #defined but must not be for the C++
binding of MPI"
MPIGA1DArrayGenome.h:91: error: 'istream' has not been declared
MPIGA1DArrayGenome.h:92: error: 'ostream' has not been declared
MPIGA1DArrayGenome.h: In member function 'MPIGA1DArrayGenome<T>&
MPIGA1DArrayGenome<T>::operator=(const T*)':
MPIGA1DArrayGenome.h:85: error: 'sz' was not declared in this scope
MPIGA1DArrayGenome.h: In member function 'const T&
MPIGA1DArrayGenome<T>::gene(unsigned int) const':
MPIGA1DArrayGenome.h:97: error: 'a' was not declared in this scope
MPIGA1DArrayGenome.h: In member function 'T&
MPIGA1DArrayGenome<T>::gene(unsigned int, const T&)':
MPIGA1DArrayGenome.h:99: error: 'a' was not declared in this scope
MPIGA1DArrayGenome.h:100: error: 'a' was not declared in this scope
MPIGA1DArrayGenome.h: At global scope:
MPIGA1DArrayGenome.h:241: error: 'istream' has not been declared
MPIGA1DArrayGenome.h:242: error: 'ostream' has not been declared
MPIGA1DArrayGenome.h:237: error: 'CONTENTS' was not declared in this scope
ModifiedGA1DArrayGenome.cpp: In member function 'virtual int
MPIGA1DArrayGenome<T>::resize(int)':
ModifiedGA1DArrayGenome.cpp:102: error: 'sz' was not declared in this scope
ModifiedGA1DArrayGenome.cpp: At global scope:
ModifiedGA1DArrayGenome.cpp:109: error: 'int MPIGA1DArrayGenome<T>::read' is
not a static member of 'class MPIGA1DArrayGenome<T>'
ModifiedGA1DArrayGenome.cpp:109: error: template definition of non-template
'int MPIGA1DArrayGenome<T>::read'
ModifiedGA1DArrayGenome.cpp:109: error: 'istream' was not declared in this
scope
ModifiedGA1DArrayGenome.cpp:109: error: expected primary-expression before
')' token
ModifiedGA1DArrayGenome.cpp:109: error: expected `;' before '{' token
ModifiedGA1DArrayGenome.cpp:118: error: 'int MPIGA1DArrayGenome<T>::write'
is not a static member of 'class MPIGA1DArrayGenome<T>'
ModifiedGA1DArrayGenome.cpp:118: error: template definition of non-template
'int MPIGA1DArrayGenome<T>::write'
ModifiedGA1DArrayGenome.cpp:118: error: 'ostream' was not declared in this
scope
ModifiedGA1DArrayGenome.cpp:118: error: 'os' was not declared in this scope
ModifiedGA1DArrayGenome.cpp:118: error: expected `;' before 'const'
ModifiedGA1DArrayGenome.cpp: In constructor
'MPIGA1DArrayAlleleGenome<T>::MPIGA1DArrayAlleleGenome(unsigned int, const
GAAlleleSet<T>&, float (*)(GAGenome&), void*)':
ModifiedGA1DArrayGenome.cpp:193: error: 'ElementComparator' was not declared
in this scope
ModifiedGA1DArrayGenome.cpp:193: error: there are no arguments to
'comparator' that depend on a template parameter, so a declaration of
'comparator' must be available
ModifiedGA1DArrayGenome.cpp:193: error: (if you use '-fpermissive', G++ will
accept your code, but allowing the use of an undeclared name is deprecated)
ModifiedGA1DArrayGenome.cpp:194: error: 'OnePointCrossover' was not declared
in this scope
ModifiedGA1DArrayGenome.cpp:194: error: there are no arguments to
'crossover' that depend on a template parameter, so a declaration of
'crossover' must be available
ModifiedGA1DArrayGenome.cpp: In constructor
'MPIGA1DArrayAlleleGenome<T>::MPIGA1DArrayAlleleGenome(const
GAAlleleSetArray<T>&, float (*)(GAGenome&), void*)':
ModifiedGA1DArrayGenome.cpp:209: error: 'ElementComparator' was not declared
in this scope
ModifiedGA1DArrayGenome.cpp:209: error: there are no arguments to
'comparator' that depend on a template parameter, so a declaration of
'comparator' must be available
ModifiedGA1DArrayGenome.cpp:210: error: 'OnePointCrossover' was not declared
in this scope
ModifiedGA1DArrayGenome.cpp:210: error: there are no arguments to
'crossover' that depend on a template parameter, so a declaration of
'crossover' must be available
ModifiedGA1DArrayGenome.cpp: In member function 'virtual int
MPIGA1DArrayAlleleGenome<T>::resize(int)':
ModifiedGA1DArrayGenome.cpp:264: error: 'nx' was not declared in this scope
ModifiedGA1DArrayGenome.cpp:268: error: 'a' was not declared in this scope
ModifiedGA1DArrayGenome.cpp: At global scope:
ModifiedGA1DArrayGenome.cpp:278: error: 'int
MPIGA1DArrayAlleleGenome<T>::read' is not a static member of 'class
MPIGA1DArrayAlleleGenome<T>'
ModifiedGA1DArrayGenome.cpp:278: error: template definition of non-template
'int MPIGA1DArrayAlleleGenome<T>::read'
ModifiedGA1DArrayGenome.cpp:278: error: 'istream' was not declared in this
scope
ModifiedGA1DArrayGenome.cpp:278: error: 'is' was not declared in this scope
ModifiedGA1DArrayGenome.cpp:278: error: expected `;' before '{' token
ModifiedGA1DArrayGenome.cpp:283: error: 'int
MPIGA1DArrayAlleleGenome<T>::write' is not a static member of 'class
MPIGA1DArrayAlleleGenome<T>'
ModifiedGA1DArrayGenome.cpp:283: error: template definition of non-template
'int MPIGA1DArrayAlleleGenome<T>::write'
ModifiedGA1DArrayGenome.cpp:283: error: 'ostream' was not declared in this
scope
ModifiedGA1DArrayGenome.cpp:283: error: 'os' was not declared in this scope
ModifiedGA1DArrayGenome.cpp:283: error: expected `;' before 'const'
MPIGA1DArrayGenome.cpp: In member function 'virtual void
MPIGA1DArrayGenome<T>::unpack(unsigned int)':
MPIGA1DArrayGenome.cpp:122: error: 'cout' was not declared in this scope
MPIGA1DArrayGenome.cpp:122: error: 'endl' was not declared in this scope
MPIGA1DArrayGenome.cpp: In member function 'virtual void
MPIGA1DArrayGenome<T>::send(unsigned int)':
MPIGA1DArrayGenome.cpp:217: error: 'cout' was not declared in this scope
MPIGA1DArrayGenome.cpp:217: error: 'endl' was not declared in this scope
MPIGA1DArrayGenome.cpp: In member function 'virtual void
MPIGA1DArrayGenome<T>::recv(unsigned int)':
MPIGA1DArrayGenome.cpp:229: error: 'cout' was not declared in this scope
MPIGA1DArrayGenome.cpp:229: error: 'endl' was not declared in this scope
make: *** [MPIGA1DArrayGenome.o] Error 1
----------------

Can someone help me out here?

Best,
Michael.

michael.kupfer AT nasa.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/galib/attachments/20080722/c5111382/attachment.htm


More information about the galib mailing list