WRF icon indicating copy to clipboard operation
WRF copied to clipboard

WRFCHEM DA needs to run compile twice on intel llvm compilers

Open HathewayWill opened this issue 1 year ago • 4 comments

Describe the bug A clear and concise description of what the bug is.

certain DA lists are not compiled on a first installation, missing linkers I believe. After running compile again it finds the missing files and creates wrfchem da with intel llvm compilers.

To Reproduce Steps to reproduce the behavior:

cd $WRFCHEM_FOLDER/Downloads
	cd $WRFCHEM_FOLDER/Downloads
	wget -c https://github.com/wrf-model/WRF/releases/download/v$WRF_VERSION/v$WRF_VERSION.tar.gz -O WRF-$WRF_VERSION.tar.gz
	mkdir $WRFCHEM_FOLDER/WRFDA
	tar -xvzf WRF-$WRF_VERSION.tar.gz -C $WRFCHEM_FOLDER/WRFDA
	# If statment for changing folder name
	if [ -d "$WRFCHEM_FOLDER/WRFDA/WRF" ]; then
		mv -f $WRFCHEM_FOLDER/WRFDA/WRF $WRFCHEM_FOLDER/WRFDA/WRFV$WRF_VERSION
	fi
	cd $WRFCHEM_FOLDER/WRFDA/WRFV$WRF_VERSION
	mv * $WRFCHEM_FOLDER/WRFDA
	cd $WRFCHEM_FOLDER/WRFDA
	rm -rf WRFV$WRF_VERSION/
	cd $WRFCHEM_FOLDER/WRFDA

	ulimit -s unlimited
	export WRF_CHEM=1
	export WRFIO_NCD_LARGE_FILE_SUPPORT=1

	./clean -a

	if [ ${auto_config} -eq 1 ]; then
		echo 78 | ./configure wrfda 2>&1 | tee configure.log #Option 78 for intel and distribunted memory
	else
		./configure wrfda 2>&1 | tee configure.log #Option 78 for intel and distribunted memory
	fi
	echo " "

	#Need to remove mpich/GNU config calls to Intel config calls
	sed -i '136s|mpif90 -f90=$(SFC)|mpiifx|g' $WRFCHEM_FOLDER/WRFDA/configure.wrf
	sed -i '137s|mpicc -cc=$(SCC)|mpiicx|g' $WRFCHEM_FOLDER/WRFDA/configure.wrf
	sed -i '144s|-ip|-ip -Wno-implicit-function-declaration -Wno-incompatible-function-pointer-types |g' $WRFCHEM_FOLDER/WRFDA/configure.wrf
	sed -i '145s|-ip|-ip -Wno-implicit-function-declaration -Wno-incompatible-function-pointer-types |g' $WRFCHEM_FOLDER/WRFDA/configure.wrf
	
	./compile -j $CPU_HALF_EVEN all_wrfvar 2>&1 | tee compile.chem.wrfvar.log
	echo " "

	# IF statement to check that all files were created.
	cd $WRFCHEM_FOLDER/WRFDA/var/da
	n=$(ls ./*.exe | wc -l)
	cd $WRFCHEM_FOLDER/WRFDA/var/obsproc/src
	m=$(ls ./*.exe | wc -l)
	if ((($n == 43) && ($m == 1))); then
		echo "All expected files created."
		read -r -t 5 -p "Finished installing WRFDA. I am going to wait for 5 seconds only ..."
	else
		echo "Missing one or more expected files."
		echo "Running compiler again"
		cd $WRFCHEM_FOLDER/WRFDA
		./compile -j $CPU_HALF_EVEN all_wrfvar 2>&1 | tee compile.chem.wrfvar2.log
		cd $WRFCHEM_FOLDER/WRFDA/var/da
		n=$(ls ./*.exe | wc -l)
		cd $WRFCHEM_FOLDER/WRFDA/var/obsproc/src
		m=$(ls ./*.exe | wc -l)
		if ((($n == 43) && ($m == 1))); then
			echo "All expected files created."
			read -r -t 5 -p "Finished installing WRFDA. I am going to wait for 5 seconds only ..."
		else
			read -r -p "Please contact script authors for assistance, press 'Enter' to exit script."
			exit
		fi
	fi
	echo " "

Expected behavior files should all be linked on first run.

Attachments

compile.chem.wrfvar.log compile.chem.wrfvar2.log configure.log configure.wrf.txt

HathewayWill avatar Dec 31 '23 23:12 HathewayWill

Could be related to #1950

islas avatar Jan 06 '24 20:01 islas

@islas Here are the log files for WRFCHEM DA without any addiontal flags added.

Failure_WRFCHEMDA.zip

HathewayWill avatar Jan 10 '24 21:01 HathewayWill

Could be related to #1950

When 4.6 comes out should i retest all this?

HathewayWill avatar Feb 28 '24 17:02 HathewayWill

wrfchemda.4.6.zip @islas

latest changes to 4.6 allows wrfchem da to pass on intel compilers. See attached zip file and log files

wrfchem however still has the memory issue with intel llvm

HathewayWill avatar Apr 10 '24 23:04 HathewayWill