CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Compiling CFL3D

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By taalf
  • 1 Post By hjabird
  • 2 Post By taalf
  • 1 Post By shereez234

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 26, 2018, 04:03
Default Compiling CFL3D
  #1
Member
 
William Tougeron
Join Date: Jan 2011
Location: Czech Republic
Posts: 70
Rep Power: 15
taalf is on a distinguished road
Hi all,

It seems the CFL3D code was recently set public again after a long period.

The fact is that the official way ton compile it seems a bit outdated. Even the doc says:

"The Install script is very old, and may or may not create a workable makefile for your particular machine." (here)

While I followed instructions, I get the following error:

Code:
$ ./Install     # This seems to work
$ make cfl3d_mpi
(...)
make[1]: Entering directory `/home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs'
mpif90 -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w -ip -fno-alias -xHost -traceback -module /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs  -r8  -c add2x.F
gfortran: error: unrecognized command line option ‘-ip’
gfortran: error: unrecognized command line option ‘-fno-alias’
gfortran: error: unrecognized command line option ‘-traceback’
gfortran: error: unrecognized command line option ‘-module’
gfortran: error: unrecognized command line option ‘-r8’
make[1]: *** [add2x.o] Error 1
make[1]: Leaving directory `/home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs'
make: *** [Zlibs] Error 2
Is there someone having successfully compiled the last version of CFL3D on Linux ? I have Linux Mint.

Best regards,

Last edited by taalf; July 26, 2018 at 05:08.
taalf is offline   Reply With Quote

Old   July 26, 2018, 05:06
Default
  #2
Member
 
William Tougeron
Join Date: Jan 2011
Location: Czech Republic
Posts: 70
Rep Power: 15
taalf is on a distinguished road
Well, I removed all occurences of the "unrecognizes command line options" in the Install script, and it started compile.

Now I have another error:
Code:
==============================================================
                    compiling cfl3d_mpi                 
==============================================================
                                                              
( cd cfl/mpi; make -f makefile cfl3d_mpi \
	FFLAG="-O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs   " \
	FFLAG_SPEC="-O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs  " \
	LFLAG="-z muldefs -fpe0" \
	EXEC="cfl3d_mpi" \
	CPPFLAG="-P" \
	CPPOPT=" -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN " \
	AROPT="rusc" \
	RANLIB="true" \
	CPP="cpp" \
	LLIBS="" \
	FTN="mpif90" \
	DIR="cfl/mpi" \
	CFLSRC_D="../../../source/cfl3d/dist" \
	CFLSRC_S="../../../source/cfl3d/libs" \
	HEADER="../../../header" )
make[1]: Entering directory `/home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/mpi'
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c ccomplex.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c development.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c main.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c bc_blkint.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c findmin_new.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c plot3d.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c rrest.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c bc_patch.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c forceout.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c plot3t.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c rrestg.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c calyplus.F
gfortran: warning: /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs: linker input file unused because linking not done
mpif90 -DDIST_MPI -DDBLE_PRECSN -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN  -O2 -w /home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/libs    -c pointers.F
pointers.F:35.9:

      use module_kwstm, only:kws_get_nummem                             
         1
Fatal Error: Can't open module file 'module_kwstm.mod' for reading at (1): No such file or directory
make[1]: *** [pointers.o] Error 1
make[1]: Leaving directory `/home/tougeron/documents/installation/cfd/cfl3d/CFL3D/build/cfl/mpi'
make: *** [Zmpi] Error 2
taalf is offline   Reply With Quote

Old   July 26, 2018, 05:33
Default
  #3
Member
 
William Tougeron
Join Date: Jan 2011
Location: Czech Republic
Posts: 70
Rep Power: 15
taalf is on a distinguished road
OK, I copy-pasted the following files from build/cfl/libs/ to build/cfl/mpi/ and it continues compiling:

module_kwstm.mod
module_profileout.mod
module_contour.mod

Let's see if it will be OK now.
kartika likes this.
taalf is offline   Reply With Quote

Old   July 26, 2018, 05:45
Default
  #4
New Member
 
Join Date: Jul 2018
Location: United Kingdom
Posts: 2
Rep Power: 0
hjabird is on a distinguished road
I faced similar issues a while ago. Whilst I don't remember the specifics the notes I wrote for my future self are as follows:

Everything is easier with MPICH - just go sudo apt install MPICH
./Install
mv ~/CFL3D/build/makefile ~/CFL3D/build/makefile.bu
cp ~/CFL3D/build/makefile_mac_gnu ~/CFL3D/build/makefile
now modify the makefile from gfortran to mpif90
I found I ended up having to run install more than once last time?
For MPI you still need the cfl3d.inp

It took me a while to work out how to open the files in Paraview. To do this open the the .g file in as a Plot3D. There is then an option to open the .q file in the properties section for the Paraview source.

Good luck.
ssh123 likes this.
hjabird is offline   Reply With Quote

Old   July 26, 2018, 05:57
Default
  #5
Member
 
William Tougeron
Join Date: Jan 2011
Location: Czech Republic
Posts: 70
Rep Power: 15
taalf is on a distinguished road
OK, so it seems the compilation completed well.

Here, a sum up of what I did (CFL3D v6 on Linux Mint 17.3 64bit):

EDIT: the method given in previous/following comments seems to be better than this one.

1- Download the CFL3D code:
Code:
git clone https://github.com/nasa/CFL3D
2- Go to the build/ dir:
Code:
cd CFL3D/build/
3- Edit the 'Install' script file and, under "# Default to INTEL settings", remove all occurences of following options:
‘-ip’
‘-fno-alias’
‘-traceback’
‘-module’
‘-r8’
'-xHost'
'-fpe0'

4- Launch the 'Install' script:
Code:
./Install
5- Make CFL3D libraries only:
Code:
make cfd3d_libs
6- Copy .mod files from one dir to another:
Code:
cp cfl/libs/*.mod cfl/seq/
cp cfl/libs/*.mod cfl/mpi/
7- Compile sequential and parallel versions of CFL3D:
Code:
make cfl3d_seq
make cfl3d_mpi
Can't say, however, how well will run this compiled code...
ssh123 and lynn lin like this.
taalf is offline   Reply With Quote

Old   July 26, 2018, 06:09
Default
  #6
Member
 
William Tougeron
Join Date: Jan 2011
Location: Czech Republic
Posts: 70
Rep Power: 15
taalf is on a distinguished road
Quote:
Originally Posted by hjabird View Post
I faced similar issues a while ago. Whilst I don't remember the specifics the notes I wrote for my future self are as follows:

Everything is easier with MPICH - just go sudo apt install MPICH
./Install
mv ~/CFL3D/build/makefile ~/CFL3D/build/makefile.bu
cp ~/CFL3D/build/makefile_mac_gnu ~/CFL3D/build/makefile
now modify the makefile from gfortran to mpif90
I found I ended up having to run install more than once last time?
For MPI you still need the cfl3d.inp

It took me a while to work out how to open the files in Paraview. To do this open the the .g file in as a Plot3D. There is then an option to open the .q file in the properties section for the Paraview source.

Good luck.
Hi hjabird,

Your method worked as well and seems to be cleaner than mine (especially because I removed lots of options that can be subsituted by other ones with your method).

Just to say, the only makefile template I found was "makefile_mac_gfortran_example".

Thank you very much for advices and experience sharing.

All the best,
taalf is offline   Reply With Quote

Old   December 22, 2020, 01:11
Default I got stuck while proceeding the installation of CFL3D in Linux V16. Kindly help me
  #7
New Member
 
velumani
Join Date: Dec 2020
Posts: 2
Rep Power: 0
velujrf is on a distinguished road
We have these files but file format is .F90 only. How can I convert this .F90 to .mod ?

I am unable to copy-paste the following files from build/cfl/libs/ to build/cfl/mpi/

module_kwstm.mod
module_profileout.mod
module_contour.mod
velujrf is offline   Reply With Quote

Old   December 22, 2020, 01:37
Default
  #8
New Member
 
velumani
Join Date: Dec 2020
Posts: 2
Rep Power: 0
velujrf is on a distinguished road
we have completed the below steps while installing CFL3D in linux :
./Install
mv ~/CFL3D/build/makefile ~/CFL3D/build/makefile.bu
cp ~/CFL3D/build/makefile_mac_gnu ~/CFL3D/build/makefile

I renamed the below files which actually was in .f90 format, I have changed to .mod manually, then I copy-pasted the following files from build/cfl/libs/ to build/cfl/mpi/

module_kwstm.mod
module_profileout.mod
module_contour.mod

cp ~/Desktop/CFL3D/build/cfl/libs/*.mod ~/Desktop/CFL3D/build/cfl/seq/
cp ~/Desktop/CFL3D/build/cfl/libs/*.mod ~/Desktop/CFL3D/build/cfl/mpi/

We got stuck while executing the below commands
make cfl3d_seq
make cfl3d_mpi

Getting the below error :

================================================== ============
compiling cfl3d_libs
================================================== ============

( cd cfl/libs; make -f makefile cfl3d_libs \
FFLAG="-O2 -w -module /home/midhun/Desktop/CFL3D/build/cfl/libs " \
FFLAG_SPEC="-O2 -w -module /home/midhun/Desktop/CFL3D/build/cfl/libs " \
LFLAG="-z muldefs" \
EXEC="cfl3d_libs" \
CPPFLAG="-P" \
CPPOPT="-DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN " \
AROPT="rusc" \
RANLIB="true" \
CPP="cpp" \
CFLAG="" \
LLIBS="" \
FTN="mpif90" \
DIR="cfl/libs" \
CFLSRC_S="../../../source/cfl3d/libs" \
CFLSRC_D="../../../source/cfl3d/dist" \
HEADER="../../../header" )
make[1]: Entering directory '/home/midhun/Desktop/CFL3D/build/cfl/libs'
mpif90 -DP3D_SINGLE -DLINUX -DINTEL -DDBLE_PRECSN -O2 -w -module /home/midhun/Desktop/CFL3D/build/cfl/libs -c add2x.F
make[1]: mpif90: Command not found
makefile:129: recipe for target 'add2x.o' failed
make[1]: *** [add2x.o] Error 127
make[1]: Leaving directory '/home/midhun/Desktop/CFL3D/build/cfl/libs'
makefile:370: recipe for target 'Zlibs' failed
make: *** [Zlibs] Error 2
velujrf is offline   Reply With Quote

Old   October 29, 2022, 06:44
Default A makefile that works on Ubuntu linux
  #9
Senior Member
 
shereez234's Avatar
 
M Sereez
Join Date: Jan 2014
Location: England
Posts: 352
Blog Entries: 1
Rep Power: 13
shereez234 is on a distinguished road
Code:
#     
#     $Id$
#
#=============================================================================
#
#   This is the primary/top-level makefile: builds either the parallel or 
#   sequential versions of CFL3D, as well as the preprocessors PRECFL3D,
#   RONNIE, and MAGGIE and SPLITTER. Only sequential versions of
#   of MAGGIE AND RONNIE are currently available
#
#
#                          cfl3dv6.0 directory structure:
#
#                                    CFL3DV6.0   
#                                        |
#                               -------------------
#                               |        |        |
#                             SOURCE   BUILD   HEADER 
#                               |
#        --------------------------------------------
#        |       |         |      |         |       |
#      CFL3D  PRECFL3D  RONNIE  MAGGIE  SPLITTER  TOOLS (source code archives)
#        |
#     -------
#     |     |
#    DIST  LIBS
#
#
#                        build directory structure:
#
#                                   BUILD (you are here)
#                                     |
#        ----------------------------------------------------------------
#        |             |        |      |      |    |     |      |       |
#       CFL        CFLCMPLX  PRECFL  PRERON  RON  MAG  TOOLS  SPLIT SPLITCMPLX
#        |             |        |      |      |    |     |      |       |
#    ---------    ----------    |      |      |    |     |      |       |
#    |   |   |    |    |   |    |      |      |    |     |      |       |
#  LIBS SEQ MPI  LIBS SEQ MPI  SEQ    SEQ    SEQ  SEQ   SEQ    SEQ     SEQ
#
#           (bottom level of build is the "construction" level)
#
#=============================================================================


# *************** COMPILER FLAG DEFINITIONS (MACHINE SPECIFIC) ***************
#                 (CURRENT DEFINITIONS FOR LINUX ARCHITECTURE)

FFLAG        = -O2 -w -I$(MPILIB_INCDIR) -I$(MPI_INCDIR) -fallow-argument-mismatch /media/mohamedsereez/bigDisk/Software/CFL3D-master/build/$(CFLLIBSD) 
FFLAG_SPEC   = -O2 -w -I$(MPILIB_INCDIR) -I$(MPI_INCDIR) -fallow-argument-mismatch /media/mohamedsereez/bigDisk/Software/CFL3D-master/build/$(CFLLIBSD)
PREC         = 
PREC_MPI     = -DDBLE_PRECSN
LFLAG        = -z muldefs 
LLIBS        = -lmpich  
LLIBS_SEQ    =  
MPI_INCDIR   = -I/usr/lib/x86_64-linux-gnu/mpich/include
MPILIB_INCDIR =/usr/lib/x86_64-linux-gnu
CGNS_INCDIR  = 
CPP          = cpp
CPPFLAG      = -P
CPPOPT       =  $(MPI_INCDIR) -DDIST_MPI $(PREC_MPI)
CPPOPT_SP    = -DP3D_SINGLE -DLINUX -DINTEL -DNOREDIRECT $(PREC_MPI) $(CGNS_INCDIR)
CPPOPT_CMPLX = -DCMPLX
FTN          = mpif90
CFLAG        = 
AROPT        = rusc
RANLIB       = true
INLINE       = 

# ********************** EXECUTABLE NAME DEFINITIONS *************************

EXEC_CFLSEQ         = cfl3d_seq
EXEC_CFLMPI         = cfl3d_mpi
EXEC_CFLLIBS        = cfl3d_libs
EXEC_PRESEQ         = precfl3d
EXEC_RONSEQ         = ronnie
EXEC_PRERONSEQ      = preronnie
EXEC_MAGSEQ         = maggie
EXEC_SPLIT          = splitter
EXEC_TOOLS          = cfl3d_tools

EXEC_CFLCMPLXSEQ    = cfl3dcmplx_seq
EXEC_CFLCMPLXMPI    = cfl3dcmplx_mpi
EXEC_CFLCMPLXLIBS   = cfl3dcmplx_libs
EXEC_SPLITCMPLX     = splittercmplx

# ********************** DIRECTORY NAME DEFINITIONS *************************

#            ALL DIRECTORY PATHS RELATIVE TO THIS DIRECTORY (BUILD)

# "CONSTRUCTION" DIRECTORIES (first-level directory names on right of the
# equal signs below must be different than the executable names above, 
# or else make will think the executable is always up to date; e.g. if
# EXEC_RONSEQ  = ronnie then RONSEQD = ronnie/seq is not acceptable)

CFLMPID         = cfl/mpi
CFLLIBSD        = cfl/libs
CFLSEQD         = cfl/seq
PRESEQD         = precfl/seq
RONSEQD         = ron/seq
PRERONSEQD      = preron/seq
MAGSEQD         = mag/seq
SPLITD          = split/seq
TOOLSD          = tools/seq

CFLCMPLXMPID    = cflcmplx/mpi
CFLCMPLXLIBSD   = cflcmplx/libs
CFLCMPLXSEQD    = cflcmplx/seq
SPLITCMPLXD     = splitcmplx/seq

# SOURCE-CODE DIRECTORIES - code changes must be made in these directories

CFLSRC_D  = ../source/cfl3d/dist
CFLSRC_S  = ../source/cfl3d/libs
PRESRC    = ../source/precfl3d
RONSRC    = ../source/ronnie
PRERONSRC = ../source/ronnie
MAGSRC    = ../source/maggie
SPLITSRC  = ../source/splitter
TOOLSSRC  = ../source/tools

# HEADER-FILE DIRECTORY

HEADER    = ../header

# MAKEFILE OPTION - to process "if defs", use can either cpp built into the
#                   fortran compiler or an explict call to an external cpp
#
# MAKEFILE  = makefile     ... use fortran cpp
#           = makefile_cpp ... use external cpp (may need to alter path
#                              in the "CPP = " statement under "COMPILER
#                              FLAG DEFINITIONS" above

MAKEFILE  = makefile
Top part of the makeFile (copy paste up to the line shown) - And also you will need to adjust include directories to relevant in your PC
inginer likes this.
shereez234 is offline   Reply With Quote

Reply

Tags
cfl3d compile mpiifort


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
Getting error both interpreting and compiling serene6390 Fluent UDF and Scheme Programming 1 October 27, 2017 00:49
CFL3D available on github Martin Hegedus Main CFD Forum 4 September 23, 2017 11:52
All files present. but solver not compiling saddy OpenFOAM Programming & Development 1 July 29, 2017 09:50
[OpenFOAM.org] Trouble Compiling OpenFOAM-dev using Intel Compiler 15 for use on Xeon Phi foamer123 OpenFOAM Installation 9 August 20, 2015 14:03
Help with KIVA4 source code compiling geothokar Main CFD Forum 0 September 3, 2010 05:40


All times are GMT -4. The time now is 09:42.