HARPgroup / cbp_wsm

1 stars 0 forks source link

Run Model #9

Closed mortezayazdi closed 6 years ago

mortezayazdi commented 6 years ago

Hi, properties of my Ubuntu: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial

1.First of all, I downloaded the file from ftp://ftp.chesapeakebay.net/modeling/phase5/community/P532/

  1. I install Ubuntu, and I run, sudo apt-get upgrade , sudo apt-get update,
  2. Then I run: tar xvjf p532c (decompress tar file in ubuntu)
  3. I tried to install ksh, gfortran, g77 and f77, I could instal ksh and gfortran, but about g77 it says "E: Package 'g77' has no installation candidate", and for f77 says "E: Unable to locate package f77"
  4. Then I go to folder " p532c/run/make_seglists "
  5. I run this command: "csh basingen.csh p532cal_062211 JB0_7660_0000" it is related to a segment in Virginia Beach.
  6. Ifaced with error " csh basingen.csh p532cal_062211 JB0_7660_0000 ../../..//code/bin/basingen.exe: error while loading shared libraries: libg2c.so.0: cannot open shared object file: No such file or directory"

Plz let me know how can I fix that.

rburghol commented 6 years ago

Thanks for all the details. I will try to go step by step along with yours to show what I would do differently (and hopefully it will work!). The most important thing is the new package that we are creating here which has updates to compile successfully on Ubuntu 16.04 (step #1), but then also you need to make sure that you have the f77 software (#4), and then once all that is in place, you skipped the step whereby you actually compile the model software (step #5). If all those go well you will be on your way! If not, reply back showing the errors that you get and we will try to help you out.

  1. Rather than the package you downloaded from ftp.chesapeakebay.net, use the one that is in this repository, with the command "git clone https://github.com/rburghol/cbp_wsm.git"
  2. OK
  3. No need - the git copy wll already be unpacked (it will create a directory cbp_wsm)
  4. On Ubuntu 16.04, f77 comes with the standard gnu compilers, I used the following to install gnu compilers (gcc):
    sudo apt-get install gcc
    sudo apt-get install pkg-config
    sudo apt install build-essential
    sudo apt install flex
  5. Once you have installed gcc, you need to compile the model, by doing:
    cd cbp_wsm/code/src
    ./compile_all.csh
  6. Then you should go to the folder "p532c/run/make_seglists" and proceed on.
mortezayazdi commented 6 years ago
  1. cd cbp_wsm/code/src ./compile_all.csh

it has many errors,

r - ioparvar.o r - getall.o r - getrivfacs.o r - zipall.o r - ../../../../lib/get_lib.a r - ../../../../lib/util_lib.a ############ COMPILE CALIBRATION ############ a_priori_irc basingen copy_phase4_segs divide_rseg_by_stream_order EOF_to_EOS_factors get1parameter get_pltgen_percentiles get_total_watershed_size_for_part make_calib_seglist f77: error: ../../hspf/lib3.2/lib//adwdmlib.a: No such file or directory f77: error: ../../hspf/lib3.2/lib//utillib.a: No such file or directory f77: error: ../../hspf/lib3.2/lib//wdmlib.a: No such file or directory f77: error: ../../hspf/lib3.2/lib//adwdmlib.a: No such file or directory r - ioparvar.o r - getall.o r - getrivfacs.o r - zipall.o r - ../../../../lib/get_lib.a r - ../../../../lib/util_lib.a ############ COMPILE CALIBRATION ############ a_priori_irc basingen copy_phase4_segs divide_rseg_by_stream_order EOF_to_EOS_factors get1parameter get_pltgen_percentiles get_total_watershed_size_for_part make_calib_seglist make_calib_site_list make_first_order_calib_list make_incremental_calib_list make_WQ_incremental_calib_list postproc_for_censored_data f77: error: ../../hspf/lib3.2/lib//wdmlib.a: No such file or directory f77: error: ../../hspf/lib3.2/lib//adwdmlib.a: No such file or directory f77: error: ../../hspf/lib3.2/lib//utillib.a: No such file or directory read_dot_out_file reverse_seglist riverinfo split_seglists ############# COMPILATION COMPLETED #########

Then I went to folder "p532c/run/make_seglists" and I run this command: "csh basingen.csh p532cal_062211 JB0_7660_0000" and face with this error again: ../../..//code/bin/basingen.exe: error while loading shared libraries: libg2c.so.0: cannot open shared object file: No such file or directory"

mortezayazdi commented 6 years ago

Compile Errors for ./compile_all.csh

New Text Document.txt

rburghol commented 6 years ago

The good news is that you only have 3 errors, they are just repeated like a hundred times. They are:

f77: error: ../../hspf/lib3.2/lib//wdmlib.a: No such file or directory
f77: error: ../../hspf/lib3.2/lib//adwdmlib.a: No such file or directory
f77: error: ../../hspf/lib3.2/lib//utillib.a: No such file or directory

Ebrahim and I already figured these out, and we should have it posted in the issue queue here somewhere -- not sure why the updated source code didn't fix these, I honestly thought that it did. But, since you have downloaded this via a git clone, once you get it sorted out we can give you the ability to commit the fixes to the repository so it will be available for everyone. I will ping Ebrahim and see if he can lend us a hand to try to remember how we fixed this error and to make sure that we document the fix here in the issue queue.

mortezayazdi commented 6 years ago

I've downloaded the file from https://github.com/rburghol/cbp_wsm.git cbp_wsm-master.zip

I checked the folder hsfp/lib3.2/lib but, there is not wdmlib.a, ...

rburghol commented 6 years ago

I checked the folder hsfp/lib3.2/lib but, there is not wdmlib.a, ...

Precisely - that's what the compile error is telling you. But to be certain that you are using the most up to date code base, and one that will allow you to generate repository updates if something needs to be fixed, please use the command that I listed in my first response (git clone https://github.com/rburghol/cbp_wsm.git). I can't guarantee that using git will fix it, but it's important that we know we are working with the same code (and when I installed on a new Ubuntu system with git clone it worked no problem).

If you do not have git, then you can install it with: sudo apt-get install git

mortezayazdi commented 6 years ago

I fixed that, that was my bad I did:

  1. git clone https://github.com/rburghol/cbp_wsm.git
  2. cd cbp_wsm/code/src ./compile_all.csh
  3. New Text Document (3).txt There is just 3 errors about " Warning: Character length of actual argument shorter than of dummy argument ‘tabnam’ (11/64) at (1) ############# DATA_IMPORT ######### f77: error: ../../river/part/part_sub.o: No such file or directory ############ POSTUTILS ######### f77: error: getAtdep/getatdep.a: No such file or directory f77: error: getAtdep/getatdep.a: No such file or directory "

What should I do after that? :)

mortezayazdi commented 6 years ago

After that, I went to the folder "p532c/run/make_seglists" and run : csh basingen.csh p532cal_062211 JB0_7660_0000 but same error: ../../..//code/bin/basingen.exe: error while loading shared libraries: libg2c.so.0: cannot open shared object file: No such file or directory"

rburghol commented 6 years ago

Gotta fix the errors, otherwise, running make_seglists is not going to work:

" Warning: Character length of actual argument shorter than of dummy argument ‘tabnam’ (11/64) at (1)
############# DATA_IMPORT #########
f77: error: ../../river/part/part_sub.o: No such file or directory
############ POSTUTILS #########
f77: error: getAtdep/getatdep.a: No such file or directory
f77: error: getAtdep/getatdep.a: No such file or directory "
mortezayazdi commented 6 years ago

Hi again, How can I fix these errors?

rburghol commented 6 years ago

Sorry to delay response. The part_sub.o error is something I can't reproduce, but I CAN reproduce the getatdep.a error, and the fix is as follows:

cd code/src/postproc/postutils/sumin/getAtdep
./compile
cd code/src/postproc/postutils/sumin_QA/getAtdep
./compile

I am trying now to see why the compile is skipping that directory, and will update the code base. However, if you want to perform those commands manually, do as I wrote above (first cd to wherever you put the code) and let me know. Again, you may still have the part_sub.o error, but we can cross that bridge after we solve the getAtdep trouble.

mortezayazdi commented 6 years ago

I did cd code/src/postproc/postutils/sumin/getAtdep ./compile cd code/src/postproc/postutils/sumin_QA/getAtdep ./compile

Then I run it again, and I didn't face with any error except in last part:

############ COMPILE CALIBRATION ############ a_priori_irc basingen copy_phase4_segs divide_rseg_by_stream_order EOF_to_EOS_factors f77: error: sumout/sumout.a: No such file or directory f77: error: sumout/sumout.a: No such file or directory

is it important? or I can run the model with this error?

rburghol commented 6 years ago

Looking at the error you got - looks like you need to repeat a similar process for sumout that you did for sumin

hth, /r/b

On Tue, Sep 19, 2017 at 10:39 AM, mortezayazdi notifications@github.com wrote:

I did cd code/src/postproc/postutils/sumin/getAtdep ./compile cd code/src/postproc/postutils/sumin_QA/getAtdep ./compile

Then I run it again, and I didn't face with any error except in last part:

############ COMPILE CALIBRATION ############ a_priori_irc basingen copy_phase4_segs divide_rseg_by_stream_order EOF_to_EOS_factors f77: error: sumout/sumout.a: No such file or directory f77: error: sumout/sumout.a: No such file or directory

is it important? or I can run the model with this error?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rburghol/cbp_wsm/issues/9#issuecomment-330561217, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXAIuhunQzKnKRNgIcHLVtR_plEkO6Mks5sj9IrgaJpZM4OtELH .

--

Robert W. Burgholzer 'Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.' - Charles Mingus Athletics: http://athleticalgorithm.wordpress.com/ Science: http://robertwb.wordpress.com/ Wine: http://reesvineyard.wordpress.com/

mortezayazdi commented 6 years ago

I could run the model for Virginia beach segment. thank you so much. Your model works correctly.

rburghol commented 6 years ago

Good news - congratulations!!!

rburghol commented 6 years ago

Can you post the code that you changed for the error in your September 19th issue with the "sumout.a"?? That would be most helpful if you could confirm that you ran the code I suggested and it fixed it, or if you had to do something else, please paste what you did -- thanks!