swat cup in linux

1,025 views
Skip to first unread message

Sami

unread,
Dec 29, 2014, 3:19:24 PM12/29/14
to swat...@googlegroups.com
Dear SWAT-CUP users,

I am trying to run swat-cup in linux but have no idea on how to set up. I have been following the previous posts relating this (I found only few) and found that there is a linux version of swat-cup. So, I was wondering if someone had success in running swat-cup in linux and could share their success stories. I would appreciate if someone could offer some guidance on how to set up it. Thank you very much for your help in advance!

Best Regards,

Abbaspour, Karim

unread,
Dec 29, 2014, 4:59:24 PM12/29/14
to swat...@googlegroups.com

You can download Linux version of sufi2 from

ftp.eawag.ch/outgoing/abbaspou

sign in as anonymous and give your email address as password

 

You need to install MONO first. There are instructions how to install MONO. Sufi2 does not need installing. You can run it in LINUX and bring it to a swat-cup project in a PC to see graphs etc..

Best, Karim

--
You received this message because you are subscribed to the Google Groups "SWAT-CUP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swat-cup+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sami Khanal

unread,
Dec 29, 2014, 8:26:39 PM12/29/14
to swat...@googlegroups.com
 Dear Karim,

Thank you very much for the information. I will install it and see if it works. One more question - how different is the linux version of SUFI compared to windows version. I saw that this linux version of SUFI was compiled in 2011. Does this mean that I need to worry about compatibility issues of SWAT 2012 with this version. Or, should I be fine if I just replace the 2009 swat.exe with the 2012 SWAT.exe file?

Best Regards,
Sami

--
You received this message because you are subscribed to a topic in the Google Groups "SWAT-CUP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swat-cup/6spljVLMCFk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swat-cup+u...@googlegroups.com.

Sami

unread,
Dec 31, 2014, 9:09:43 AM12/31/14
to swat...@googlegroups.com
Dear Karim,

I downloaded the linux version of SWAT-CUP from your suggested website. I am however having problem configuring and installing it. To setup the program, I was referring to the .txt file "Mono Instalation & Configuration on Linux" in the MONO folder. The step I am stuck at the moment is ./configure. While doing this it is giving me this error " configure: error: cannot find sources (README) in. or .."

Since I am new to linux, I have no idea on how to figure this out even this is pretty straightforward. So, I would appreciate if you could throw some light into this. Thank you very much for guiding on this again. 

Best Regards,
Sami 

Abbaspour, Karim

unread,
Jan 2, 2015, 7:41:04 AM1/2/15
to swat...@googlegroups.com

Dear Sami,

I don’t work with Linux myself so I cannot help you much. Perhaps your IT people can help you install MONO, or other people in the group can help you out.

Best, Karim

--

Sami Khanal

unread,
Jan 2, 2015, 9:42:15 AM1/2/15
to swat...@googlegroups.com
Dear Karim,

I will seek help from IT people in the department or other people in the group to figure out this issue. Thank you.

Best Regards,
Sami

--
You received this message because you are subscribed to a topic in the Google Groups "SWAT-CUP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swat-cup/6spljVLMCFk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swat-cup+u...@googlegroups.com.

Eeshan Kumar

unread,
Jan 28, 2015, 10:54:12 AM1/28/15
to swat...@googlegroups.com
Hi Sami,

Were you able to figure out the problem with mono? I have mono installed on cluster at my university and is in my path (export PATH=/share/apps/mono/opt/mono/bin:$PATH ; export LD_LIBRARY_PATH=/share/apps/mono/opt/mono/lib:$LD_LIBRARY_PATH). But still I get an error stating that "mono: command not found" when the program executes SUFI2_execute.exe. I am not sure which part of the program is using mono.
Any help to get the SUFI2 linux version accomplished would be highly appreciated.

Thank you.
Eeshan

Sami Khanal

unread,
Jan 28, 2015, 11:13:45 AM1/28/15
to swat...@googlegroups.com
Hi Eeshan,

I am still struggling with the installation of SUFI2 linux version. There were too many issues to tackle with. Thus, I am currently gave up the idea of running linux version. Sorry, I could not be of much help. I hope you figure this out and share your successful experience. Thanks!

Best Regards,
Sami

Abbaspour, Karim

unread,
Jan 29, 2015, 4:15:18 AM1/29/15
to swat...@googlegroups.com

It is the SWAT-Edit.exe that uses MONO.

Probably There is something with mono installation path or something else with mono installation or something with calling swat_edit in the batch file. 

Reading the mono help and  Google search for "sh: mono: command not found" would be useful.

 

Sorry I cannot offer more help as I don’t use Linux myself. Perhaps you could contact Victor Bacu who has successfully used Linux before:

Victor Bacu victo...@cs.utcluj.ro

Sami Khanal

unread,
Jan 29, 2015, 9:49:35 AM1/29/15
to swat...@googlegroups.com
Karim,

Thank you for the contact information of Victor Bacu. I will contact him asking for his input in this regard. 

Eeshan: I was able to install Mono successfully with the help of IT technician here at my university yesterday. I now need to test on how executing SUFI using this. I hope attached file might help you. 

Best Regards,
Sami
INSTALL.readme

Eeshan Kumar

unread,
Jan 29, 2015, 10:23:53 AM1/29/15
to swat...@googlegroups.com
Hey Sami,

I got some of the issues taken care of but whenever I give the command: mono ./Swat_edit.exe I get the following error:

razor-l1:ekumar:/scratch/ekumar/CUP_jan27$ mono ./Swat_Edit.exe 
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/opt/mono/lib/mono/2.0/mscorlib.dll' directory.

I think something is wrong in the path. I will check that but is it mono ./Swat_Edit.exe that starts SWAT CUP or we just follow the same sequence like first running SUFI2_pre.bat which executes SUFI2_latin...exe then running SUFI2_Run.bat which executes SUFI2_execute.exe and so on. Also, did you replace the Swat_edit.exe with the latest version and swat2009.exe to the latest swat2012 but still calling it swat2009.exe?  
For me it is only Swat_edit.exe that is causing errors since it uses mono rest works fine!

Thanks for the help.

Sincerely,
Eeshan

Eeshan Kumar

unread,
Jan 30, 2015, 10:38:35 AM1/30/15
to swat...@googlegroups.com
Dr. Abbaspour,

I got mono fixed and other portions of the program run fine but I think there is some conflict with Swat_Edit.exe. Is there any other updated version of Linux that was compiled to be used with SWAT2012?

I get the error below:

parameter set # 1
Swat_Edit (Swat Parameters Editor 2009) Version 2.2.6.29563
Developed by Neprash Technology to use in SWAT-CUP
--------------------------------------------------------------------------
    Initializing...
    Run as Unix Version.
    Initialize Folder Map...


Error: An element with the same key already exists in the dictionary.

Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeWin32Classic ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: gdiplus.dll
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Drawing.KnownColors..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Drawing.Color.get_Black () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ThemeWin32Classic..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.ThemeEngine..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
  at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Windows.Forms.Control..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ScrollableControl..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.ContainerControl..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.Form..ctor () [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon, Boolean displayHelpButton) [0x00000] in <filename unknown>:0 
  at System.Windows.Forms.MessageBox+MessageBoxForm..ctor (IWin32Window owner, System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.MessageBox/MessageBoxForm:.ctor (System.Windows.Forms.IWin32Window,string,string,System.Windows.Forms.MessageBoxButtons,System.Windows.Forms.MessageBoxIcon)
  at System.Windows.Forms.MessageBox.Show (System.String text, System.String caption, MessageBoxButtons buttons, MessageBoxIcon icon) [0x00000] in <filename unknown>:0 
  at á.á (System.String[] A_0) [0x00000] in <filename unknown>:0 
  at á.á (System.String[] A_0) [0x00000] in <filename unknown>:0 
                SWAT2012               
               Rev. 622              
      Soil & Water Assessment Tool    
               PC Version             
 Program reading from file.cio . . . executing

  Executing year    1
  Executing year    2

 Execution successfully completed 
1 1996
1 1997
parameter set # 2
Swat_Edit (Swat Parameters Editor 2009) Version 2.2.6.29563
Developed by Neprash Technology to use in SWAT-CUP
----------------------------------------------------

Thank you.
Eeshan

Abbaspour, Karim

unread,
Jan 30, 2015, 10:44:38 AM1/30/15
to swat...@googlegroups.com

Please zip your project and send it to me to have a look. Delete all swat output files so the size is smaller.

You can send it to my yahoo account: k_abb...@yahoo.com

 

Thanks

 

-------------------------------------------------
Dr. K.C. Abbaspour
Eawag, Swiss Federal Institute for Aquatic Science and Technology
Ueberlandstr. 133, P.O. Box 611, 8600 Duebendorf, Switzerland
email: abba...@eawag.ch
phone: +41 58 856 5359
fax: +41 58 856 5375
http://www.eawag.ch/index_EN

Danielle Bressiani

unread,
Feb 12, 2016, 11:40:02 AM2/12/16
to SWAT-CUP
Dear SWAT-CUP Linux users, Eeshan and Sami,

Were you able to manage this problem? And are you current running SWAT-CUP in Linux?

If so, could you tell me what version of mono and in which operating system you are running it?

I tried to run it on a Debian or CentOS system, using Mono. But it did not work here, below screen shot of error (similar to the one posted by Eeshan).

Thank you very much in advance!
Dani
image.png

Siavash Bassam

unread,
Mar 21, 2016, 12:18:53 PM3/21/16
to SWAT-CUP
Dr. Abbaspour,
Is the ftp site for the Linux version of SUFI2 still available? I cannot connect to it. 
Thank you,
Siavash

Siavash Bassam

unread,
Apr 7, 2016, 10:59:02 AM4/7/16
to SWAT-CUP
Eeshan,
Were you able to fix this problem? I get the same error.
Thank you,
Siavash

Danielle Bressiani

unread,
Apr 7, 2016, 12:12:14 PM4/7/16
to swat...@googlegroups.com
Hello,
We have it working here on Linux System now.  
It needs some a graphical interface to run and mono.
Thanks, Dani


Dr. Danielle A. Bressiani
Environmental Engineer
PhD in Water Resources Engineering

Siavash Bassam

unread,
Apr 7, 2016, 1:53:23 PM4/7/16
to SWAT-CUP
Danielle,
Thank you for quick respond. What GUI did you for that purpose?
Also, it may be very basic to you but after I set up the sufi2 directory in Linux system, what files do I have to transfer to that directory from my directory on Windows? I mean, should I just transfer file in Backup directory or all other files including those in working directory?
Many Thanks,
Siavash

Danielle Bressiani

unread,
Apr 12, 2016, 8:46:37 AM4/12/16
to swat...@googlegroups.com
Hello Siavash,

Actually we just installed Mono and Winforms 2.

It worked on Linux operating systems CentOS 6, and Linux Mint 13. I think also in Ubuntu in my previous test.

I am not sure if I understood your question on regard to the files to be transfered from windows to Linux well. What I did is I transfered my TxtInOut folder from SWAT to the SWAT-CUP directory and backup folders in my Linux folder. Then I added all the SWAT-CUP executables and *.def to the working folder. Also created the SWAT-CUP structure, exactly as it is in windows, with the folders SUFI2.IN and SUFI2.OUT and Echo. And in the folder SUFI2.IN I created the files I would need as input for SWAT-CUP.

Be carefull if you use files from windows to use a command such as dos2unix or such...

Anything I can help let me know,
Hope it was helpfull and good luck!
Dani

Dr. Danielle A. Bressiani
Environmental Engineer
PhD in Water Resources Engineering

r-die...@msn.com

unread,
Apr 13, 2016, 6:17:08 PM4/13/16
to SWAT-CUP
Dr. Bressiani,

I am working with Siavash here on getting SwatCup working in the CentOS environment.  I have been testing on both CentOS 6.7 and 7.1.  I have tried different versions of libgdiplus and mono but the latest versions appear to be the most promising.  I can compile and execute some of the test programs that are posted on mono-project.com so I think the libgdiplus and mono installations are at least close to right.  I can compile and run the winforms example and get the window on my workstation via X11.  However, if I try running SwatCup it crashes with some sort of exception.  I do have a file with all the error messages in it.  I don't know if you have seen it but I have already gotten past the Add-Safe-Path... problem.

I am going to try transferring the files as you described in your post.  My main question at the moment is are you transferring SwatCup.exe from a working Windows installation of SWAT-CUP or did you compile SwatCup from source code in the Linux environment?  I have two different Windows SwatCup installations--one on 32-bit XP and the other on 64-bit Win 7.  I will try copying from the Win 7 installation.

If you have any comments at this point I would be happy to have them.  I'll let you know what I experience after I try copying the needed files.

Regards,
Robert Diersing
Texas A&M University-Kingsville

Danielle Bressiani

unread,
Apr 14, 2016, 8:40:04 AM4/14/16
to swat...@googlegroups.com
Dear Robert,

I am using a compiled version of SWAT-CUP on Linux. Try to download the executables from Drs. Abbaspour' ftp site (the structure of folders that I wrote in the previous email is also there as should be):

sign in as anonymous and give your email address as password

You have to execute at least 3 of the executables, you will only need mono for the SUFI2_execute.exe (since it uses SWAT-Editor, that will need mono). The others should work.

If you have the error messages and any specific problem, let me know maybe I had a similar one and can help.

Regards,
Dani

Dr. Danielle A. Bressiani
Environmental Engineer
PhD in Water Resources Engineering

r-die...@msn.com

unread,
Apr 14, 2016, 10:25:48 AM4/14/16
to SWAT-CUP
If I use libgdiplus from the web site you mentioned, I get the following message from ./configure

configure: error: cannot find sources (README) in . or ..

This is after I change the permissions so configure can even execute.  As it is distributed it does not have "x" permission.

I do not have this problem with any libgdiplus or mono that I download from download.mono-project.com/sources.

Danielle Bressiani

unread,
Apr 14, 2016, 10:34:34 AM4/14/16
to swat...@googlegroups.com
​Hello,
sorry, I think I did not make myself clear.
I did not use the mono version from this website either, I used the one compatible with my CentOS version, from repository....
I just wanted to make sure that the SWAT-CUP executables you are using were compiled on Linux. And these are available at this website.​
Thanks, Danielle

Dr. Danielle A. Bressiani
Environmental Engineer
PhD in Water Resources Engineering

r-die...@msn.com

unread,
Apr 14, 2016, 10:56:14 AM4/14/16
to SWAT-CUP
OK.  I will use the libgdiplus-2.6 and mono-2.6 from mono-project.com and the sufi2_64bit_dynamiclib_LINUX from the ftp site.  Correct?
If I understand you correctly, you are saying that the .exe files in sufi2_64bit_dynamiclib_LINUX have already been compiled on Linux, right?

r-die...@msn.com

unread,
Apr 14, 2016, 11:07:55 AM4/14/16
to SWAT-CUP
One more thing, precisely what versions of libgdiplus and mono are you using?

Danielle Bressiani

unread,
Apr 14, 2016, 11:46:12 AM4/14/16
to swat...@googlegroups.com
Yes

Dr. Danielle A. Bressiani
Environmental Engineer
PhD in Water Resources Engineering

Danielle Bressiani

unread,
Apr 14, 2016, 11:49:16 AM4/14/16
to swat...@googlegroups.com
We are using the:
Mono JIT compiler version 2.10.8 

r-die...@msn.com

unread,
Apr 14, 2016, 2:52:46 PM4/14/16
to SWAT-CUP
Danielle,

I just wanted to let you know I have made significant progress today largely because of your help.  SUFI2 does run now and does call up the editor.  I am in the process of getting more of the required data files from our PhD student who is going to use this application.  Part of the problem is that I am a software installer/operating system type guy but I don't know anything about this application. 

At the moment I am using libgdiplus-4.2 and mono-4.4.0.  These are the latest versions from download.mono-project.com/sources. The O/S is CentOS 7.1.  I am going to test on CentOS 6.7 soon.

We have a PhD program in Environmental Engineering here so you may have some contact with us in the future.  Siavash is a PhD student in Environmental Engineering.

Thanks again for your help and I imagine I'll have a few more questions before everything is entirely in order.

Regards,

Robert Diersing

Siavash Bassam

unread,
Apr 27, 2016, 12:19:03 PM4/27/16
to SWAT-CUP

Hello Dr. Bressiani,

First of all, I want to thank you for your help and time. 

After Dr. Diersing set up the swat-cup in Linux system, I transferred the files in my TxtInOut folder to SWAT_CUP directory and back up folders in my Linux folder (So, I have all the files in both backup directory and the working directory). All the SWAT-CUP executables and *.def files were already in the working directory. Also, SUFI2.In, SUFI2.OUT, and Echo folder were already there. I made changes to input files using the same procedure I did in Windows, which is Par_inf.txt, SUFI_swEdit.def, File.Cio, Observed_rch.txt, Var_file)rch.txt, SUFI2_extract_rch.def, Observed.txt, and Var_file_name.txt. Then, to be consistent with the steps in Windows version, I first executed SUFI2_LH_sample.exe, and then SUFI2_execute.exe. However, I get an error saying that "An Exception happened while reading file "000010001.sol": An item with the same key has already been added".

Then, I deleted all the files that I added from TxtInOut folder in working directory, assuming that they should not be there at first. After executing SUFI2_execute.exe, I got an error that there is no *.sol file. Also, it shows that it is making changes in Sol_AWC. However, my calibration parameter in Par_inf.txt is GWQMN. I assume that I am missing something here. 

Do you have any suggestion? Did I miss something here?

Thank you,

Siavash

r-die...@msn.com

unread,
Jul 25, 2016, 3:51:11 PM7/25/16
to SWAT-CUP
Hello Danielle,

I haven't been on here for a while but now I am back to trying to give Savash a hand with his data analysis and I have a question.

Do you know what version of SWAT-CUP is compiled into the Linux SWAT-CUP which we downloaded from Dr. Abbaspour's ftp site?  Is it the 2014 version or the 2009 version, or some other version.  He is running the 2014 version on Windows 7 and wants to be sure he is using the same version on Linux.

Robert

Hydro Water

unread,
Oct 4, 2017, 1:46:12 PM10/4/17
to SWAT-CUP
Hello Karim,

I dont see the Linux version on the ftp. The SWAT-CUP, SWAT-CUP hourly, and SWAT Editor is available, however, i dont see the Linux version. Am i looking at the wrong directory or something that i am missing there??

Thanks,

Ameer

On Monday, December 29, 2014 at 3:59:24 PM UTC-6, Abbaspour wrote:

You can download Linux version of sufi2 from

ftp.eawag.ch/outgoing/abbaspou

sign in as anonymous and give your email address as password

 

You need to install MONO first. There are instructions how to install MONO. Sufi2 does not need installing. You can run it in LINUX and bring it to a swat-cup project in a PC to see graphs etc..

Abbaspour, Karim

unread,
Oct 4, 2017, 3:29:38 PM10/4/17
to swat...@googlegroups.com

It is there…

Karim

 

From: swat...@googlegroups.com [mailto:swat...@googlegroups.com] On Behalf Of Hydro Water
Sent: Wednesday, October 04, 2017 7:46 PM
To: SWAT-CUP
Subject: Re: swat cup in linux

 

Hello Karim,

Hydro Water

unread,
Oct 6, 2017, 2:04:29 PM10/6/17
to SWAT-CUP

Many thanks Karim,

I developed my SUFI2 project in windows version. Then i copied the SUFI2.In and replace it with the one in Linux version you shared. I also copy my SUFI2 window version textinout file to the main directory of Linux version, put a copy of the TextInOut files in the backup folder too. and executed comma the ds in following order, however, except the FLOW_OUT_(Gauge station) file, no other file was created (e.g. summary state, parameter files) in the SUFI2.out. Am i missing any step? Do i really need to run SUFI2_extract here?

SUFI2_Pre.bat
SUFI2_Pre.run
SUFI2_Post.bat
SUFI2_extract.bat

Any thought from the members who are using the linux version would be appreciated.

Regards,

Ameer

 together with the main directory txtinoutfile and place it 

Abbaspour, Karim

unread,
Oct 9, 2017, 5:29:34 AM10/9/17
to swat...@googlegroups.com

You run:

sufi2_pre.bat

sufi2_run.bat

sufi2_post.bat

 

Make sure SWAT_Edit.exe runs, as you have to install MONO for that program to run properly.

Sushant Mehan

unread,
Mar 19, 2018, 7:30:13 PM3/19/18
to SWAT-CUP
Dear Dr. Abbaspour, 

I am not able to get to the source where I can download Linux Version of SUFI2.  I would appreciate any help. 

Regards
Sushant


On Monday, December 29, 2014 at 4:59:24 PM UTC-5, Abbaspour wrote:
Reply all
Reply to author
Forward
0 new messages