CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > CONVERGE

Run GA in local computer (linux)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2017, 08:47
Default Run GA in local computer (linux)
  #1
Member
 
Yaopeng Li
Join Date: Dec 2017
Location: Lund, Sweden
Posts: 50
Rep Power: 8
Eleven Leo is on a distinguished road
Hi everyone,

I am trying to run the example GA case (GA_simpleDiesel) in my local computer (Linux system).
How do I set the "num_execute_commands" in "execute.in" file?
How do I start GA optimization in my local computer?

Have anyone ever done that before, please give me some guild, if you can offer your set case, it is very appreciated.

Thank you very much for your kind help.

Best.
Eleven Leo is offline   Reply With Quote

Old   December 15, 2017, 10:32
Default
  #2
Senior Member
 
nitesh.attal's Avatar
 
Nitesh Attal
Join Date: Sep 2017
Location: Convergent Science, Northville MI
Posts: 113
Rep Power: 9
nitesh.attal is on a distinguished road
Quote:
Originally Posted by Eleven Leo View Post
Hi everyone,

I am trying to run the example GA case (GA_simpleDiesel) in my local computer (Linux system).
How do I set the "num_execute_commands" in "execute.in" file?
How do I start GA optimization in my local computer?

Have anyone ever done that before, please give me some guild, if you can offer your set case, it is very appreciated.

Thank you very much for your kind help.

Best.
Hello Yaopeng,

Below is a sample execute.in to guide you. The num_execute_commands is a number of lines containing the commands to be executed. In the example below num_execute_commands = 3 and the following lines (1) link the udf, (2) loads the modules necessary for converge to run and (3) the parallel execution command. Note that the file mpd.hosts contains the host name of the computer where I would like to run CONVERGE.


################################################## ##############
1 testrun do not run executable commands (execution statement printed to stdout)
0 recollectdata
0 script_sshtomachine run user defined scripts on a remote machine
duo1 scriptmach
0 startscript script to execute at start of experiment in main directory (one name per line below)
0 beforescript script to execute at end of each generation in each run directory (one name per line below)
0 afterscript script to execute at end of each generation in each run directory (one name per line below)
0 endscript script to execute at GA completion in main directory(one name per line below)
1 runnumcases
1 sshtomachine Parallel execution
mpd.hosts machnames file with machine names for parallel execution
1 machinesperrun number of machines used per run folder for parallel execution (mpd.host files created in run directories)
0 createbatchfile
3 numexecutecommands number of lines with execution commands (up to 10)
export $LD_LIBRARY_PATH=../udf
module purge && module load cvg/2.3_mpich
mpiexec -np 4 -machinefile $path$/mpd.hosts $path$/converge < /dev/null > logfile-$individual$-$generation$.cvglog &
################################################## ##############

Thanks,
__________________
Nitesh Attal
Principal Engineer | Applications
CONVERGECFD
nitesh.attal is offline   Reply With Quote

Old   December 15, 2017, 11:16
Default
  #3
Member
 
Yaopeng Li
Join Date: Dec 2017
Location: Lund, Sweden
Posts: 50
Rep Power: 8
Eleven Leo is on a distinguished road
Quote:
Originally Posted by nitesh.attal View Post
Hello Yaopeng,

Below is a sample execute.in to guide you. The num_execute_commands is a number of lines containing the commands to be executed. In the example below num_execute_commands = 3 and the following lines (1) link the udf, (2) loads the modules necessary for converge to run and (3) the parallel execution command. Note that the file mpd.hosts contains the host name of the computer where I would like to run CONVERGE.


################################################## ##############
1 testrun do not run executable commands (execution statement printed to stdout)
0 recollectdata
0 script_sshtomachine run user defined scripts on a remote machine
duo1 scriptmach
0 startscript script to execute at start of experiment in main directory (one name per line below)
0 beforescript script to execute at end of each generation in each run directory (one name per line below)
0 afterscript script to execute at end of each generation in each run directory (one name per line below)
0 endscript script to execute at GA completion in main directory(one name per line below)
1 runnumcases
1 sshtomachine Parallel execution
mpd.hosts machnames file with machine names for parallel execution
1 machinesperrun number of machines used per run folder for parallel execution (mpd.host files created in run directories)
0 createbatchfile
3 numexecutecommands number of lines with execution commands (up to 10)
export $LD_LIBRARY_PATH=../udf
module purge && module load cvg/2.3_mpich
mpiexec -np 4 -machinefile $path$/mpd.hosts $path$/converge < /dev/null > logfile-$individual$-$generation$.cvglog &
################################################## ##############

Thanks,

Hi, Nitesh,

Thank you very much for your detail explanations. The parallel execution command "mpiexec -np 4" means requires 4 cores for each run case, right?

In my opinion, the procedure of GA will be as follows:
1. When GA starts, several folders will be generated corresponding to the number of population per generation.
2. Then both input files and executable file (converge) are copied to the run directory.
3. Initializing the parameters of each case by generating the random number within the range.
4. Finally, running converge, and output the results to merit function.
Am I right?

Either experiment.in or case.in is OK for the GA, right?

My last question, after all setup done, how can I start a CONGO GA in my local computer? Directly typing "./congo" in command line? After doing that, I get an error as below.

-----------------------------------------------------------------------------------------------
No libcongo.so found, will proceed without using libcongo


********************** Starting CONGO **********************

ERROR, converge is not an available licensed product. Exiting.
-----------------------------------------------------------------------------------------------

Could you help me find out the reason for the problem? Thank you very much for your kind help.

Best wishes,
Yaopeng
Eleven Leo is offline   Reply With Quote

Old   December 18, 2017, 13:54
Default
  #4
Senior Member
 
nitesh.attal's Avatar
 
Nitesh Attal
Join Date: Sep 2017
Location: Convergent Science, Northville MI
Posts: 113
Rep Power: 9
nitesh.attal is on a distinguished road
Quote:
Originally Posted by Eleven Leo View Post
Hi, Nitesh,

Thank you very much for your detail explanations. The parallel execution command "mpiexec -np 4" means requires 4 cores for each run case, right?

In my opinion, the procedure of GA will be as follows:
1. When GA starts, several folders will be generated corresponding to the number of population per generation.
2. Then both input files and executable file (converge) are copied to the run directory.
3. Initializing the parameters of each case by generating the random number within the range.
4. Finally, running converge, and output the results to merit function.
Am I right?

Either experiment.in or case.in is OK for the GA, right?

My last question, after all setup done, how can I start a CONGO GA in my local computer? Directly typing "./congo" in command line? After doing that, I get an error as below.

-----------------------------------------------------------------------------------------------
No libcongo.so found, will proceed without using libcongo


********************** Starting CONGO **********************

ERROR, converge is not an available licensed product. Exiting.
-----------------------------------------------------------------------------------------------

Could you help me find out the reason for the problem? Thank you very much for your kind help.

Best wishes,
Yaopeng

Hello Yaopeng,

You would require a experiment.in (sample below). The input files are located in a directory "input_files_2.1" indicated by the parameter dirname. Please see the snippet of my log file (terminal output) below.

#################### experiment.in ###################
1 nummodes for each mode, list distinct input fle directory names below
1.0 weight merit function weighting factor, mode 1 NOTE: sum of weights must add up to 1.0
input_files_2.1 dirname directory name containing files (1 for each mode)
9 numpop population size
3 numparam number of defined parameters
0 numcommonparam number of common parameters - static parameters are always common and must be included
0 numdependentparam parameters defined with a gain and offset from a defined or dynamic parameter
0 numdependentfilenames
0 numdynparams dynamic parameters defined in user routine
0 numdynprofiles dynamic profiles defined in user routine
0 usedynamiclibrary
0 paramnumber
duration name
real type data type: real, integer, static, filenames
0 commonparam parameter type for multiple modes (0: independent, 1: common, 2: unique)
GA_DURATION marker
18.0 min
24.0 max
1 paramnumber
included_angle name
real type data type: real, integer
0 commonparam parameter type for multiple modes (0: independent, 1: common, 2: unique)
GA_NOZZLE_TILT marker
65.0 min
75.0 max
2 paramnumber
injection_start name
real type data type: real, integer
0 commonparam parameter type for multiple modes (0: independent, 1: common, 2: unique)
GA_INJECTION_START marker
-7.0 min
-1.0 max
##################################################

################## log file ##########################
./congo_122712
No libcongo.so found, will proceed without using libcongo
Reading parameter file: experiment.in

totalparam_defined=3

defined 0, paramnum 0, type = real, common = 0
defined 1, paramnum 1, type = real, common = 0
defined 2, paramnum 2, type = real, common = 0
random seed (fixed) = 1235968

************* Starting Generation 0 ***************
Gen 0, parameter table for input files:
Run# duration included_angle injection_start
1: 1.9044125e+01 7.2346484e+01 -2.4864016e+00
2: 2.2600376e+01 7.0406248e+01 -2.4068523e+00
################################################## #

Thanks,
Nitesh
__________________
Nitesh Attal
Principal Engineer | Applications
CONVERGECFD
nitesh.attal is offline   Reply With Quote

Old   December 18, 2017, 14:41
Thumbs up
  #5
Member
 
Yaopeng Li
Join Date: Dec 2017
Location: Lund, Sweden
Posts: 50
Rep Power: 8
Eleven Leo is on a distinguished road
Quote:
Originally Posted by nitesh.attal View Post
Hello Yaopeng,

You would require a experiment.in (sample below). The input files are located in a directory "input_files_2.1" indicated by the parameter dirname. Please see the snippet of my log file (terminal output) below.

#################### experiment.in ###################
1 nummodes for each mode, list distinct input fle directory names below
1.0 weight merit function weighting factor, mode 1 NOTE: sum of weights must add up to 1.0
input_files_2.1 dirname directory name containing files (1 for each mode)
9 numpop population size
3 numparam number of defined parameters
0 numcommonparam number of common parameters - static parameters are always common and must be included
0 numdependentparam parameters defined with a gain and offset from a defined or dynamic parameter
0 numdependentfilenames
0 numdynparams dynamic parameters defined in user routine
0 numdynprofiles dynamic profiles defined in user routine
0 usedynamiclibrary
0 paramnumber
duration name
real type data type: real, integer, static, filenames
0 commonparam parameter type for multiple modes (0: independent, 1: common, 2: unique)
GA_DURATION marker
18.0 min
24.0 max
1 paramnumber
included_angle name
real type data type: real, integer
0 commonparam parameter type for multiple modes (0: independent, 1: common, 2: unique)
GA_NOZZLE_TILT marker
65.0 min
75.0 max
2 paramnumber
injection_start name
real type data type: real, integer
0 commonparam parameter type for multiple modes (0: independent, 1: common, 2: unique)
GA_INJECTION_START marker
-7.0 min
-1.0 max
##################################################

################## log file ##########################
./congo_122712
No libcongo.so found, will proceed without using libcongo
Reading parameter file: experiment.in

totalparam_defined=3

defined 0, paramnum 0, type = real, common = 0
defined 1, paramnum 1, type = real, common = 0
defined 2, paramnum 2, type = real, common = 0
random seed (fixed) = 1235968

************* Starting Generation 0 ***************
Gen 0, parameter table for input files:
Run# duration included_angle injection_start
1: 1.9044125e+01 7.2346484e+01 -2.4864016e+00
2: 2.2600376e+01 7.0406248e+01 -2.4068523e+00
################################################## #

Thanks,
Nitesh

Hi Nitesh,

Thank you again for your detail answer, your answer really make me understand CONGO better . Although I add the file of "experiment.in", the error still exists as below:

################################################## ##########
********************** Starting CONGO **********************

ERROR, converge is not an available licensed product. Exiting.
################################################## ##########



So I wonder whether it is associated with the license. When I run a converge case (not CONGO), I must type the command "./converge super". If I only type "./converge", there will come an error shows below related to license. Is it normal or not?

################################################## ##########
ERROR: unable to obtain 1 parent license. Aborting
status = -18. License server does not support this product (-18)
Please contact licensing@convergecfd.com for help troubleshooting this problem.

JOB ABORT invoked by rank 0:
2003 ERROR: Error encountered while validating the license
################################################## ##########



By the way, could you please send me one CONGO example that could run successfully? My email is yaopeng.li@energy.lth.se.

Thank you very much for your kind help.

Best,
Yaopeng
Eleven Leo is offline   Reply With Quote

Old   December 18, 2017, 15:53
Default
  #6
Senior Member
 
nitesh.attal's Avatar
 
Nitesh Attal
Join Date: Sep 2017
Location: Convergent Science, Northville MI
Posts: 113
Rep Power: 9
nitesh.attal is on a distinguished road
Quote:
Originally Posted by Eleven Leo View Post
Hi Nitesh,

Thank you again for your detail answer, your answer really make me understand CONGO better . Although I add the file of "experiment.in", the error still exists as below:

################################################## ##########
********************** Starting CONGO **********************

ERROR, converge is not an available licensed product. Exiting.
################################################## ##########



So I wonder whether it is associated with the license. When I run a converge case (not CONGO), I must type the command "./converge super". If I only type "./converge", there will come an error shows below related to license. Is it normal or not?

################################################## ##########
ERROR: unable to obtain 1 parent license. Aborting
status = -18. License server does not support this product (-18)
Please contact licensing@convergecfd.com for help troubleshooting this problem.

JOB ABORT invoked by rank 0:
2003 ERROR: Error encountered while validating the license
################################################## ##########



By the way, could you please send me one CONGO example that could run successfully? My email is yaopeng.li@energy.lth.se.

Thank you very much for your kind help.

Best,
Yaopeng

Please look at the meaning of the error code on (https://convergecfd.com/support/getting-started-guide).
Also try using "converge super" in execute.in
Finally please write to support@convergecfd.com to get your hands on an example GA case.

Thanks,
__________________
Nitesh Attal
Principal Engineer | Applications
CONVERGECFD
nitesh.attal is offline   Reply With Quote

Old   December 18, 2017, 16:28
Default
  #7
Member
 
Yaopeng Li
Join Date: Dec 2017
Location: Lund, Sweden
Posts: 50
Rep Power: 8
Eleven Leo is on a distinguished road
Quote:
Originally Posted by nitesh.attal View Post
Please look at the meaning of the error code on (https://convergecfd.com/support/getting-started-guide).
Also try using "converge super" in execute.in
Finally please write to support@convergecfd.com to get your hands on an example GA case.

Thanks,

Hi Nitesh,

Thank you very much for your kind help. I will contact Converge support.

Best,
Yaopeng
Eleven Leo is offline   Reply With Quote

Reply

Tags
ga optimization, library path, setup


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
courant number increases to rather large values 6863523 OpenFOAM Running, Solving & CFD 22 July 6, 2023 00:48
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 23:40
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03
Dual Boot Windows and Linux and Go Open Source andyj Main CFD Forum 2 October 21, 2010 17:49
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36


All times are GMT -4. The time now is 21:29.