Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#72 closed Support (worksforme)

Issues while compiling FLEXTRA

Reported by: lnguyen5 Owned by: pesei
Priority: major Milestone:
Component: FLEXTRA Version: FLEXTRA 3
Keywords: Flextra compiling makefile Cc: rstow

Description

I would be really grateful if someone could help to compile flextra makefile. I've already install all the needed library (Jasper, Emos & Grib Api). But when I try to compile, it seems that the make file is pointing to the wrong library and cannot find :

g77 *.o -o FLEXTRA -fno-f2c -O1 -fforce-addr -funroll-loops -fschedule-insns2 -L/home/as/grib -lgrex
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: cannot find -lgrex
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
make: * [FLEXTRA] Error 1

Does someone know how to fix it ? Or have a compiling procedure ?

Best regards,
Liliane

Change History (15)

comment:1 Changed 11 years ago by DefaultCC Plugin

  • Cc rstow added

comment:2 Changed 11 years ago by pesei

  • Type changed from Defect to Support

Could you please select the Version of Flexpart you are working with in the ticket properties? Versions >= require a F90 compiler.

comment:3 Changed 11 years ago by lnguyen5

Thank you for quick reply, I really appreciate by your help.
In fact I'm trying to compile Flextra I got the FLEXTRA3.3 TAR file. I've already installed a FORTRAN compiler, I got the g77_all_debian_and_ubuntu.tar.gz

As for the error message, I could locate crt1 crti and gcc_s, which are in the file usr/lib/x86_64-linux-gnu folder.

I think I have to point to it, but I don't know how to do it, and I have a low knowledge of FORTRAN language.

comment:4 Changed 11 years ago by pesei

  • Component changed from FP other to FP coding/compilation
  • Owner changed from somebody to pesei
  • Status changed from new to accepted
  • Summary changed from issues while compiling FLEXTRA to Issues while compiling FLEXTRA

You have

-L/home/as/grib

in your g77 call. This path is system-specific, what you find in the sample makefile is for a specific installation. You need to replace it by the path where your GRIB library files can be found.

(By the way, please enclose code into backquotes (inline) or {{{ }}} (code blocks), it improves readability, see WikiFormatting

comment:5 Changed 11 years ago by lnguyen5

Hi thank you for your answer, but I still have some issues...

I changed the path to the location of the GRIB library. But in the makefile file, it still cannot find the command :

-lgrex

It seems to me that it's calling a library which is missing. But I tried to googled it, and couldn't find any information. Do you know what it is for by any chance ?

comment:6 Changed 11 years ago by pesei

FLEXTRA 3.3 is an old version and I think the libraries referenced are referring to old GRIB lib versions. Is there are reason why you are using it? Probably it would be better to use FLEXTRA 5.0. I would think that grib libraries referenced in the makefile of this version correspond to your new GRIB libs.

comment:7 Changed 10 years ago by lnguyen5

I download FLEXTRA5.0 as you recommended. But I still have issues while compiling the makefile. I followed the tips given for FLEXPART where in the makefile I change line to (with the path of GRIB_API and JASPER lib):

 INCPATH=/lib/%GRIB%/include
 LIBPATH1=/lib/%GRIB%/lib
 LIBPATH2=/lib/%JASPER%/lib

But I still get :

f77 -O2 -s -I/usr/local/include -p/usr/local/include -m64 -mcmodel=medium  -c -o caldate.o caldate.f
f77: unrecognized option `-p/usr/local/include'
f77 -O2 -s -I/usr/local/include -p/usr/local/include -m64 -mcmodel=medium  -c -o openoutput.o openoutput.f
f77: unrecognized option `-p/usr/local/include'
f77 -O2 -s -I/usr/local/include -p/usr/local/include -m64 -mcmodel=medium  -c -o checklimits.o checklimits.f

and on and on for each file.

What can I do ?

comment:8 Changed 10 years ago by pesei

Certain options are compiler-specific. You can see that the version is for absoft. gfortran has no -p parameter (see also the commented out line in makefile.gfs which is the active content in makefile.ecmwf. The include path is alread specified with -I, I have no idea what the purpose of -p is in absoft, but in gnu Fortran you won't need that.

Also, if you call the compiler with g77 and not with gfortran, it indicates that you are probably using a rather old version. This should not be important for FLEXTRA itself, however. How did you compile your GRIB and JASPER libs?

comment:9 Changed 10 years ago by lnguyen5

I compile everything in the terminal of Ubuntu (running on a virtual machine on Windows).
I think that I manage to link all the file together, an executable file appears named FLEXTRA_ECMWF.

Then I tried to run it (with the pathnames file filled with all the path and with the COMMAND and STARTPOINT filled). But evertime I get the message killed, which means linux is running out of memory. Is there anything I can do ?

comment:10 Changed 10 years ago by pesei

My impression is that your problems are not very FLEXTRA-specific but rather general IT problems. For example, I don't know how much memory you have configured for your VM, etc. I think you need to find an experienced IT person in your institution to support you.

Did you install the required libraries, GRIB and JASPER?

comment:11 Changed 10 years ago by lnguyen5

Yes I install all the libraries required (GRIB API and JASPER).

comment:12 Changed 10 years ago by pesei

  • Resolution set to worksforme
  • Status changed from accepted to closed

I am closing this ticket now, hoping that you can solve your problems locally. If you still have problems related to FLEXTRA proper, don't hesitate to post again, we can then reopen the ticket.

You are invited to add yourself in FtUsers when you arrive at the point of being a real user :)

Just as a reminder: there is also a FLEXPART/FLEXTRA user email list where you can try to find support and collaboration, see https://lists.univie.ac.at/mailman/listinfo/flexpart

comment:13 Changed 10 years ago by lnguyen5

Thank you very much for the help.

comment:14 Changed 10 years ago by pesei

  • Version changed from none to FLEXTRA 3

comment:15 Changed 10 years ago by pesei

  • Component changed from FP coding/compilation to FLEXTRA
Note: See TracTickets for help on using tickets.
hosted by ZAMG