Changeset 2867 in Sophya


Ignore:
Timestamp:
Jan 3, 2006, 3:18:57 PM (20 years ago)
Author:
ansari
Message:

Portage/compilation sur AIX-XlC (regatta) - Reza 3 Jan 2006

Location:
trunk/SophyaLib
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/datatype.cc

    r2615 r2867  
    66#include "sopnamsp.h"
    77#include "datatype.h"
     8#include "typeinfo.h"
    89
    910#include <complex>
     
    1314{
    1415}
    15 #if defined(__SGICC__)
     16#if defined(__SGICC__) || defined(__IBMCPP__)
    1617template <class T>
    1718string DataTypeInfo<T>::getTypeName()
     
    116117
    117118#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
     119namespace SOPHYA {
    118120template class DataTypeInfo<uint_1>;
    119121template class DataTypeInfo<uint_2>;
     
    127129template class DataTypeInfo< complex<r_4> >;
    128130template class DataTypeInfo< complex<r_8> >;
     131}
    129132#endif
  • trunk/SophyaLib/BaseTools/fiondblock.cc

    r2805 r2867  
    186186
    187187#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
     188namespace SOPHYA {
    188189// Instances des delegues FileIO (PPersist)
    189190template class FIO_NDataBlock<uint_1>;
     
    198199template class FIO_NDataBlock< complex<r_4> >;
    199200template class FIO_NDataBlock< complex<r_8> >;
     201}
    200202#endif
  • trunk/SophyaLib/BaseTools/machdefs_mkmf.h

    r2615 r2867  
    321321#ifndef ANSI_TEMPLATES
    322322#define ANSI_TEMPLATES
     323#endif
    323324#undef  DECL_TEMP_SPEC
    324325#define DECL_TEMP_SPEC template <>
    325326#endif
     327
     328#if defined(__IBMCPP__)
     329/* IBM xlC compiler support Added : dec 2005 */
     330#ifndef ANSI_TEMPLATES
     331#define ANSI_TEMPLATES
     332#endif
     333#undef  DECL_TEMP_SPEC
     334#define DECL_TEMP_SPEC template <>
    326335#endif
    327336
  • trunk/SophyaLib/BaseTools/ndatablock.cc

    r2657 r2867  
    789789
    790790#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
     791namespace SOPHYA {
    791792template class NDataBlock<uint_1>;
    792793template class NDataBlock<uint_2>;
     
    800801template class NDataBlock< complex<r_4> >;
    801802template class NDataBlock< complex<r_8> >;
     803}
    802804#endif
  • trunk/SophyaLib/SysTools/commander.cc

    r2856 r2867  
    15781578  pev += '=';
    15791579  pev += vv;
    1580 #if defined(Linux)
     1580#if defined(Linux) || defined(AIX)
    15811581// Reza - 28/04/2004
    15821582// putenv de Linux ne declare pas la variable char *string const
    15831583// On ne doit meme pas utiliser une variable automatique 
    15841584// J'alloue donc un nouveau tableau - mais qui va le liberer ?
     1585// Idem AIX , Reza Dec 2005
    15851586  char* bev = new char[pev.size()+1];
    15861587  strcpy(bev, pev.c_str());
  • trunk/SophyaLib/SysTools/cxxcmplnk.cc

    r2802 r2867  
    4444"-O -no_implicit_include -pthread";
    4545static char * SGICC_opt =  "-O -prelink -D__SGICC__ -LANG:std";
     46static char * xlC_opt =
     47"-O -qrtti=all -qeh=v6";
    4648
    4749/* --Methode-- */
     
    116118  syscomp += "icc/"; 
    117119#endif
     120#if defined( __IBMCPP__ )
     121  compCmd = "xlC ";
     122  compOptions = xlC_opt;
     123  linkOptions = xlC_opt + string(" -brtl -qmkshrobj ");
     124  syscomp += "xlC/"; 
     125#endif
    118126
    119127#ifndef Darwin
     
    131139  char* varenv=NULL;
    132140  varenv=getenv("SOPHYABASE");
     141  string sbaserep = "./";
    133142  if (varenv) {
    134143    fgenv1 = true;
    135     string sbaserep = varenv;
     144    sbaserep = varenv;
    136145    if (sbaserep[sbaserep.length()-1] != '/')  sbaserep += '/';
    137146    cppFlags += ( " -I" + sbaserep + "include/ ");
     
    159168  if (fglibsophya) linkOptions += " -lsophya ";
    160169  if (fglibextsophya) linkOptions += " -lextsophya ";
     170#if defined( AIX )
     171  cout << " ++++==++ DBG/CxxCompilerLinker() - in AIX fglibpi= "
     172       << ((fglibpi) ? " true " : " false ")  << endl;
     173  // Reza:Dec 2005 : pb avec les programmes PI sur AIX si linke avec shared lib PI
     174  // (Portage sur regatta.calcul.u-psud.fr AIX 5.3 , libXm Xt X11 en .a uniquement)
     175  if (fglibpi) {
     176    linkOptions += " -L" + sbaserep + "lib/";
     177    linkOptions += " -lPIext -lPIGcont -lPI -lXm -lXt -lX11 -lpthread ";
     178  }
     179#else
    161180  if (fglibpi) linkOptions += " -lPI ";
     181#endif
    162182  linkOptions += " -lm ";
    163183
  • trunk/SophyaLib/SysTools/pdlmgr.cc

    r2615 r2867  
    9797    if (path.length() > 0)  cmd += path + ':';
    9898    cmd += varenv;
    99     putenv(const_cast<char *>(cmd.c_str()));
     99    //AIX: l'argument de putenv n'est pas const (Reza Dec 2005)
     100    //On fait un new - mais qui fait le delete ?
     101    char * pevc = new char [cmd.length()+1];
     102    strcpy(pevc, cmd.c_str());
     103    putenv(pevc);
    100104    }
    101105
     
    172176#endif
    173177#elif defined(AIX)
    174   cmd = "ld -G -bnogc -bexpall -bM:1L -o " + fnameso + " " + fnameobj;
     178  //  cmd = "ld -G -bnogc -bexpall -bM:1L -o " + fnameso + " " + fnameobj;
     179  cmd = "cc -brtl -qmkshrobj -o " + fnameso + " " + fnameobj + " -lm -lc";;
    175180#elif defined(HPUX)
    176181  cmd = "ld -b -o " + fnameso + " " + fnameobj + " -lm -lc";
Note: See TracChangeset for help on using the changeset viewer.