8/06/09:

following INSTALL.txt:
- GNU Make 3.81, lex, yacc all present
- started with Makefile.inc.i686_sun_solaris5
- changed CCS from cc to gcc
- removed SCOTCH_PTHREAD, since MPICH2 1.0.2p1 is prior to 1.0.7

graph.h:110: error: expected :, ,, ;, ) or __attribute__ before vnumtab
(and so on for "restrict" attribute in graph.h,geom.h,mesh.h,arch.h,mapping.h,order.h)
- added -std=c99 to CFLAGS (based on various internet pages)

bgraph_bipart_gg.c:267: error: intptr_t undeclared
- according to various internet pages, should be included in c99 standard
- defined in /usr/include/stdint.h (also referenced in inttypes.h), so why not included?
- added -DINTSIZE64 to CFLAGS, still didn't work (based on INSTALL.txt)
- added -Dintptr_t="long int" (based on /usr/include/stdint.h)

common2.c:764: error: storage size of tp isn't known
common2.c:766: error: CLOCK_REALTIME undeclared
- added -DCOMMON_TIMING_OLD to CFLAGS (based on source code)

8/13/09:

for running as a matlab mex function:
[jschierm@astrid libscotch]$ diff common_old.h common.h
90a91,102
> #ifdef MATLAB
>     #include "mat.h"
>     #include "mex.h"
>     #include "matrix.h"
> 
>     #define printf mexPrintf
>     #define malloc mxMalloc
>     #define calloc mxCalloc
>     #define realloc mxRealloc
>     #define free mxFree
> #endif
> 

[jschierm@astrid src]$ diff Makefile_old.inc Makefile.inc
12,13c12,13
< CFLAGS        = -m64 -O3 -std=c99 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Du_int32_t=uint32_t -Du_int64_t=uint64_t -DINTSIZE64 -Dintptr_t="long int" -DCOMMON_TIMING_OLD
< LDFLAGS       = -lz -lm -lrt
---
> CFLAGS        = -m64 -O3 -std=c99 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -Du_int32_t=uint32_t -Du_int64_t=uint64_t -DINTSIZE64 -Dintptr_t="long int" -DCOMMON_TIMING_OLD -DMATLAB -fPIC -I/usr/local/pkgs/matlab-7.6/extern/include
> LDFLAGS       = -lz -lm -lrt -L/usr/local/pkgs/matlab-7.6/bin/glnxa64 -lmat -lmex

8/19/09:

- still having problems with intptr_t:
gcc: int: No such file or directory
In file included from ../libscotch/common.h:81,
                 from gmap_mex.c:75:
/usr/include/unistd.h:238: error: two or more data types in declaration
specifiers
- removed -DINTSIZE64 and -Dintptr_t="long int" from CFLAGS above
[jschierm@astrid libscotch]$ diff common_old.h common.h
68a69
> #include            <stdint.h>                    /* added for intptr_t */

8/20/09:

- must fix exits to exit within Matlab:
[jschierm@astrid libscotch]$ diff common_old.h common.h
68a69
> #include            <stdint.h>                    /* added for intptr_t */
90a92,104
> #ifdef MATLAB
>     #include "mat.h"
>     #include "mex.h"
>     #include "matrix.h"
> 
>     #define printf mexPrintf
>     #define malloc mxMalloc
>     #define calloc mxCalloc
>     #define realloc mxRealloc
>     #define free mxFree
>     #define exit(status) mexErrMsgTxt("exit=" #status)
> #endif
> 

- however, dummysizes must run by itself during compilation and exit cleanly:
[jschierm@astrid libscotch]$ diff dummysizes_old.c dummysizes.c
269a270
> #ifndef MATLAB
270a272
> #endif /* MATLAB */

- redirect errorPrint and errorPrintW to within Matlab:
[jschierm@astrid libscotch]$ diff library_error_exit_old.c
library_error_exit.c
116a117
> #ifndef MATLAB
133a135,152
> #else /* MATLAB */
>   mexPrintf  ("%s", _SCOTCHerrorProgName);
> #ifdef SCOTCH_PTSCOTCH
>   if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&
>       (proclocnum != 0)                              &&
>       (MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS))
>     mexPrintf ("(%d): ", proclocnum);
> #else /* SCOTCH_PTSCOTCH */
>   if (_SCOTCHerrorProgName[0] != '\0')
>     mexPrintf  (": ");
> #endif /* SCOTCH_PTSCOTCH */
>   mexPrintf  ("ERROR: ");
>   va_start (errlist, errstr);
>   mexPrintf (errstr, errlist);             /* Print arguments */
>   va_end   (errlist);
>   mexPrintf  ("\n");
> #endif /* MATLAB */
> 
157a177
> #ifndef MATLAB
173a194,211
> 
> #else /* MATLAB */
>   mexPrintf  ("%s", _SCOTCHerrorProgName);
> #ifdef SCOTCH_PTSCOTCH
>   if ((MPI_Initialized (&proclocnum) == MPI_SUCCESS) &&
>       (proclocnum != 0)                              &&
>       (MPI_Comm_rank (MPI_COMM_WORLD, &proclocnum) == MPI_SUCCESS))
>     mexPrintf ("(%d): ", proclocnum);
> #else /* SCOTCH_PTSCOTCH */
>   if (_SCOTCHerrorProgName[0] != '\0')
>     mexPrintf  (": ");
> #endif /* SCOTCH_PTSCOTCH */
>   mexPrintf  ("WARNING: ");
>   va_start (errlist, errstr);
>   mexPrintf (errstr, errlist);             /* Print arguments */
>   va_end   (errlist);
>   mexPrintf  ("\n");
> #endif /* MATLAB */

- redirect usagePrint to within Matlab:
[jschierm@astrid libscotch]$ diff common_old.c common.c  
102a103
> #ifndef MATLAB
105a107,111
> #else /* MATLAB */
>   mexPrintf ("Usage is:\n");
>   for (cptr = data; *cptr != NULL; cptr ++)
>     mexPrintf ("  %s\n", *cptr);
> #endif /* MATLAB */

8/21/09:

- removed -DCOMMON_PTHREAD from CFLAGS and MFLAGS to eliminate fatal exception at pthread_exit in gmap_mex.c
- removed -DCOMMON_FILE_COMPRESS_GZ from CFLAGS and MFLAGS because unused

8/25/09:

added macro for fprintf to capture missing output:
[jschierm@astrid libscotch]$ diff common_old.h common.h
68a69
> #include            <stdint.h>                    /* added for intptr_t */
90a92,105
> #ifdef MATLAB
>     #include "mat.h"
>     #include "mex.h"
>     #include "matrix.h"
> 
>     #define printf mexPrintf
>     #define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__))
>     #define malloc mxMalloc
>     #define calloc mxCalloc
>     #define realloc mxRealloc
>     #define free mxFree
>     #define exit(status) mexErrMsgTxt("exit=" #status)
> #endif
> 

11/12/09:

- added -Wl,-rpath-link,/usr/local/pkgs/matlab-7.6/bin/glnxa64 to LDFLAGS to eliminate missing libhdf5.so.0 in Matlab directories (based on Cielo make, but why did this not occur before?)

11/18/09:

- changed the following files to allow adjir,adjjc,vertlab,vertwgt,edgewgt rather than graph file

libscotch/library.h
- argument list for SCOTCH_graphLoad
libscotch/library_graph.c
- SCOTCH_graphLoad changes and call to graphLoad
libscotch/graph.h
- argument list for graphLoad
libscotch/graph_io.c
- graphLoad changes
libscotch/graph_io_scot.c
- miscellaneous call to graphLoad
libscotch/mesh_io_scot.c
- miscellaneous call to graphLoad
libscotch/library_graph_f.c
- miscellaneous call to SCOTCH_graphLoad
scotch/gmap_mex.c
- input/processing of Matlab arguments and call to SCOTCH_graphLoad

11/30/09:

- changed the following files to allow nvert,maptab rather than map file

libscotch/library.h
- argument list for SCOTCH_graphMapSave
libscotch/library_graph_map.c
- SCOTCH_graphMapSave changes and call to mapSave
libscotch/mapping.h
- argument list for mapSave
libscotch/mapping_io.c
- mapSave changes
libscotch/library_graph_map_f.c
- miscellaneous call to SCOTCH_graphMapSave
scotch/gmap_mex.c
- call to SCOTCH_graphMapSave and processing/output of Matlab arguments

12/08/09:

- changed the following files to allow archtyp,napar,archpar rather than target file

libscotch/library.h
- argument list for SCOTCH_archLoad
libscotch/library_arch.c
- SCOTCH_archLoad changes and call to archLoad
libscotch/arch.h
- argument list for archLoad
libscotch/arch.c
- archLoad changes and call to class->archLoad
libscotch/arch_cmplt.h
libscotch/arch_cmpltw.h
libscotch/arch_deco.h
libscotch/arch_hcub.h
libscotch/arch_mesh.h
libscotch/arch_tleaf.h
libscotch/arch_torus.h
- argument lists for arch*ArchLoad
libscotch/arch_cmplt.c
libscotch/arch_cmpltw.c
libscotch/arch_deco.c
libscotch/arch_hcub.c
libscotch/arch_mesh.c
libscotch/arch_tleaf.c
libscotch/arch_torus.c
- arch*ArchLoad changes
libscotch/library_arch_f.c
- miscellaneous call to SCOTCH_archLoad
scotch/gmap_mex.c
- input/processing of Matlab arguments and call to SCOTCH_archLoad

12/11/09:

- fixed a couple bugs

libscotch/graph.c -- caused crash when trying to free vertex labels
138c138,141
<     if (grafptr->vlbltax != NULL)
---
> /*  vlbltax must also check GRAPHVERTGROUP (jes, 12/11/09)  */
> //    if (grafptr->vlbltax != NULL)
>     if ((grafptr->vlbltax != NULL) &&
>         ((grafptr->flagval & GRAPHVERTGROUP) == 0))

libscotch/mapping_io.c -- caused first vertex label to be uninitialized
> /*  not sure why, but need to offset vlbltax in other direction (jes, 12/11/09
> //                 (long) ((vlbltax != NULL) ? vlbltax[vertnum] : vertnum),
>                  (long) ((vlbltax != NULL) ? vlbltax[vertnum+mappptr->baseva

1/05/10:

libscotch/graph_io.c -- if vertex labels are supplied, they must be referenced
263c265,268
<       edgeval=adjir[edgenum-grafptr->baseval]+1;
---
>       if (vertlab)
>         edgeval=vertlab[adjir[edgenum-grafptr->baseval]  ];
>       else
>         edgeval=        adjir[edgenum-grafptr->baseval]+1;


