Compiling Tonto

Are you stuck with Shelx, going crazy with Crystals, WinGX sent you wobbly, LinGX left you slightly lost, APEXII left you for dead or just need some structural healing? Then perhaps posting here will help? Use this forum for general discussion about software, databases and web resources.
Forum rules
If you've got a problem or want to post about a specific package please use its own subforum area. If there is not an appropriate area yeap just put it in the general area below

Compiling Tonto

Postby MarkL » 03 Apr 2012, 19:58

Good evening,

I'm trying to compile Tonto (acquired via svn) and I'm running into a problem:

Code: Select all
Making RUN_BUFFER Fortran dependency rules ...
Making GNU-gfortran-on-WINDOWS/fast/modules/types_module.mod ...
Target ./GNU-gfortran-on-WINDOWS/fast/modules/types_module.mod does not exist, compilation forced.
set noglob && /usr/bin/gfortran -I. -I./GNU-gfortran-on-WINDOWS/fast/modules -M./GNU-gfortran-on-WINDOWS/fast/modules -Wall  -O3 -c -o ./GNU-gfortran-on-WINDOWS/fast/objects/types.o GNU-gfortran-on-WINDOWS/fast/f95files/types.f90
f951: error: unrecognized command line option "-M./GNU-gfortran-on-WINDOWS/fast/modules"
Makefile:537: recipe for target `GNU-gfortran-on-WINDOWS/fast/modules/types_module.mod' failed
make: *** [GNU-gfortran-on-WINDOWS/fast/modules/types_module.mod] Error 1


This output is using cygwin and the latest version of the GNU fortran compiler, but it stalls in the same place for me in Linux (openSuse/Ubuntu), and using different compilers (g95, legacy gcc including 4.3, 4.4, 4.5). I don't have a huge amount of experience with fortran/perl (more with the latter, but that was years ago) so I'm not entirely sure what exactly should be looking at in the Makefile, assuming that the problem is there.

Any help anyone can give me would be gratefully received.
MarkL
Trained Monkey
 
Posts: 5
Joined: 02 Apr 2012, 14:30

Re: Compiling Tonto

Postby pascalp » 04 Apr 2012, 07:40

-M that's for the folder of the module "*.mod" fortran files. However for gfortran, it's the -J flag. -M is deprecated.
pascalp
Rotating Anode With Optics
 
Posts: 286
Joined: 17 Dec 2007, 16:01
Location: Oxford, UK

Re: Compiling Tonto

Postby MarkL » 04 Apr 2012, 10:15

First: thank you for the swift reply!

So I need to edit the makefile then, but I'm not entirely sure where...

Code: Select all
# Make the .mod module files
$(moddir)/%.$(MODSUFFIX) : $(PLATFORM_INFO_FILE)
   @test -d $(objdir) || $(MKDIR) $(objdir)
   @test -d $(moddir) || $(MKDIR) $(moddir)
   @$(SET_NOGLOB) echo Making $(TARGET) ...
   @$(if ^,,$(error "Don't know prerequisites for $(TARGET)"))
   @$(SET_NOGLOB) $(PERL) -w $(scriptdir)/compile_mod.pl \
           -fc "$(SET_NOGLOB) $(FC) $(FFLAGS) $(FOPTNS) $(FOUTOBJ)$(TARGET_OBJECT) $(FORTRAN_PREREQUISITES)" \
           -cmp "$(PERL) -w $(scriptdir)/compare_module_file.pl -compiler $(PLATFORM_ID)" \
           -provides $(TARGET_MODULES) $(TARGET_OBJECT) \
           -requires $(PREREQUISITES)
   @$(SET_NOGLOB) touch $(TARGET_MODULES) $(TARGET_OBJRCT)


is the section in question, and I'm not quite sure where to look for what to change. A simple search through the document wasn't that productive, but then as I said I'm not that experienced...
MarkL
Trained Monkey
 
Posts: 5
Joined: 02 Apr 2012, 14:30

Re: Compiling Tonto

Postby pascalp » 04 Apr 2012, 10:39

check in the file platforms/GNU-gfortran-on-WINDOWS
on line 12:
FFLAGS = -I$(srcdir) -I$(moddir) -M$(moddir) -Wall

http://tonto-chem.svn.sourceforge.net/v ... iew=markup
pascalp
Rotating Anode With Optics
 
Posts: 286
Joined: 17 Dec 2007, 16:01
Location: Oxford, UK

Re: Compiling Tonto

Postby MarkL » 07 Apr 2012, 17:00

Thank you for the help, but I'm afraid the problems aren't over. Same place, different error:

Code: Select all
Making GNU-gfortran-on-WINDOWS/fast/modules/system_module.mod ...
Target ./GNU-gfortran-on-WINDOWS/fast/modules/system_module.mod does not exist, compilation forced.
set noglob && /usr/bin/gfortran -I. -I./GNU-gfortran-on-WINDOWS/fast/modules -J./GNU-gfortran-on-WINDOWS/fast/modules -Wall  -O3 -c -o ./GNU-gfortran-on-WINDOWS/fast/objects/system.o GNU-gfortran-on-WINDOWS/fast/f95files/system.f90
GNU-gfortran-on-WINDOWS/fast/f95files/system.f90:1824.15:

      n = kind(self)
               1
Error: 'x' argument of 'kind' intrinsic at (1) must be a non-derived type
GNU-gfortran-on-WINDOWS/fast/f95files/system.f90:1793.15:

      n = kind(self)
               1
Error: 'x' argument of 'kind' intrinsic at (1) must be a non-derived type
GNU-gfortran-on-WINDOWS/fast/f95files/system.f90:1765.15:

      n = kind(self)
               1
Error: 'x' argument of 'kind' intrinsic at (1) must be a non-derived type
GNU-gfortran-on-WINDOWS/fast/f95files/system.f90:1735.15:

      n = kind(self)
               1
Error: 'x' argument of 'kind' intrinsic at (1) must be a non-derived type
Makefile:537: recipe for target `GNU-gfortran-on-WINDOWS/fast/modules/system_module.mod' failed
make: *** [GNU-gfortran-on-WINDOWS/fast/modules/system_module.mod] Error 1


(Sorry for the delay in getting back to you, my internet's been broken.)
MarkL
Trained Monkey
 
Posts: 5
Joined: 02 Apr 2012, 14:30

Re: Compiling Tonto

Postby pascalp » 08 Apr 2012, 11:30

Weird, which compiler are you using and what version?

Also, it's specific to the windows platform. I do not have the error on linux and there is no such line in my system.f90. The generated code from the foo file must be different :/

Can you post/attach your system.f90 file?
pascalp
Rotating Anode With Optics
 
Posts: 286
Joined: 17 Dec 2007, 16:01
Location: Oxford, UK

Re: Compiling Tonto

Postby MarkL » 08 Apr 2012, 12:30

The Fortran compiler is GFortran 4.5.3.

system.f90 is over 3000 lines long, so it's here in a pastebin: http://pastebin.com/nBVdRXPt (the raw data keeps the formatting)
MarkL
Trained Monkey
 
Posts: 5
Joined: 02 Apr 2012, 14:30

Re: Compiling Tonto

Postby MarkL » 08 Apr 2012, 12:37

I also note that I get a near-identical error message in Ubuntu 11.10, using gfortran 4.6.1 - error reproduced below

Code: Select all
Making GNU-f95-on-LINUX/fast/modules/system_module.mod ...
Target ./GNU-f95-on-LINUX/fast/modules/system_module.mod does not exist, compilation forced.
set noglob && /usr/bin/f95 -I. -I./GNU-f95-on-LINUX/fast/modules -O -c -o ./GNU-f95-on-LINUX/fast/objects/system.o GNU-f95-on-LINUX/fast/f95files/system.F90
GNU-f95-on-LINUX/fast/f95files/system.F90:1823.15:

      n = kind(self)
               1
Error: 'x' argument of 'kind' intrinsic at (1) must be a non-derived type
GNU-f95-on-LINUX/fast/f95files/system.F90:1792.15:

      n = kind(self)
               1
Error: 'x' argument of 'kind' intrinsic at (1) must be a non-derived type
GNU-f95-on-LINUX/fast/f95files/system.F90:1764.15:

      n = kind(self)
               1
Error: 'x' argument of 'kind' intrinsic at (1) must be a non-derived type
GNU-f95-on-LINUX/fast/f95files/system.F90:1734.15:

      n = kind(self)
               1
Error: 'x' argument of 'kind' intrinsic at (1) must be a non-derived type
make: *** [GNU-f95-on-LINUX/fast/modules/system_module.mod] Error 1


And the pastebin for system.f90 on this system: http://pastebin.com/uuCui5Gn
MarkL
Trained Monkey
 
Posts: 5
Joined: 02 Apr 2012, 14:30

Re: Compiling Tonto

Postby pascalp » 08 Apr 2012, 15:17

by the name of the path, are you sure you are not using g95? I am using gfortran 4.7

I don't have any routine named quick_sort_decreasing but SYSTEM_quick_sort_decreasing and instead of if (.false.) n = kind(self) I have if (.false.) n = transfer(self,n)
Anyway in both case, it's dead code, it's never used or undefined...

In your case:

line 1823: n is allocated the line after so you can delete the first one.

line 1792: it's more problematic, if stack is not associated, n is undefined :/ but n is redefined if there is a stack. If you delete the line it should be ok though.

line 1764: same

line 1734: same

I have reported a bug related to this matter: https://sourceforge.net/tracker/?group_ ... tid=775461
pascalp
Rotating Anode With Optics
 
Posts: 286
Joined: 17 Dec 2007, 16:01
Location: Oxford, UK


Return to General Software

Who is online

Users browsing this forum: No registered users and 0 guests