szcompressor / SZ

Error-bounded Lossy Data Compressor (for floating-point/integer datasets)
http://szcompressor.org
Other
155 stars 56 forks source link

szf.c:414:2: error: too few arguments to function ‘SZ_batchAddVar’ #30

Closed jschueller closed 5 years ago

jschueller commented 5 years ago

The latest release (2.1.5.0) fails to build with :

szf.c:414:2: error: too few arguments to function ‘SZ_batchAddVar’
  414 |  SZ_batchAddVar(s2, SZ_FLOAT, data, *errBoundMode, *absErrBound, *relBoundRatio, 0.1, 0, 0, 0, 0, *r1);
      |  ^~~~~~~~~~~~~~
In file included from sz/src/SZ-2.1.5.0/sz/include/sz.h:21,
                 from sz/src/SZ-2.1.5.0/sz/src/szf.c:14:
sz/src/SZ-2.1.5.0/sz/include/VarSet.h:62:6: note: declared here
   62 | void SZ_batchAddVar(int var_id, char* varName, int dataType, void* data,

SZ_batchAddVar has one more argument:

void SZ_batchAddVar(int var_id, char* varName, int dataType, void* data,
                        int errBoundMode, double absErrBound, double relBoundRatio,
                        double pwRelBoundRatio,
                        size_t r5, size_t r4, size_t r3, size_t r2, size_t r1);
disheng222 commented 5 years ago

Hi Julien, It seems that you didn't update the SZ code on your side correctly. We revised the code slightly last month, but the one you showed me is still old version. The new code should be like this: void sz_batchaddvar_d1float(int var_id, char varName, int len, float data, int errBoundMode, float absErrBound, float relBoundRatio, size_t r1) { int i; char s2[len+1]; for(i=0;i<len;i++) s2[i]=varName[i]; s2[len]='\0'; SZ_batchAddVar(var_id, s2, SZ_FLOAT, data, errBoundMode, absErrBound, relBoundRatio, 0.1, 0, 0, 0, 0, r1); }

Please double-check if you pulled the code completely.

Best, Sheng

On Sat, Jul 27, 2019 at 2:43 AM Julien Schueller notifications@github.com wrote:

The latest release fails to build with :

szf.c:414:2: error: too few arguments to function ‘SZ_batchAddVar’

414 | SZ_batchAddVar(s2, SZ_FLOAT, data, errBoundMode, absErrBound, relBoundRatio, 0.1, 0, 0, 0, 0, r1);

  |  ^~~~~~~~~~~~~~

In file included from sz/src/SZ-2.1.5.0/sz/include/sz.h:21,

             from sz/src/SZ-2.1.5.0/sz/src/szf.c:14:

sz/src/SZ-2.1.5.0/sz/include/VarSet.h:62:6: note: declared here

62 | void SZ_batchAddVar(int var_id, char varName, int dataType, void data,

SZ_batchAddVar has one more argument:

void SZ_batchAddVar(int var_id, char varName, int dataType, void data,

                    int errBoundMode, double absErrBound, double relBoundRatio,

                    double pwRelBoundRatio,

                    size_t r5, size_t r4, size_t r3, size_t r2, size_t r1);

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/disheng222/SZ/issues/30?email_source=notifications&email_token=ACK3KSMJGGPVDJYMVS52JADQBP4ATA5CNFSM4IHIVNZKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HB2XL6Q, or mute the thread https://github.com/notifications/unsubscribe-auth/ACK3KSLMWX6QDQRIKT6FWBDQBP4ATANCNFSM4IHIVNZA .

jschueller commented 5 years ago

You're showing me the git master, As I said I'm using the latest tag (https://github.com/disheng222/SZ/archive/v2.1.5.0.tar.gz), in which the code is different. Please tag a new version, this one is borked. v2.1.4.2 is fine though.

disheng222 commented 5 years ago

Thanks for the suggestion. Done. Just released 2.1.5.1

On Sat, Jul 27, 2019 at 8:00 AM Julien Schueller notifications@github.com wrote:

You're showing me the git master, As I said I'm using the latest tag ( https://github.com/disheng222/SZ/archive/v2.1.5.0.tar.gz), in which the code is different. Please tag a new version, this one is borked.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/disheng222/SZ/issues/30?email_source=notifications&email_token=ACK3KSOELKRUQ35OJKFFIQDQBRBFLA5CNFSM4IHIVNZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26LAWA#issuecomment-515682392, or mute the thread https://github.com/notifications/unsubscribe-auth/ACK3KSPAZPY747W6EFNQIVLQBRBFLANCNFSM4IHIVNZA .

jschueller commented 5 years ago

thanks!