Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Compile only a few files with a particular flag.

Hi,I would like to know if there is a way to compile only a few modules/functions with a particular flag(Vmix,Baroclinic,Barotropic , not the entire POP module), While others would be done wiht the regular flags provided in the Macros. This is how I would the flags to be mpiifort (CESM related flags) othermodules.F90mpiifort (CESM flags) (my desired flags) mydesiredmodules.F90 It would be great if I could only have a subroutine of choice i.e vmix_coeffs only compiled this way. 
 

jedwards

CSEG and Liaisons
Staff member
Yes, you can use a Depends file.   Put the special instructions into a file called Depends.{machinename} or Depends.{compilername} in your case directory and they will be used in the build.    Here is an example Depends.gnu file, where we have added a -fcray-pointer flag to be applied only to geopk.F90 geopk.o:geopk.F90
$(FC) -c $(INCLDIR) $(INCS) $(FFLAGS) $(FREEFLAGS) -fcray-pointer $
 
Top