[cig-commits] [commit] master: Fixed some wrong declarations for zlib output, very strange that this worked/wasn't found before. Still testing. (4f7838a)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:01:01 PST 2014
Repository : https://github.com/geodynamics/citcomcu
On branch : master
Link : https://github.com/geodynamics/citcomcu/compare/4f7838affd00b015f9344d69fe68c026590b6cde...0682cfb4c5ae2ee04193ba2685c49b202a5315c4
>---------------------------------------------------------------
commit 4f7838affd00b015f9344d69fe68c026590b6cde
Author: thwbecker <thorstinski at gmail.com>
Date: Thu Apr 10 12:34:25 2014 -0700
Fixed some wrong declarations for zlib output, very strange that
this worked/wasn't found before. Still testing.
>---------------------------------------------------------------
4f7838affd00b015f9344d69fe68c026590b6cde
src/Makefile.gzdir_ani | 4 ++--
src/Output_gzdir.c | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/Makefile.gzdir_ani b/src/Makefile.gzdir_ani
index 075d286..df984cc 100644
--- a/src/Makefile.gzdir_ani
+++ b/src/Makefile.gzdir_ani
@@ -31,7 +31,7 @@ EXPO_FILES = expokit/dgpadm.f
EXPO_LIBS = $(EXPO_OBJS) -llapack -lblas
-LIB= $(LIB_PATH) $(LIB_LIST) $(EXPO_LIBS) -lm
+LIB= $(LIB_PATH) $(LIB_LIST) $(EXPO_LIBS) -nofor_main -lm
DEFINES = \
-DUSE_GZDIR -DUSE_GGRD -DCITCOM_ALLOW_ANISOTROPIC_VISC \
@@ -141,7 +141,7 @@ OBJFILES=$(CFILES:.c=.o) $(FFILES:.f=.o)
default: citcom.mpi
citcom.mpi: $(OBJFILES) $(HEADER) Makefile
- $(F77) $(OPTIM) $(FLAGS) $(LDFLAGS) -o citcom.mpi -nofor_main \
+ $(F77) $(OPTIM) $(FLAGS) $(LDFLAGS) -o citcom.mpi \
$(OBJFILES) $(FFTLIB) $(LIB)
clean:
diff --git a/src/Output_gzdir.c b/src/Output_gzdir.c
index 3e6990d..25fe6ca 100644
--- a/src/Output_gzdir.c
+++ b/src/Output_gzdir.c
@@ -60,7 +60,7 @@
#include "anisotropic_viscosity.h"
#endif
-static gzFile *safe_gzopen(char *,char *);
+gzFile safe_gzopen(char *,char *);
FILE *safe_fopen(char *,char *);
void *safe_malloc (size_t );
void calc_cbase_at_tp(float , float , float *);
@@ -647,7 +647,7 @@ void output_velo_related_gzdir(E, file_number)
for(i = 1; i <= E->advection.markers; i++)
gzprintf(gzout, "%g %g %g %d %d\n", E->XMC[1][i], E->XMC[2][i], E->XMC[3][i], E->CElement[i], E->C12[i]);
for(i = 1; i <= E->lmesh.nel; i++)
- fprintf(gzout, "%g\n", E->CE[i]);
+ gzprintf(gzout, "%g\n", E->CE[i]);
gzclose(gzout);
}else{
sprintf(output_file, "%s/%d/traces.%d", E->control.data_file2, file_number, E->parallel.me);
@@ -667,16 +667,16 @@ void output_velo_related_gzdir(E, file_number)
}
/* safe gzopen function */
-static gzFile *safe_gzopen(char *name,char *mode)
+gzFile safe_gzopen(char *name,char *mode)
{
- gzFile *tmp;
+ gzFile tmp;
char m2[300];
- if((tmp=(gzFile *)gzopen(name,mode))==NULL){
+ if((tmp=gzopen(name,mode))==NULL){
fprintf(stderr,"error: cannot gzopen file %s, exiting\n",
name);
parallel_process_termination();
}
- return ((gzFile *)tmp);
+ return (tmp);
}
/* gzdir version, will not limit temperatures to [0;1] */
More information about the CIG-COMMITS
mailing list