diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 00000000..5761abcf --- /dev/null +++ b/src/.gitignore @@ -0,0 +1 @@ +*.o diff --git a/src/README.md b/src/README.md new file mode 100644 index 00000000..8048434a --- /dev/null +++ b/src/README.md @@ -0,0 +1,9 @@ +Linux Compilation Instructions +============================== + +Type `make` on the command line to initiate compilation. + +It may be necessary to modify `makefile`: + + * Uncomment the line `INCDIRS=-I/usr/lib/openmpi/include -I/usr/include/gdal` + * On the line beginning with `all :` remove the `clean` target from the end \ No newline at end of file diff --git a/src/flood.cpp b/src/flood.cpp index 13b3bb29..505823e4 100644 --- a/src/flood.cpp +++ b/src/flood.cpp @@ -113,7 +113,7 @@ int flood( char* demfile, char* felfile, char *sfdrfile, int usesfdr, bool verbo if(verbose) // debug writes { printf("Header read\n"); - printf("Process: %d, totalX: %d, totalY: %d\n",rank,totalX,totalY); + printf("Process: %d, totalX: %ld, totalY: %ld\n",rank,totalX,totalY); printf("Process: %d, nx: %d, ny: %d\n",rank,nx,ny); printf("Process: %d, xstart: %d, ystart: %d\n",rank,xstart,ystart); if (use_mask) @@ -149,7 +149,7 @@ int flood( char* demfile, char* felfile, char *sfdrfile, int usesfdr, bool verbo long nxm=nx/2; long nym=ny/2; elevDEM->getData(nxm,nym,tempFloat); - printf("Midpoint of partition: %d, nxm: %d, nym: %d, value: %f\n",rank,nxm,nym,tempFloat); + printf("Midpoint of partition: %d, nxm: %ld, nym: %ld, value: %f\n",rank,nxm,nym,tempFloat); fflush(stdout); } @@ -486,7 +486,7 @@ int flood( char* demfile, char* felfile, char *sfdrfile, int usesfdr, bool verbo long nxm=nx/2; long nym=ny/2; planchon->getData(nxm,nym,tempFloat); - printf("Result midpoint of partition: %ld, nxm: %ld, nym: %d, value: %f\n",rank,nxm,nym,tempFloat); + printf("Result midpoint of partition: %d, nxm: %ld, nym: %ld, value: %f\n",rank,nxm,nym,tempFloat); fflush(stdout); } diff --git a/src/streamnet.cpp b/src/streamnet.cpp index 722c6776..d690bb39 100644 --- a/src/streamnet.cpp +++ b/src/streamnet.cpp @@ -498,7 +498,7 @@ int netsetup(char *pfile,char *srcfile,char *ordfile,char *ad8file,char *elevfil if(verbose) // debug writes { printf("Files read\n"); - printf("Process: %d, TotalX: %d, TotalY: %d\n",rank,TotalX,TotalY); + printf("Process: %d, TotalX: %ld, TotalY: %ld\n",rank,TotalX,TotalY); printf("Process: %d, nx: %d, ny: %d\n",rank,nx,ny); printf("Process: %d, xstart: %d, ystart: %d\n",rank,xstart,ystart); printf("Process: %d, numOutlets: %d\n",rank,numOutlets); @@ -1131,7 +1131,7 @@ int netsetup(char *pfile,char *srcfile,char *ordfile,char *ad8file,char *elevfil long dotinc=myNumLinks/ndots; for(ilink=0;ilink i) { - sscanf(argv[i],"%d",&lyrno); + sscanf(argv[i],"%ld",&lyrno); i++; } else goto errexit; diff --git a/src/tiffIO.cpp b/src/tiffIO.cpp index cae63824..cb80a458 100644 --- a/src/tiffIO.cpp +++ b/src/tiffIO.cpp @@ -46,7 +46,7 @@ email: dtarb@usu.edu #include "ogr_api.h" // #include "tiffIO.h" Part of commonLib.h #include -#include; +#include #include "commonLib.h" #include using namespace std;